From a7b1f6d207ff4099c24a872425cf61816b851559 Mon Sep 17 00:00:00 2001 From: Telmo Santos Date: Thu, 4 Jul 2024 08:44:44 +0200 Subject: [PATCH 1/2] [ADD] stock_release_channel_depot --- .../odoo/addons/stock_release_channel_depot | 1 + setup/stock_release_channel_depot/setup.py | 6 + stock_release_channel_depot/README.rst | 74 +++ stock_release_channel_depot/__init__.py | 1 + stock_release_channel_depot/__manifest__.py | 16 + stock_release_channel_depot/l18n/fr.po | 22 + .../l18n/stock_release_channel_depot.pot | 32 ++ .../models/__init__.py | 2 + .../models/release_channel.py | 10 + .../models/stock_picking.py | 10 + .../readme/CONTRIBUTORS.rst | 2 + .../readme/DESCRIPTION.rst | 1 + .../static/description/index.html | 420 ++++++++++++++++++ .../views/stock_picking.xml | 24 + .../views/stock_release_channel_views.xml | 22 + 15 files changed, 643 insertions(+) create mode 120000 setup/stock_release_channel_depot/odoo/addons/stock_release_channel_depot create mode 100644 setup/stock_release_channel_depot/setup.py create mode 100644 stock_release_channel_depot/README.rst create mode 100644 stock_release_channel_depot/__init__.py create mode 100644 stock_release_channel_depot/__manifest__.py create mode 100644 stock_release_channel_depot/l18n/fr.po create mode 100644 stock_release_channel_depot/l18n/stock_release_channel_depot.pot create mode 100644 stock_release_channel_depot/models/__init__.py create mode 100644 stock_release_channel_depot/models/release_channel.py create mode 100644 stock_release_channel_depot/models/stock_picking.py create mode 100644 stock_release_channel_depot/readme/CONTRIBUTORS.rst create mode 100644 stock_release_channel_depot/readme/DESCRIPTION.rst create mode 100644 stock_release_channel_depot/static/description/index.html create mode 100644 stock_release_channel_depot/views/stock_picking.xml create mode 100644 stock_release_channel_depot/views/stock_release_channel_views.xml diff --git a/setup/stock_release_channel_depot/odoo/addons/stock_release_channel_depot b/setup/stock_release_channel_depot/odoo/addons/stock_release_channel_depot new file mode 120000 index 0000000000..6aabdb91c3 --- /dev/null +++ b/setup/stock_release_channel_depot/odoo/addons/stock_release_channel_depot @@ -0,0 +1 @@ +../../../../stock_release_channel_depot \ No newline at end of file diff --git a/setup/stock_release_channel_depot/setup.py b/setup/stock_release_channel_depot/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/stock_release_channel_depot/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/stock_release_channel_depot/README.rst b/stock_release_channel_depot/README.rst new file mode 100644 index 0000000000..bd1e070daa --- /dev/null +++ b/stock_release_channel_depot/README.rst @@ -0,0 +1,74 @@ +=========================== +Stock Release Channel Depot +=========================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fwms-lightgray.png?logo=github + :target: https://github.com/OCA/wms/tree/16.0/stock_release_channel_depot + :alt: OCA/wms +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/wms-16-0/wms-16-0-stock_release_channel_depot + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/wms&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Add partner depot to stock release channel + +**Table of contents** + +.. contents:: + :local: + +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 smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Camptocamp + +Contributors +~~~~~~~~~~~~ + +* Telmo Santos +* Jacques-Etienne Baudoux + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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/wms `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_release_channel_depot/__init__.py b/stock_release_channel_depot/__init__.py new file mode 100644 index 0000000000..0650744f6b --- /dev/null +++ b/stock_release_channel_depot/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/stock_release_channel_depot/__manifest__.py b/stock_release_channel_depot/__manifest__.py new file mode 100644 index 0000000000..3f62523fd0 --- /dev/null +++ b/stock_release_channel_depot/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2024 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + "name": "Stock Release Channel Depot", + "summary": """This module allows users to add partner depot to stock release channel.""", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "author": "Camptocamp, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/wms", + "depends": ["stock_depot", "stock_release_channel"], + "data": [ + "views/stock_release_channel_views.xml", + "views/stock_picking.xml", + ], +} diff --git a/stock_release_channel_depot/l18n/fr.po b/stock_release_channel_depot/l18n/fr.po new file mode 100644 index 0000000000..540913f044 --- /dev/null +++ b/stock_release_channel_depot/l18n/fr.po @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_release_channel_depot +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-04 06:13+0000\n" +"PO-Revision-Date: 2024-07-04 06:13+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: stock_release_channel_depot +#: model:ir.model.fields,field_description:stock_release_channel_depot.field_stock_picking__depot_id +#: model:ir.model.fields,field_description:stock_release_channel_depot.field_stock_release_channel__depot_id +msgid "Depot" +msgstr "Dépôt" diff --git a/stock_release_channel_depot/l18n/stock_release_channel_depot.pot b/stock_release_channel_depot/l18n/stock_release_channel_depot.pot new file mode 100644 index 0000000000..e3f20cbb74 --- /dev/null +++ b/stock_release_channel_depot/l18n/stock_release_channel_depot.pot @@ -0,0 +1,32 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_release_channel_depot +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-07-04 06:13+0000\n" +"PO-Revision-Date: 2024-07-04 06:13+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: stock_release_channel_depot +#: model:ir.model.fields,field_description:stock_release_channel_depot.field_stock_picking__depot_id +#: model:ir.model.fields,field_description:stock_release_channel_depot.field_stock_release_channel__depot_id +msgid "Depot" +msgstr "" + +#. module: stock_release_channel_depot +#: model:ir.model,name:stock_release_channel_depot.model_stock_picking +msgid "Stock Picking" +msgstr "" + +#. module: stock_release_channel_depot +#: model:ir.model,name:stock_release_channel_depot.model_stock_release_channel +msgid "Stock Release Channels" +msgstr "" diff --git a/stock_release_channel_depot/models/__init__.py b/stock_release_channel_depot/models/__init__.py new file mode 100644 index 0000000000..56916daf06 --- /dev/null +++ b/stock_release_channel_depot/models/__init__.py @@ -0,0 +1,2 @@ +from . import release_channel +from . import stock_picking diff --git a/stock_release_channel_depot/models/release_channel.py b/stock_release_channel_depot/models/release_channel.py new file mode 100644 index 0000000000..a04bbd67d3 --- /dev/null +++ b/stock_release_channel_depot/models/release_channel.py @@ -0,0 +1,10 @@ +# Copyright 2024 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class StockReleaseChannel(models.Model): + _inherit = "stock.release.channel" + + depot_id = fields.Many2one("stock.depot") diff --git a/stock_release_channel_depot/models/stock_picking.py b/stock_release_channel_depot/models/stock_picking.py new file mode 100644 index 0000000000..71633832c8 --- /dev/null +++ b/stock_release_channel_depot/models/stock_picking.py @@ -0,0 +1,10 @@ +# Copyright 2024 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class StockPicking(models.Model): + _inherit = "stock.picking" + + depot_id = fields.Many2one(related="release_channel_id.depot_id", store=True) diff --git a/stock_release_channel_depot/readme/CONTRIBUTORS.rst b/stock_release_channel_depot/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..22612a2500 --- /dev/null +++ b/stock_release_channel_depot/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Telmo Santos +* Jacques-Etienne Baudoux diff --git a/stock_release_channel_depot/readme/DESCRIPTION.rst b/stock_release_channel_depot/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..1e578ec7e0 --- /dev/null +++ b/stock_release_channel_depot/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +Add partner depot to stock release channel diff --git a/stock_release_channel_depot/static/description/index.html b/stock_release_channel_depot/static/description/index.html new file mode 100644 index 0000000000..7493391061 --- /dev/null +++ b/stock_release_channel_depot/static/description/index.html @@ -0,0 +1,420 @@ + + + + + + +Stock Release Channel Depot + + + +
+

