diff --git a/setup/shopfloor_purchase_base/odoo/addons/shopfloor_purchase_base b/setup/shopfloor_purchase_base/odoo/addons/shopfloor_purchase_base new file mode 120000 index 00000000000..436ad499129 --- /dev/null +++ b/setup/shopfloor_purchase_base/odoo/addons/shopfloor_purchase_base @@ -0,0 +1 @@ +../../../../shopfloor_purchase_base \ No newline at end of file diff --git a/setup/shopfloor_purchase_base/setup.py b/setup/shopfloor_purchase_base/setup.py new file mode 100644 index 00000000000..28c57bb6403 --- /dev/null +++ b/setup/shopfloor_purchase_base/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/shopfloor_reception_purchase_partner_ref/odoo/addons/shopfloor_reception_purchase_partner_ref b/setup/shopfloor_reception_purchase_partner_ref/odoo/addons/shopfloor_reception_purchase_partner_ref new file mode 120000 index 00000000000..fa30757d850 --- /dev/null +++ b/setup/shopfloor_reception_purchase_partner_ref/odoo/addons/shopfloor_reception_purchase_partner_ref @@ -0,0 +1 @@ +../../../../shopfloor_reception_purchase_partner_ref \ No newline at end of file diff --git a/setup/shopfloor_reception_purchase_partner_ref/setup.py b/setup/shopfloor_reception_purchase_partner_ref/setup.py new file mode 100644 index 00000000000..28c57bb6403 --- /dev/null +++ b/setup/shopfloor_reception_purchase_partner_ref/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/setup/shopfloor_reception_purchase_partner_ref_mobile/odoo/addons/shopfloor_reception_purchase_partner_ref_mobile b/setup/shopfloor_reception_purchase_partner_ref_mobile/odoo/addons/shopfloor_reception_purchase_partner_ref_mobile new file mode 120000 index 00000000000..2b0ae97b9bb --- /dev/null +++ b/setup/shopfloor_reception_purchase_partner_ref_mobile/odoo/addons/shopfloor_reception_purchase_partner_ref_mobile @@ -0,0 +1 @@ +../../../../shopfloor_reception_purchase_partner_ref_mobile \ No newline at end of file diff --git a/setup/shopfloor_reception_purchase_partner_ref_mobile/setup.py b/setup/shopfloor_reception_purchase_partner_ref_mobile/setup.py new file mode 100644 index 00000000000..28c57bb6403 --- /dev/null +++ b/setup/shopfloor_reception_purchase_partner_ref_mobile/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/shopfloor/actions/data.py b/shopfloor/actions/data.py index 10f893a9d1f..be23a0f0565 100644 --- a/shopfloor/actions/data.py +++ b/shopfloor/actions/data.py @@ -40,8 +40,7 @@ def _location_parser(self): ("barcode", lambda rec, fname: rec[fname] if rec[fname] else rec.name), ] - @ensure_model("stock.picking") - def picking(self, record, **kw): + def _get_picking_parser(self, record, **kw): parser = self._picking_parser # progress is a heavy computed field, # and it may reduce performance significatively @@ -49,7 +48,11 @@ def picking(self, record, **kw): # Thus, we make it optional. if "with_progress" in kw: parser.append("progress") - return self._jsonify(record, parser, **kw) + return parser + + @ensure_model("stock.picking") + def picking(self, record, **kw): + return self._jsonify(record, self._get_picking_parser(record, **kw), **kw) def pickings(self, record, **kw): return self.picking(record, multi=True) diff --git a/shopfloor_purchase_base/README.rst b/shopfloor_purchase_base/README.rst new file mode 100644 index 00000000000..57aff1e5948 --- /dev/null +++ b/shopfloor_purchase_base/README.rst @@ -0,0 +1,81 @@ +======================= +Shopfloor Purchase Base +======================= + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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/14.0/shopfloor_purchase_base + :alt: OCA/wms +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor_purchase_base + :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=14.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This is a glue module between `shopfloor` and `l10n_eu_product_adr` + +**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 +~~~~~~~ + +* MT Software + +Contributors +~~~~~~~~~~~~ + +* Matthieu Méquignon + +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. + +.. |maintainer-mt-software-de| image:: https://github.com/mt-software-de.png?size=40px + :target: https://github.com/mt-software-de + :alt: mt-software-de + +Current `maintainer `__: + +|maintainer-mt-software-de| + +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/shopfloor_purchase_base/__init__.py b/shopfloor_purchase_base/__init__.py new file mode 100644 index 00000000000..f5fe63aaf72 --- /dev/null +++ b/shopfloor_purchase_base/__init__.py @@ -0,0 +1 @@ +from . import actions diff --git a/shopfloor_purchase_base/__manifest__.py b/shopfloor_purchase_base/__manifest__.py new file mode 100644 index 00000000000..ce07fd4b7f8 --- /dev/null +++ b/shopfloor_purchase_base/__manifest__.py @@ -0,0 +1,17 @@ +# Copyright 2023 Michael Tietz (MT Software) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) +{ + "name": "Shopfloor Purchase Base", + "summary": "Module for Shopfloor Purchase Data connection", + "version": "14.0.1.0.0", + "category": "Inventory", + "website": "https://github.com/OCA/wms", + "author": "MT Software, Odoo Community Association (OCA)", + "maintainers": ["mt-software-de"], + "license": "AGPL-3", + "depends": [ + "shopfloor", + "purchase", + ], + "data": [], +} diff --git a/shopfloor_purchase_base/actions/__init__.py b/shopfloor_purchase_base/actions/__init__.py new file mode 100644 index 00000000000..0049231d56c --- /dev/null +++ b/shopfloor_purchase_base/actions/__init__.py @@ -0,0 +1,2 @@ +from . import data +from . import schema diff --git a/shopfloor_purchase_base/actions/data.py b/shopfloor_purchase_base/actions/data.py new file mode 100644 index 00000000000..701b3a5bb33 --- /dev/null +++ b/shopfloor_purchase_base/actions/data.py @@ -0,0 +1,28 @@ +# Copyright 2023 Michael Tietz (MT Software) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from odoo.addons.component.core import Component +from odoo.addons.shopfloor_base.utils import ensure_model + + +class DataAction(Component): + _inherit = "shopfloor.data.action" + + def _get_purchase_order_parser(self, **kw): + res = self._simple_record_parser() + res += [ + "partner_ref", + ] + return res + + @ensure_model("purchase.order") + def purchase_order(self, record, **kw): + parser = self._get_purchase_order_parser(**kw) + return self._jsonify(record, parser, **kw) + + def _get_picking_parser(self, record, **kw): + parser = super()._get_picking_parser(record, **kw) + if kw.get("with_purchase_order"): + parser.append( + ("purchase_id:purchase_order", self._get_purchase_order_parser(**kw)) + ) + return parser diff --git a/shopfloor_purchase_base/actions/schema.py b/shopfloor_purchase_base/actions/schema.py new file mode 100644 index 00000000000..590d6ebae90 --- /dev/null +++ b/shopfloor_purchase_base/actions/schema.py @@ -0,0 +1,25 @@ +# Copyright 2023 Michael Tietz (MT Software) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +from odoo.addons.component.core import Component + + +class ShopfloorSchemaAction(Component): + _inherit = "shopfloor.schema.action" + + def purchase_order(self): + return { + "id": {"required": True, "type": "integer"}, + "name": {"type": "string", "nullable": False, "required": True}, + "partner_ref": {"type": "string", "nullable": True, "required": False}, + } + + def picking(self, **kw): + res = super().picking(**kw) + res.update( + { + "purchase_order": self._schema_dict_of( + self.purchase_order(), required=False + ) + } + ) + return res diff --git a/shopfloor_purchase_base/readme/CONTRIBUTORS.rst b/shopfloor_purchase_base/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..446fd1d5769 --- /dev/null +++ b/shopfloor_purchase_base/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Michael Tietz (MT Software) diff --git a/shopfloor_purchase_base/readme/DESCRIPTION.rst b/shopfloor_purchase_base/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..9d3b80419b6 --- /dev/null +++ b/shopfloor_purchase_base/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This is a glue module between `shopfloor` and `l10n_eu_product_adr` diff --git a/shopfloor_purchase_base/static/description/icon.png b/shopfloor_purchase_base/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/shopfloor_purchase_base/static/description/icon.png differ diff --git a/shopfloor_purchase_base/static/description/index.html b/shopfloor_purchase_base/static/description/index.html new file mode 100644 index 00000000000..4e06cc9cc7a --- /dev/null +++ b/shopfloor_purchase_base/static/description/index.html @@ -0,0 +1,421 @@ + + + + + + +Shopfloor Purchase Base + + + +
+

