diff --git a/product_route_profile/README.rst b/product_route_profile/README.rst index 5b1a09b39..76420c0b4 100644 --- a/product_route_profile/README.rst +++ b/product_route_profile/README.rst @@ -17,20 +17,18 @@ Product Route Profile :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github - :target: https://github.com/OCA/stock-logistics-warehouse/tree/17.0/product_route_profile + :target: https://github.com/OCA/stock-logistics-warehouse/tree/16.0/product_route_profile :alt: OCA/stock-logistics-warehouse .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-17-0/stock-logistics-warehouse-17-0-product_route_profile + :target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-product_route_profile :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/stock-logistics-warehouse&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-warehouse&target_branch=16.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -This module replaces the initial concept of route_ids with a new concept -of "route profile", coming with a company-specific and priority route -profile. +This module replaces the initial concept of route_ids with a new concept of "route profile", coming with a company-specific and priority route profile. **Table of contents** @@ -40,13 +38,15 @@ profile. Usage ===== -**Route profile** In Inventory > Configuration > Settings > Routes -Profiles - Create some Route profile depending on your needs +**Route profile** +In Inventory > Configuration > Settings > Routes Profiles +- Create some Route profile depending on your needs -**On product** On each template product, in inventory page, we can -select: - **Route Profile**: a default profile, common to all companies -- **Priority Route Profile**: a profile specific to each company and -priority if existing. + +**On product** +On each template product, in inventory page, we can select: +- **Route Profile**: a default profile, common to all companies +- **Priority Route Profile**: a profile specific to each company and priority if existing. Known issues / Roadmap ====================== @@ -59,7 +59,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. @@ -67,17 +67,17 @@ Credits ======= Authors -------- +~~~~~~~ * Akretion Contributors ------------- +~~~~~~~~~~~~ -- Kévin Roche +* Kévin Roche Maintainers ------------ +~~~~~~~~~~~ This module is maintained by the OCA. @@ -97,6 +97,6 @@ Current `maintainer `__: |maintainer-Kev-Roche| -This module is part of the `OCA/stock-logistics-warehouse `_ project on GitHub. +This module is part of the `OCA/stock-logistics-warehouse `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/product_route_profile/__manifest__.py b/product_route_profile/__manifest__.py index e3da6ad1b..9f5533dac 100644 --- a/product_route_profile/__manifest__.py +++ b/product_route_profile/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Product Route Profile", "summary": "Add Route profile concept on product", - "version": "17.0.1.0.0", + "version": "16.0.1.0.0", "category": "Warehouse", "website": "https://github.com/OCA/stock-logistics-warehouse", "author": "Akretion, Odoo Community Association (OCA)", diff --git a/product_route_profile/hooks.py b/product_route_profile/hooks.py index 77f5a20fa..4f21c9bb6 100644 --- a/product_route_profile/hooks.py +++ b/product_route_profile/hooks.py @@ -4,8 +4,10 @@ from collections import defaultdict +from odoo import SUPERUSER_ID, api -def post_init_hook(env): + +def post_init_hook(cr, registry): def get_profile(route_ids): route_ids = tuple(set(route_ids)) profile = route2profile.get(route_ids) @@ -22,12 +24,13 @@ def post_init_hook(env): route2profile[route_ids] = profile return profile + env = api.Environment(cr, SUPERUSER_ID, {}) query = """ SELECT product_id, array_agg(route_id) FROM stock_route_product group by product_id; """ - env.cr.execute(query) - results = env.cr.fetchall() + cr.execute(query) + results = cr.fetchall() route2profile = {} profile2product = defaultdict(lambda: env["product.template"]) for row in results: diff --git a/product_route_profile/pyproject.toml b/product_route_profile/pyproject.toml deleted file mode 100644 index 4231d0ccc..000000000 --- a/product_route_profile/pyproject.toml +++ /dev/null @@ -1,3 +0,0 @@ -[build-system] -requires = ["whool"] -build-backend = "whool.buildapi" diff --git a/product_route_profile/readme/CONTRIBUTORS.md b/product_route_profile/readme/CONTRIBUTORS.md deleted file mode 100644 index 3472566e0..000000000 --- a/product_route_profile/readme/CONTRIBUTORS.md +++ /dev/null @@ -1 +0,0 @@ -- Kévin Roche \<\> diff --git a/product_route_profile/readme/CONTRIBUTORS.rst b/product_route_profile/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..dcae277c8 --- /dev/null +++ b/product_route_profile/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Kévin Roche diff --git a/product_route_profile/readme/DESCRIPTION.md b/product_route_profile/readme/DESCRIPTION.rst similarity index 100% rename from product_route_profile/readme/DESCRIPTION.md rename to product_route_profile/readme/DESCRIPTION.rst diff --git a/product_route_profile/readme/ROADMAP.md b/product_route_profile/readme/ROADMAP.rst similarity index 100% rename from product_route_profile/readme/ROADMAP.md rename to product_route_profile/readme/ROADMAP.rst diff --git a/product_route_profile/readme/USAGE.md b/product_route_profile/readme/USAGE.md deleted file mode 100644 index 68d18ff4d..000000000 --- a/product_route_profile/readme/USAGE.md +++ /dev/null @@ -1,7 +0,0 @@ -**Route profile** In Inventory \> Configuration \> Settings \> Routes -Profiles - Create some Route profile depending on your needs - -**On product** On each template product, in inventory page, we can -select: - **Route Profile**: a default profile, common to all -companies - **Priority Route Profile**: a profile specific to each -company and priority if existing. diff --git a/product_route_profile/readme/USAGE.rst b/product_route_profile/readme/USAGE.rst new file mode 100644 index 000000000..c1c836fd1 --- /dev/null +++ b/product_route_profile/readme/USAGE.rst @@ -0,0 +1,9 @@ +**Route profile** +In Inventory > Configuration > Settings > Routes Profiles +- Create some Route profile depending on your needs + + +**On product** +On each template product, in inventory page, we can select: +- **Route Profile**: a default profile, common to all companies +- **Priority Route Profile**: a profile specific to each company and priority if existing. diff --git a/product_route_profile/static/description/index.html b/product_route_profile/static/description/index.html index 4b6eba3b2..d336f6fcc 100644 --- a/product_route_profile/static/description/index.html +++ b/product_route_profile/static/description/index.html @@ -8,11 +8,10 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ +:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. -Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +274,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code { margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: gray; } /* line numbers */ +pre.code .ln { color: grey; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +300,7 @@ span.option { span.pre { white-space: pre } -span.problematic, pre.problematic { +span.problematic { color: red } span.section-subtitle { @@ -369,10 +368,8 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:7cc88b31d2c501945a5fd15642253db4a45a0e955d04d5a2ba9d2ad131a9155d !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runboat

-

This module replaces the initial concept of route_ids with a new concept -of “route profile”, coming with a company-specific and priority route -profile.

+

Beta License: AGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runboat

+

This module replaces the initial concept of route_ids with a new concept of “route profile”, coming with a company-specific and priority route profile.

Table of contents

    @@ -389,12 +386,13 @@ profile.

Usage

-

Route profile In Inventory > Configuration > Settings > Routes -Profiles - Create some Route profile depending on your needs

-

On product On each template product, in inventory page, we can -select: - Route Profile: a default profile, common to all companies -- Priority Route Profile: a profile specific to each company and -priority if existing.

+

Route profile +In Inventory > Configuration > Settings > Routes Profiles +- Create some Route profile depending on your needs

+

On product +On each template product, in inventory page, we can select: +- Route Profile: a default profile, common to all companies +- Priority Route Profile: a profile specific to each company and priority if existing.

Known issues / Roadmap

@@ -405,7 +403,7 @@ priority if existing.

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.

@@ -425,15 +423,13 @@ If you spotted it first, help us to smash it by providing a detailed and welcome

Maintainers

This module is maintained by the OCA.

- -Odoo Community Association - +Odoo Community Association

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.

Current maintainer:

Kev-Roche

-

This module is part of the OCA/stock-logistics-warehouse project on GitHub.

+

This module is part of the OCA/stock-logistics-warehouse project on GitHub.

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

diff --git a/product_route_profile/views/product_template.xml b/product_route_profile/views/product_template.xml index a79d736a7..c66b89e25 100644 --- a/product_route_profile/views/product_template.xml +++ b/product_route_profile/views/product_template.xml @@ -20,11 +20,11 @@ diff --git a/setup/product_route_profile/odoo/addons/product_route_profile b/setup/product_route_profile/odoo/addons/product_route_profile new file mode 120000 index 000000000..6a327a5f2 --- /dev/null +++ b/setup/product_route_profile/odoo/addons/product_route_profile @@ -0,0 +1 @@ +../../../../product_route_profile \ No newline at end of file diff --git a/setup/product_route_profile/setup.py b/setup/product_route_profile/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/product_route_profile/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)