Stock Release Channel Depot

+ + +

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

+

Add partner depot to stock release channel

+

Table of contents

+ +
+

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 smashing it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Camptocamp
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+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.

+

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

+

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

+
+
+
+ + diff --git a/stock_release_channel_depot/views/stock_picking.xml b/stock_release_channel_depot/views/stock_picking.xml new file mode 100644 index 0000000000..8f632c18c2 --- /dev/null +++ b/stock_release_channel_depot/views/stock_picking.xml @@ -0,0 +1,24 @@ + + + + stock.picking.form (in stock_release_channel_depot) + stock.picking + + + + + + + + + + stock.picking.delivery.tree + stock.picking + + + + + + + + diff --git a/stock_release_channel_depot/views/stock_release_channel_views.xml b/stock_release_channel_depot/views/stock_release_channel_views.xml new file mode 100644 index 0000000000..3d9086f244 --- /dev/null +++ b/stock_release_channel_depot/views/stock_release_channel_views.xml @@ -0,0 +1,22 @@ + + + + + stock.release.channel.form (in stock_release_channel_depot) + stock.release.channel + + + + + + + + + + + From d8d4dd2fc42717abeb7b2437479b6a401633500f Mon Sep 17 00:00:00 2001 From: Telmo Santos Date: Thu, 4 Jul 2024 13:21:53 +0200 Subject: [PATCH 2/2] stock_release_channel_depot test requirements --- test-requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test-requirements.txt b/test-requirements.txt index 689482e20d..82f5d654f2 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,2 +1,3 @@ vcrpy-unittest odoo_test_helper +odoo-addon-stock-depot @ git+https://github.com/OCA/stock-logistics-transport.git@refs/pull/131/head#subdirectory=setup/stock_depot