Shopfloor Purchase Base

+ + +

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

+

This is a glue module between shopfloor and l10n_eu_product_adr

+

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

+
    +
  • MT Software
  • +
+
+
+

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.

+

Current maintainer:

+

mt-software-de

+

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/shopfloor_purchase_base/tests/__init__.py b/shopfloor_purchase_base/tests/__init__.py new file mode 100644 index 00000000000..c6a5342420e --- /dev/null +++ b/shopfloor_purchase_base/tests/__init__.py @@ -0,0 +1 @@ +from . import test_actions_data diff --git a/shopfloor_purchase_base/tests/test_actions_data.py b/shopfloor_purchase_base/tests/test_actions_data.py new file mode 100644 index 00000000000..a8389b07aa1 --- /dev/null +++ b/shopfloor_purchase_base/tests/test_actions_data.py @@ -0,0 +1,29 @@ +# Copyright 2023 Michael Tietz (MT Software) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) +from odoo.addons.shopfloor.tests.test_actions_data_base import ActionsDataCaseBase + + +class ActionsDataPurchase(ActionsDataCaseBase): + def test_data_purchase_order(self): + picking = self.env["stock.picking"].search( + [("purchase_id", "!=", False)], limit=1 + ) + purchase = picking.purchase_id + purchase.sudo().partner_ref = "test" + expected_purchase_data = { + "id": purchase.id, + "name": purchase.name, + "partner_ref": purchase.partner_ref, + } + purchase_data = self.data.purchase_order(purchase) + self.assertDictEqual(expected_purchase_data, purchase_data) + self.assert_schema(self.schema.purchase_order(), purchase_data) + data = self.data.picking(picking) + self.assertTrue("purchase_order" not in data) + expected_picking_data = data + expected_picking_data.update({"purchase_order": purchase_data}) + self.assert_schema(self.schema.picking(), expected_picking_data) + self.assertDictEqual( + expected_picking_data, + self.data.picking(picking, with_purchase_order=True), + ) diff --git a/shopfloor_reception/services/reception.py b/shopfloor_reception/services/reception.py index 107ae5e6973..ce20c4eb3b3 100644 --- a/shopfloor_reception/services/reception.py +++ b/shopfloor_reception/services/reception.py @@ -693,8 +693,10 @@ def _assign_user_to_line(self, line): # DATA METHODS - def _data_for_stock_picking(self, picking, with_lines=False): - data = self.data.picking(picking, with_progress=True) + def _data_for_stock_picking(self, picking, with_lines=False, **kw): + if "with_progress" not in kw: + kw["with_progress"] = True + data = self.data.picking(picking, **kw) if with_lines: data.update({"moves": self._data_for_moves(picking.move_lines)}) return data diff --git a/shopfloor_reception_purchase_partner_ref/README.rst b/shopfloor_reception_purchase_partner_ref/README.rst new file mode 100644 index 00000000000..cdabcfc070e --- /dev/null +++ b/shopfloor_reception_purchase_partner_ref/README.rst @@ -0,0 +1,82 @@ +======================================== +Shopfloor Reception Purchase Partner Ref +======================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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/14.0/shopfloor_reception_purchase_partner_ref + :alt: OCA/wms +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor_reception_purchase_partner_ref + :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=14.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Shopfloor extension of the reception scenario. +Show the purchase.order partner_ref field on the picking views + +**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 +~~~~~~~ + +* MT Software + +Contributors +~~~~~~~~~~~~ + +* Michael Tietz (MT Software) + +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. + +.. |maintainer-mt-software-de| image:: https://github.com/mt-software-de.png?size=40px + :target: https://github.com/mt-software-de + :alt: mt-software-de + +Current `maintainer `__: + +|maintainer-mt-software-de| + +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/shopfloor_reception_purchase_partner_ref/__init__.py b/shopfloor_reception_purchase_partner_ref/__init__.py new file mode 100644 index 00000000000..99464a7510b --- /dev/null +++ b/shopfloor_reception_purchase_partner_ref/__init__.py @@ -0,0 +1 @@ +from . import services diff --git a/shopfloor_reception_purchase_partner_ref/__manifest__.py b/shopfloor_reception_purchase_partner_ref/__manifest__.py new file mode 100644 index 00000000000..828c6956537 --- /dev/null +++ b/shopfloor_reception_purchase_partner_ref/__manifest__.py @@ -0,0 +1,11 @@ +{ + "name": "Shopfloor Reception Purchase Partner Ref", + "summary": "Adds the purchase partner ref field to shopfloor reception scenario", + "version": "14.0.1.0.0", + "category": "Inventory", + "website": "https://github.com/OCA/wms", + "author": "MT Software, Odoo Community Association (OCA)", + "maintainers": ["mt-software-de"], + "license": "AGPL-3", + "depends": ["shopfloor_purchase_base", "shopfloor_reception", "purchase_stock"], +} diff --git a/shopfloor_reception_purchase_partner_ref/readme/CONTRIBUTORS.rst b/shopfloor_reception_purchase_partner_ref/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..446fd1d5769 --- /dev/null +++ b/shopfloor_reception_purchase_partner_ref/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Michael Tietz (MT Software) diff --git a/shopfloor_reception_purchase_partner_ref/readme/DESCRIPTION.rst b/shopfloor_reception_purchase_partner_ref/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..640124599b7 --- /dev/null +++ b/shopfloor_reception_purchase_partner_ref/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +Shopfloor extension of the reception scenario. +Show the purchase.order partner_ref field on the picking views diff --git a/shopfloor_reception_purchase_partner_ref/services/__init__.py b/shopfloor_reception_purchase_partner_ref/services/__init__.py new file mode 100644 index 00000000000..aa19bba8ce4 --- /dev/null +++ b/shopfloor_reception_purchase_partner_ref/services/__init__.py @@ -0,0 +1 @@ +from . import reception diff --git a/shopfloor_reception_purchase_partner_ref/services/reception.py b/shopfloor_reception_purchase_partner_ref/services/reception.py new file mode 100644 index 00000000000..94c6236d3b8 --- /dev/null +++ b/shopfloor_reception_purchase_partner_ref/services/reception.py @@ -0,0 +1,12 @@ +# Copyright 2023 Michael Tietz (MT Software) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) +from odoo.addons.component.core import Component + + +class Reception(Component): + _inherit = "shopfloor.reception" + + def _data_for_stock_picking(self, picking, with_lines=False, **kw): + if "with_purchase_order" not in kw: + kw["with_purchase_order"] = True + return super()._data_for_stock_picking(picking, with_lines, **kw) diff --git a/shopfloor_reception_purchase_partner_ref/static/description/index.html b/shopfloor_reception_purchase_partner_ref/static/description/index.html new file mode 100644 index 00000000000..26a20d8ba10 --- /dev/null +++ b/shopfloor_reception_purchase_partner_ref/static/description/index.html @@ -0,0 +1,422 @@ + + + + + + +Shopfloor Reception Purchase Partner Ref + + + +
+

Shopfloor Reception Purchase Partner Ref

+ + +

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

+

Shopfloor extension of the reception scenario. +Show the purchase.order partner_ref field on the picking views

+

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

+
    +
  • MT Software
  • +
+
+
+

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.

+

Current maintainer:

+

mt-software-de

+

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/shopfloor_reception_purchase_partner_ref/tests/__init__.py b/shopfloor_reception_purchase_partner_ref/tests/__init__.py new file mode 100644 index 00000000000..6ed6a549ad6 --- /dev/null +++ b/shopfloor_reception_purchase_partner_ref/tests/__init__.py @@ -0,0 +1 @@ +from . import test_data diff --git a/shopfloor_reception_purchase_partner_ref/tests/test_data.py b/shopfloor_reception_purchase_partner_ref/tests/test_data.py new file mode 100644 index 00000000000..9bcfdbfd986 --- /dev/null +++ b/shopfloor_reception_purchase_partner_ref/tests/test_data.py @@ -0,0 +1,13 @@ +# Copyright 2023 Michael Tietz (MT Software) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) +from odoo.addons.shopfloor_reception.tests.common import CommonCase + + +class TestDataForPicking(CommonCase): + def test_data_for_picking(self): + picking = self._create_picking() + data = self.service._data_for_stock_picking(picking) + expected = self.data.picking( + picking, **{"with_progress": True, "with_purchase_order": True} + ) + self.assertDictEqual(expected, data) diff --git a/shopfloor_reception_purchase_partner_ref_mobile/README.rst b/shopfloor_reception_purchase_partner_ref_mobile/README.rst new file mode 100644 index 00000000000..7c1dc763476 --- /dev/null +++ b/shopfloor_reception_purchase_partner_ref_mobile/README.rst @@ -0,0 +1,82 @@ +=============================================== +Shopfloor Reception Purchase Partner Ref Mobile +=============================================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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/14.0/shopfloor_reception_purchase_partner_ref_mobile + :alt: OCA/wms +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-shopfloor_reception_purchase_partner_ref_mobile + :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=14.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Shopfloor extensio of the reception scenario. +Show the purchase.order partner_ref field on the picking views + +**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 +~~~~~~~ + +* MT Software + +Contributors +~~~~~~~~~~~~ + +* Michael Tietz (MT Software) + +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. + +.. |maintainer-mt-software-de| image:: https://github.com/mt-software-de.png?size=40px + :target: https://github.com/mt-software-de + :alt: mt-software-de + +Current `maintainer `__: + +|maintainer-mt-software-de| + +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/shopfloor_reception_purchase_partner_ref_mobile/__init__.py b/shopfloor_reception_purchase_partner_ref_mobile/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/shopfloor_reception_purchase_partner_ref_mobile/__manifest__.py b/shopfloor_reception_purchase_partner_ref_mobile/__manifest__.py new file mode 100644 index 00000000000..79e048c7973 --- /dev/null +++ b/shopfloor_reception_purchase_partner_ref_mobile/__manifest__.py @@ -0,0 +1,16 @@ +{ + "name": "Shopfloor Reception Purchase Partner Ref Mobile", + "summary": "Adds the purchase partner ref field to shopfloor reception scenario", + "version": "14.0.1.0.0", + "category": "Inventory", + "website": "https://github.com/OCA/wms", + "author": "MT Software, Odoo Community Association (OCA)", + "maintainers": ["mt-software-de"], + "license": "AGPL-3", + "depends": [ + "shopfloor_reception_purchase_partner_ref", + "shopfloor_reception_mobile", + ], + "data": ["templates/assets.xml"], + "auto_install": True, +} diff --git a/shopfloor_reception_purchase_partner_ref_mobile/readme/CONTRIBUTORS.rst b/shopfloor_reception_purchase_partner_ref_mobile/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..446fd1d5769 --- /dev/null +++ b/shopfloor_reception_purchase_partner_ref_mobile/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Michael Tietz (MT Software) diff --git a/shopfloor_reception_purchase_partner_ref_mobile/readme/DESCRIPTION.rst b/shopfloor_reception_purchase_partner_ref_mobile/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..2060028106f --- /dev/null +++ b/shopfloor_reception_purchase_partner_ref_mobile/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +Shopfloor extensio of the reception scenario. +Show the purchase.order partner_ref field on the picking views diff --git a/shopfloor_reception_purchase_partner_ref_mobile/static/description/index.html b/shopfloor_reception_purchase_partner_ref_mobile/static/description/index.html new file mode 100644 index 00000000000..1847c8edccc --- /dev/null +++ b/shopfloor_reception_purchase_partner_ref_mobile/static/description/index.html @@ -0,0 +1,422 @@ + + + + + + +Shopfloor Reception Purchase Partner Ref Mobile + + + +
+

Shopfloor Reception Purchase Partner Ref Mobile

+ + +

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

+

Shopfloor extensio of the reception scenario. +Show the purchase.order partner_ref field on the picking views

+

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

+
    +
  • MT Software
  • +
+
+
+

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.

+

Current maintainer:

+

mt-software-de

+

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/shopfloor_reception_purchase_partner_ref_mobile/static/src/scenario/reception.js b/shopfloor_reception_purchase_partner_ref_mobile/static/src/scenario/reception.js new file mode 100644 index 00000000000..476c3c1c050 --- /dev/null +++ b/shopfloor_reception_purchase_partner_ref_mobile/static/src/scenario/reception.js @@ -0,0 +1,32 @@ +/** + * Copyright 2023 Michael Tietz (MT Software) + * License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + */ + +import {process_registry} from "/shopfloor_mobile_base/static/wms/src/services/process_registry.js"; + +const reception_scenario = process_registry.get("reception"); +const select_dest_package_display_name_values = + reception_scenario.component.methods.select_dest_package_display_name_values; +const picking_display_fields = + reception_scenario.component.methods.picking_display_fields; + +const ReceptionPartnerRef = process_registry.extend("reception", { + "methods.select_dest_package_display_name_values": function (rec) { + var values = select_dest_package_display_name_values.bind(this)(rec); + if (rec.purchase_order.partner_ref) { + values.splice(1, 0, rec.purchase_order.partner_ref); + } + return values; + }, + "methods.picking_display_fields": function () { + var fields = picking_display_fields.bind(this)(); + fields.splice(1, 0, { + path: "purchase_order.partner_ref", + label: "Vendor Reference", + }); + return fields; + }, +}); + +process_registry.replace("reception", ReceptionPartnerRef); diff --git a/shopfloor_reception_purchase_partner_ref_mobile/templates/assets.xml b/shopfloor_reception_purchase_partner_ref_mobile/templates/assets.xml new file mode 100644 index 00000000000..552e8ab01a2 --- /dev/null +++ b/shopfloor_reception_purchase_partner_ref_mobile/templates/assets.xml @@ -0,0 +1,20 @@ + + + +