diff --git a/web_company_color/README.rst b/web_company_color/README.rst index 85b13a644..07664e800 100644 --- a/web_company_color/README.rst +++ b/web_company_color/README.rst @@ -17,13 +17,13 @@ Web Company Color :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_company_color + :target: https://github.com/OCA/web/tree/17.0/web_company_color :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_company_color + :target: https://translation.odoo-community.org/projects/web-17-0/web-17-0-web_company_color :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| @@ -38,14 +38,16 @@ This module change navbar colors based in the company logo colors. Usage ===== -Go to company record and set a logo. Can see/modify applied colors on the "Navbar" section. +Go to company record and set a logo. Can see/modify applied colors on +the "Navbar" section. For optimal results use images with alpha channel. Known issues / Roadmap ====================== -White color is omitted in the addition operation to support images without alpha channel. +White color is omitted in the addition operation to support images +without alpha channel. Bug Tracker =========== @@ -53,7 +55,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -61,27 +63,27 @@ Credits ======= Authors -~~~~~~~ +------- * Alexandre Díaz Contributors -~~~~~~~~~~~~ +------------ -* Jordi Ballester Alomar (ForgeFlow) -* Lois Rilo (ForgeFlow) -* Simone Orsi -* Iván Antón -* Bernat Puig (ForgeFlow) -* Dhara Solanki -* `Tecnativa `_: +- Jordi Ballester Alomar (ForgeFlow) +- Lois Rilo (ForgeFlow) +- Simone Orsi +- Iván Antón +- Bernat Puig (ForgeFlow) +- Dhara Solanki +- `Tecnativa `__: - * Jairo Llopis - * Alexandre Díaz - * Carlos Roca + - Jairo Llopis + - Alexandre Díaz + - Carlos Roca Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -93,6 +95,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 `_ project on GitHub. +This module is part of the `OCA/web `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/web_company_color/pyproject.toml b/web_company_color/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/web_company_color/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/web_company_color/readme/CONTRIBUTORS.md b/web_company_color/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..c66d22568 --- /dev/null +++ b/web_company_color/readme/CONTRIBUTORS.md @@ -0,0 +1,10 @@ +- Jordi Ballester Alomar \<\> (ForgeFlow) +- Lois Rilo \<\> (ForgeFlow) +- Simone Orsi \<\> +- Iván Antón \<\> +- Bernat Puig \<\> (ForgeFlow) +- Dhara Solanki \<\> +- [Tecnativa](https://www.tecnativa.com): + - Jairo Llopis + - Alexandre Díaz + - Carlos Roca diff --git a/web_company_color/readme/CONTRIBUTORS.rst b/web_company_color/readme/CONTRIBUTORS.rst deleted file mode 100644 index 180a4a029..000000000 --- a/web_company_color/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,11 +0,0 @@ -* Jordi Ballester Alomar (ForgeFlow) -* Lois Rilo (ForgeFlow) -* Simone Orsi -* Iván Antón -* Bernat Puig (ForgeFlow) -* Dhara Solanki -* `Tecnativa `_: - - * Jairo Llopis - * Alexandre Díaz - * Carlos Roca diff --git a/web_company_color/readme/DESCRIPTION.rst b/web_company_color/readme/DESCRIPTION.md similarity index 100% rename from web_company_color/readme/DESCRIPTION.rst rename to web_company_color/readme/DESCRIPTION.md diff --git a/web_company_color/readme/ROADMAP.rst b/web_company_color/readme/ROADMAP.md similarity index 71% rename from web_company_color/readme/ROADMAP.rst rename to web_company_color/readme/ROADMAP.md index 2b669379a..4fbb50e80 100644 --- a/web_company_color/readme/ROADMAP.rst +++ b/web_company_color/readme/ROADMAP.md @@ -1 +1,2 @@ -White color is omitted in the addition operation to support images without alpha channel. +White color is omitted in the addition operation to support images +without alpha channel. diff --git a/web_company_color/readme/USAGE.rst b/web_company_color/readme/USAGE.md similarity index 80% rename from web_company_color/readme/USAGE.rst rename to web_company_color/readme/USAGE.md index 0143fee7d..9820c920f 100644 --- a/web_company_color/readme/USAGE.rst +++ b/web_company_color/readme/USAGE.md @@ -1,3 +1,4 @@ -Go to company record and set a logo. Can see/modify applied colors on the "Navbar" section. +Go to company record and set a logo. Can see/modify applied colors on +the "Navbar" section. For optimal results use images with alpha channel. diff --git a/web_company_color/static/description/index.html b/web_company_color/static/description/index.html index d24839698..bac826421 100644 --- a/web_company_color/static/description/index.html +++ b/web_company_color/static/description/index.html @@ -369,7 +369,7 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:8a814ac88491029ca65ef378be730bd05a762604c5913f24f9cf1c6ea5b160cb !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/web Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/web Translate me on Weblate Try me on Runboat

This module change navbar colors based in the company logo colors.

Table of contents

@@ -387,19 +387,21 @@ ul.auto-toc {

Usage

-

Go to company record and set a logo. Can see/modify applied colors on the “Navbar” section.

+

Go to company record and set a logo. Can see/modify applied colors on +the “Navbar” section.

For optimal results use images with alpha channel.

Known issues / Roadmap

-

White color is omitted in the addition operation to support images without alpha channel.

+

White color is omitted in the addition operation to support images +without alpha channel.

Bug Tracker

Bugs are tracked on GitHub 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.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -436,7 +438,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome

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 project on GitHub.

+

This module is part of the OCA/web project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/web_company_color/utils.py b/web_company_color/utils.py index 118ceb26a..2028a4c4b 100644 --- a/web_company_color/utils.py +++ b/web_company_color/utils.py @@ -8,7 +8,7 @@ from PIL import Image def n_rgb_to_hex(_r, _g, _b): - return "#{:02x}{:02x}{:02x}".format(int(255 * _r), int(255 * _g), int(255 * _b)) + return f"#{int(255 * _r):02x}{int(255 * _g):02x}{int(255 * _b):02x}" def convert_to_image(field_binary):