forked from Techsystech/web
[IMP] web_environment_ribbon: pre-commit stuff
parent
9bf8f19b27
commit
85534cca30
Binary file not shown.
|
@ -17,18 +17,19 @@ Web Environment Ribbon
|
|||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/web/tree/16.0/web_environment_ribbon
|
||||
:target: https://github.com/OCA/web/tree/17.0/web_environment_ribbon
|
||||
:alt: OCA/web
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_environment_ribbon
|
||||
:target: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_environment_ribbon
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0
|
||||
:target: https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=17.0
|
||||
:alt: Try me on Runboat
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
Mark a Test Environment with a red ribbon on the top left corner in every page
|
||||
Mark a Test Environment with a red ribbon on the top left corner in
|
||||
every page
|
||||
|
||||
**Table of contents**
|
||||
|
||||
|
@ -38,20 +39,21 @@ Mark a Test Environment with a red ribbon on the top left corner in every page
|
|||
Configuration
|
||||
=============
|
||||
|
||||
* You can change the ribbon's name ("TEST") by editing the default system
|
||||
parameter "ribbon.name" (in the menu Settings > Parameters > System
|
||||
Parameters) To hide the ribbon, set this parameter to "False" or delete it.
|
||||
* You can customize the ribbon color and background color through system
|
||||
parameters: "ribbon.color", "ribbon.background.color". Fill with valid CSS
|
||||
colors or just set to "False" to use default values.
|
||||
* You can add the database name in the ribbon by adding "{db_name}" in the
|
||||
system parameter "ribbon.name".
|
||||
- You can change the ribbon's name ("TEST") by editing the default
|
||||
system parameter "ribbon.name" (in the menu Settings > Parameters >
|
||||
System Parameters) To hide the ribbon, set this parameter to "False"
|
||||
or delete it.
|
||||
- You can customize the ribbon color and background color through
|
||||
system parameters: "ribbon.color", "ribbon.background.color". Fill
|
||||
with valid CSS colors or just set to "False" to use default values.
|
||||
- You can add the database name in the ribbon by adding "{db_name}" in
|
||||
the system parameter "ribbon.name".
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
To use this module, you need only to install it. After installation, a red
|
||||
ribbon will be visible on top left corner of every Odoo backend page
|
||||
To use this module, you need only to install it. After installation, a
|
||||
red ribbon will be visible on top left corner of every Odoo backend page
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
@ -59,7 +61,7 @@ Bug Tracker
|
|||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_environment_ribbon%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/OCA/web/issues/new?body=module:%20web_environment_ribbon%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
|
@ -67,24 +69,24 @@ Credits
|
|||
=======
|
||||
|
||||
Authors
|
||||
~~~~~~~
|
||||
-------
|
||||
|
||||
* Francesco OpenCode Apruzzese
|
||||
* Tecnativa
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
------------
|
||||
|
||||
* Francesco Apruzzese <cescoap@gmail.com>
|
||||
* Javi Melendez <javimelex@gmail.com>
|
||||
* Antonio Espinosa <antonio.espinosa@tecnativa.com>
|
||||
* Thomas Binsfeld <thomas.binsfeld@acsone.eu>
|
||||
* Xavier Jiménez <xavier.jimenez@qubiq.es>
|
||||
* Dennis Sluijk <d.sluijk@onestein.nl>
|
||||
* Eric Lembregts <eric@lembregts.eu>
|
||||
- Francesco Apruzzese <cescoap@gmail.com>
|
||||
- Javi Melendez <javimelex@gmail.com>
|
||||
- Antonio Espinosa <antonio.espinosa@tecnativa.com>
|
||||
- Thomas Binsfeld <thomas.binsfeld@acsone.eu>
|
||||
- Xavier Jiménez <xavier.jimenez@qubiq.es>
|
||||
- Dennis Sluijk <d.sluijk@onestein.nl>
|
||||
- Eric Lembregts <eric@lembregts.eu>
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
-----------
|
||||
|
||||
This module is maintained by the OCA.
|
||||
|
||||
|
@ -96,6 +98,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
|||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.
|
||||
|
||||
This module is part of the `OCA/web <https://github.com/OCA/web/tree/16.0/web_environment_ribbon>`_ project on GitHub.
|
||||
This module is part of the `OCA/web <https://github.com/OCA/web/tree/17.0/web_environment_ribbon>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
|
|
@ -5,7 +5,6 @@ from odoo import api, models
|
|||
|
||||
|
||||
class WebEnvironmentRibbonBackend(models.AbstractModel):
|
||||
|
||||
_name = "web.environment.ribbon.backend"
|
||||
_description = "Web Environment Ribbon Backend"
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
[build-system]
|
||||
requires = ["whool"]
|
||||
build-backend = "whool.buildapi"
|
|
@ -0,0 +1,9 @@
|
|||
- You can change the ribbon's name ("TEST") by editing the default
|
||||
system parameter "ribbon.name" (in the menu Settings \> Parameters \>
|
||||
System Parameters) To hide the ribbon, set this parameter to "False"
|
||||
or delete it.
|
||||
- You can customize the ribbon color and background color through system
|
||||
parameters: "ribbon.color", "ribbon.background.color". Fill with valid
|
||||
CSS colors or just set to "False" to use default values.
|
||||
- You can add the database name in the ribbon by adding "{db_name}" in
|
||||
the system parameter "ribbon.name".
|
|
@ -1,8 +0,0 @@
|
|||
* You can change the ribbon's name ("TEST") by editing the default system
|
||||
parameter "ribbon.name" (in the menu Settings > Parameters > System
|
||||
Parameters) To hide the ribbon, set this parameter to "False" or delete it.
|
||||
* You can customize the ribbon color and background color through system
|
||||
parameters: "ribbon.color", "ribbon.background.color". Fill with valid CSS
|
||||
colors or just set to "False" to use default values.
|
||||
* You can add the database name in the ribbon by adding "{db_name}" in the
|
||||
system parameter "ribbon.name".
|
|
@ -0,0 +1,7 @@
|
|||
- Francesco Apruzzese \<<cescoap@gmail.com>\>
|
||||
- Javi Melendez \<<javimelex@gmail.com>\>
|
||||
- Antonio Espinosa \<<antonio.espinosa@tecnativa.com>\>
|
||||
- Thomas Binsfeld \<<thomas.binsfeld@acsone.eu>\>
|
||||
- Xavier Jiménez \<<xavier.jimenez@qubiq.es>\>
|
||||
- Dennis Sluijk \<<d.sluijk@onestein.nl>\>
|
||||
- Eric Lembregts \<<eric@lembregts.eu>\>
|
|
@ -1,7 +0,0 @@
|
|||
* Francesco Apruzzese <cescoap@gmail.com>
|
||||
* Javi Melendez <javimelex@gmail.com>
|
||||
* Antonio Espinosa <antonio.espinosa@tecnativa.com>
|
||||
* Thomas Binsfeld <thomas.binsfeld@acsone.eu>
|
||||
* Xavier Jiménez <xavier.jimenez@qubiq.es>
|
||||
* Dennis Sluijk <d.sluijk@onestein.nl>
|
||||
* Eric Lembregts <eric@lembregts.eu>
|
|
@ -1 +1,2 @@
|
|||
Mark a Test Environment with a red ribbon on the top left corner in every page
|
||||
Mark a Test Environment with a red ribbon on the top left corner in
|
||||
every page
|
|
@ -0,0 +1,2 @@
|
|||
To use this module, you need only to install it. After installation, a
|
||||
red ribbon will be visible on top left corner of every Odoo backend page
|
|
@ -1,2 +0,0 @@
|
|||
To use this module, you need only to install it. After installation, a red
|
||||
ribbon will be visible on top left corner of every Odoo backend page
|
|
@ -369,8 +369,9 @@ ul.auto-toc {
|
|||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:f15d70ea4272155560e696d4677c06aac24b47b303f75ea305d9c4e5a3991476
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/16.0/web_environment_ribbon"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-16-0/web-16-0-web_environment_ribbon"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>Mark a Test Environment with a red ribbon on the top left corner in every page</p>
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/web/tree/17.0/web_environment_ribbon"><img alt="OCA/web" src="https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_environment_ribbon"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/web&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>Mark a Test Environment with a red ribbon on the top left corner in
|
||||
every page</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
|
@ -388,27 +389,28 @@ ul.auto-toc {
|
|||
<div class="section" id="configuration">
|
||||
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
|
||||
<ul class="simple">
|
||||
<li>You can change the ribbon’s name (“TEST”) by editing the default system
|
||||
parameter “ribbon.name” (in the menu Settings > Parameters > System
|
||||
Parameters) To hide the ribbon, set this parameter to “False” or delete it.</li>
|
||||
<li>You can customize the ribbon color and background color through system
|
||||
parameters: “ribbon.color”, “ribbon.background.color”. Fill with valid CSS
|
||||
colors or just set to “False” to use default values.</li>
|
||||
<li>You can add the database name in the ribbon by adding “{db_name}” in the
|
||||
system parameter “ribbon.name”.</li>
|
||||
<li>You can change the ribbon’s name (“TEST”) by editing the default
|
||||
system parameter “ribbon.name” (in the menu Settings > Parameters >
|
||||
System Parameters) To hide the ribbon, set this parameter to “False”
|
||||
or delete it.</li>
|
||||
<li>You can customize the ribbon color and background color through
|
||||
system parameters: “ribbon.color”, “ribbon.background.color”. Fill
|
||||
with valid CSS colors or just set to “False” to use default values.</li>
|
||||
<li>You can add the database name in the ribbon by adding “{db_name}” in
|
||||
the system parameter “ribbon.name”.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
|
||||
<p>To use this module, you need only to install it. After installation, a red
|
||||
ribbon will be visible on top left corner of every Odoo backend page</p>
|
||||
<p>To use this module, you need only to install it. After installation, a
|
||||
red ribbon will be visible on top left corner of every Odoo backend page</p>
|
||||
</div>
|
||||
<div class="section" id="bug-tracker">
|
||||
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/web/issues">GitHub Issues</a>.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us to smash it by providing a detailed and welcomed
|
||||
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_environment_ribbon%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<a class="reference external" href="https://github.com/OCA/web/issues/new?body=module:%20web_environment_ribbon%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
|
@ -439,7 +441,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
|||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/16.0/web_environment_ribbon">OCA/web</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/web/tree/17.0/web_environment_ribbon">OCA/web</a> project on GitHub.</p>
|
||||
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -18,7 +18,7 @@ class TestEnvironmentRibbonData(common.TransactionCase):
|
|||
ribbon = self.env["web.environment.ribbon.backend"].get_environment_ribbon()
|
||||
|
||||
expected_ribbon = {
|
||||
"name": "Test Ribbon {db_name}".format(db_name=self.env.cr.dbname),
|
||||
"name": f"Test Ribbon {self.env.cr.dbname}",
|
||||
"color": "#000000",
|
||||
"background_color": "#FFFFFF",
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue