mirror of https://github.com/OCA/web.git
[IMP] web_environment_ribbon: pre-commit stuff
parent
b4107961fa
commit
137f888226
|
@ -17,18 +17,19 @@ Web Environment Ribbon
|
||||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||||
:alt: License: AGPL-3
|
:alt: License: AGPL-3
|
||||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fweb-lightgray.png?logo=github
|
.. |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
|
:alt: OCA/web
|
||||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
.. |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
|
:alt: Translate me on Weblate
|
||||||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
|
.. |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
|
:alt: Try me on Runboat
|
||||||
|
|
||||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|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**
|
**Table of contents**
|
||||||
|
|
||||||
|
@ -38,20 +39,21 @@ Mark a Test Environment with a red ribbon on the top left corner in every page
|
||||||
Configuration
|
Configuration
|
||||||
=============
|
=============
|
||||||
|
|
||||||
* You can change the ribbon's name ("TEST") by editing the default system
|
- You can change the ribbon's name ("TEST") by editing the default
|
||||||
parameter "ribbon.name" (in the menu Settings > Parameters > System
|
system parameter "ribbon.name" (in the menu Settings > Parameters >
|
||||||
Parameters) To hide the ribbon, set this parameter to "False" or delete it.
|
System Parameters) To hide the ribbon, set this parameter to "False"
|
||||||
* You can customize the ribbon color and background color through system
|
or delete it.
|
||||||
parameters: "ribbon.color", "ribbon.background.color". Fill with valid CSS
|
- You can customize the ribbon color and background color through
|
||||||
colors or just set to "False" to use default values.
|
system parameters: "ribbon.color", "ribbon.background.color". Fill
|
||||||
* You can add the database name in the ribbon by adding "{db_name}" in the
|
with valid CSS colors or just set to "False" to use default values.
|
||||||
system parameter "ribbon.name".
|
- You can add the database name in the ribbon by adding "{db_name}" in
|
||||||
|
the system parameter "ribbon.name".
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
=====
|
=====
|
||||||
|
|
||||||
To use this module, you need only to install it. After installation, a red
|
To use this module, you need only to install it. After installation, a
|
||||||
ribbon will be visible on top left corner of every Odoo backend page
|
red ribbon will be visible on top left corner of every Odoo backend page
|
||||||
|
|
||||||
Bug Tracker
|
Bug Tracker
|
||||||
===========
|
===========
|
||||||
|
@ -59,7 +61,7 @@ Bug Tracker
|
||||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/web/issues>`_.
|
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.
|
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
|
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.
|
Do not contact contributors directly about support or help with technical issues.
|
||||||
|
|
||||||
|
@ -67,24 +69,24 @@ Credits
|
||||||
=======
|
=======
|
||||||
|
|
||||||
Authors
|
Authors
|
||||||
~~~~~~~
|
-------
|
||||||
|
|
||||||
* Francesco OpenCode Apruzzese
|
* Francesco OpenCode Apruzzese
|
||||||
* Tecnativa
|
* Tecnativa
|
||||||
|
|
||||||
Contributors
|
Contributors
|
||||||
~~~~~~~~~~~~
|
------------
|
||||||
|
|
||||||
* Francesco Apruzzese <cescoap@gmail.com>
|
- Francesco Apruzzese <cescoap@gmail.com>
|
||||||
* Javi Melendez <javimelex@gmail.com>
|
- Javi Melendez <javimelex@gmail.com>
|
||||||
* Antonio Espinosa <antonio.espinosa@tecnativa.com>
|
- Antonio Espinosa <antonio.espinosa@tecnativa.com>
|
||||||
* Thomas Binsfeld <thomas.binsfeld@acsone.eu>
|
- Thomas Binsfeld <thomas.binsfeld@acsone.eu>
|
||||||
* Xavier Jiménez <xavier.jimenez@qubiq.es>
|
- Xavier Jiménez <xavier.jimenez@qubiq.es>
|
||||||
* Dennis Sluijk <d.sluijk@onestein.nl>
|
- Dennis Sluijk <d.sluijk@onestein.nl>
|
||||||
* Eric Lembregts <eric@lembregts.eu>
|
- Eric Lembregts <eric@lembregts.eu>
|
||||||
|
|
||||||
Maintainers
|
Maintainers
|
||||||
~~~~~~~~~~~
|
-----------
|
||||||
|
|
||||||
This module is maintained by the OCA.
|
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
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.
|
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.
|
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):
|
class WebEnvironmentRibbonBackend(models.AbstractModel):
|
||||||
|
|
||||||
_name = "web.environment.ribbon.backend"
|
_name = "web.environment.ribbon.backend"
|
||||||
_description = "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
|
!! 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><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>Mark a Test Environment with a red ribbon on the top left corner in
|
||||||
|
every page</p>
|
||||||
<p><strong>Table of contents</strong></p>
|
<p><strong>Table of contents</strong></p>
|
||||||
<div class="contents local topic" id="contents">
|
<div class="contents local topic" id="contents">
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
|
@ -388,27 +389,28 @@ ul.auto-toc {
|
||||||
<div class="section" id="configuration">
|
<div class="section" id="configuration">
|
||||||
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
|
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li>You can change the ribbon’s name (“TEST”) by editing the default system
|
<li>You can change the ribbon’s name (“TEST”) by editing the default
|
||||||
parameter “ribbon.name” (in the menu Settings > Parameters > System
|
system parameter “ribbon.name” (in the menu Settings > Parameters >
|
||||||
Parameters) To hide the ribbon, set this parameter to “False” or delete it.</li>
|
System Parameters) To hide the ribbon, set this parameter to “False”
|
||||||
<li>You can customize the ribbon color and background color through system
|
or delete it.</li>
|
||||||
parameters: “ribbon.color”, “ribbon.background.color”. Fill with valid CSS
|
<li>You can customize the ribbon color and background color through
|
||||||
colors or just set to “False” to use default values.</li>
|
system parameters: “ribbon.color”, “ribbon.background.color”. Fill
|
||||||
<li>You can add the database name in the ribbon by adding “{db_name}” in the
|
with valid CSS colors or just set to “False” to use default values.</li>
|
||||||
system parameter “ribbon.name”.</li>
|
<li>You can add the database name in the ribbon by adding “{db_name}” in
|
||||||
|
the system parameter “ribbon.name”.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="usage">
|
<div class="section" id="usage">
|
||||||
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
|
<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
|
<p>To use this module, you need only to install it. After installation, a
|
||||||
ribbon will be visible on top left corner of every Odoo backend page</p>
|
red ribbon will be visible on top left corner of every Odoo backend page</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="bug-tracker">
|
<div class="section" id="bug-tracker">
|
||||||
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
|
<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>.
|
<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.
|
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
|
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>
|
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="credits">
|
<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
|
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||||
mission is to support the collaborative development of Odoo features and
|
mission is to support the collaborative development of Odoo features and
|
||||||
promote its widespread use.</p>
|
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>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -18,7 +18,7 @@ class TestEnvironmentRibbonData(common.TransactionCase):
|
||||||
ribbon = self.env["web.environment.ribbon.backend"].get_environment_ribbon()
|
ribbon = self.env["web.environment.ribbon.backend"].get_environment_ribbon()
|
||||||
|
|
||||||
expected_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",
|
"color": "#000000",
|
||||||
"background_color": "#FFFFFF",
|
"background_color": "#FFFFFF",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue