diff --git a/shopfloor_delivery_shipment/README.rst b/shopfloor_delivery_shipment/README.rst index ab6492f935..bb99df6145 100644 --- a/shopfloor_delivery_shipment/README.rst +++ b/shopfloor_delivery_shipment/README.rst @@ -17,13 +17,13 @@ Shopfloor - Delivery with shipment advice :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_delivery_shipment + :target: https://github.com/OCA/wms/tree/16.0/shopfloor_delivery_shipment :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_delivery_shipment + :target: https://translation.odoo-community.org/projects/wms-16-0/wms-16-0-shopfloor_delivery_shipment :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/wms&target_branch=14.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/wms&target_branch=16.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -46,7 +46,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. @@ -101,6 +101,6 @@ Current `maintainers `__: |maintainer-sebalix| |maintainer-TDu| -This module is part of the `OCA/wms `_ project on GitHub. +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_delivery_shipment/__manifest__.py b/shopfloor_delivery_shipment/__manifest__.py index aea717b6b5..ae5f3ed1cf 100644 --- a/shopfloor_delivery_shipment/__manifest__.py +++ b/shopfloor_delivery_shipment/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Shopfloor - Delivery with shipment advice", "summary": "Manage delivery process with shipment advices", - "version": "14.0.1.4.2", + "version": "16.0.1.0.0", "development_status": "Alpha", "category": "Inventory", "website": "https://github.com/OCA/wms", diff --git a/shopfloor_delivery_shipment/actions/message.py b/shopfloor_delivery_shipment/actions/message.py index d779d7bdaf..114c18318b 100644 --- a/shopfloor_delivery_shipment/actions/message.py +++ b/shopfloor_delivery_shipment/actions/message.py @@ -26,91 +26,131 @@ def scan_dock_again_to_confirm(self, dock): def picking_not_planned_in_shipment(self, picking, shipment_advice): return { "message_type": "error", - "body": _("Transfer {} has not been planned in the shipment {}.").format( - picking.name, - shipment_advice.name, - ), + "body": _( + "Transfer %(picking_name)s has not been planned in the shipment " + "%(shipment_name)s." + ) + % { + "picking_name": picking.name, + "shipment_name": shipment_advice.name, + }, } def package_not_planned_in_shipment(self, package, shipment_advice): return { "message_type": "error", - "body": _("Package {} has not been planned in the shipment {}.").format( - package.name, - shipment_advice.name, - ), + "body": _( + "Package %(package_name)s has not been planned in the shipment " + "%(shipment_name)s." + ) + % { + "package_name": package.name, + "shipment_name": shipment_advice.name, + }, } def lot_not_planned_in_shipment(self, lot, shipment_advice): return { "message_type": "error", - "body": _("Lot {} has not been planned in the shipment {}.").format( - lot.name, - shipment_advice.name, - ), + "body": _( + "Lot %(lot_name)s has not been planned in the shipment " + "%(shipment_name)s." + ) + % { + "lot_name": lot.name, + "shipment_name": shipment_advice.name, + }, } def product_not_planned_in_shipment(self, product, shipment_advice): return { "message_type": "error", - "body": _("Product {} has not been planned in the shipment {}.").format( - product.barcode, - shipment_advice.name, - ), + "body": _( + "Product %(product_barcode)s has not been planned in the shipment " + "%(shipment_name)s." + ) + % { + "product_barcode": product.barcode, + "shipment_name": shipment_advice.name, + }, } def unable_to_load_package_in_shipment(self, package, shipment_advice): return { "message_type": "error", - "body": _("Package {} can not been loaded in the shipment {}.").format( - package.name, - shipment_advice.name, - ), + "body": _( + "Package %(package_name)s can not been loaded in the shipment " + "%(shipment_name)s." + ) + % { + "package_name": package.name, + "shipment_name": shipment_advice.name, + }, } def unable_to_load_lot_in_shipment(self, lot, shipment_advice): return { "message_type": "error", - "body": _("Lot {} can not been loaded in the shipment {}.").format( - lot.name, - shipment_advice.name, - ), + "body": _( + "Lot %(lot_name)s can not been loaded in the shipment " + "%(shipment_name)s." + ) + % { + "lot_name": lot.name, + "shipment_name": shipment_advice.name, + }, } def unable_to_load_product_in_shipment(self, product, shipment_advice): return { "message_type": "error", - "body": _("Product {} can not been loaded in the shipment {}.").format( - product.barcode, - shipment_advice.name, - ), + "body": _( + "Product %(product_barcode)s can not been loaded in the shipment " + "%(shipment_name)s." + ) + % { + "product_barcode": product.barcode, + "shipment_name": shipment_advice.name, + }, } def package_already_loaded_in_shipment(self, package, shipment_advice): return { "message_type": "warning", - "body": _("Package {} is already loaded in the shipment {}.").format( - package.name, - shipment_advice.name, - ), + "body": _( + "Package %(package_name)s is already loaded in the shipment " + "%(shipment_name)s." + ) + % { + "package_name": package.name, + "shipment_name": shipment_advice.name, + }, } def lot_already_loaded_in_shipment(self, lot, shipment_advice): return { "message_type": "warning", - "body": _("Lot {} is already loaded in the shipment {}.").format( - lot.name, - shipment_advice.name, - ), + "body": _( + "Lot %(lot_name)s is already loaded in the shipment " + "%(shipment_name)s." + ) + % { + "lot_name": lot.name, + "shipment_name": shipment_advice.name, + }, } def product_already_loaded_in_shipment(self, product, shipment_advice): return { "message_type": "warning", - "body": _("Product {} is already loaded in the shipment {}.").format( - product.name, - shipment_advice.name, - ), + "body": _( + "Product %(product_name)s is already loaded in the shipment " + "%(shipment_name)s." + ) + % { + "product_name": product.name, + "shipment_name": shipment_advice.name, + }, } def carrier_not_allowed_by_shipment(self, picking): diff --git a/shopfloor_delivery_shipment/static/description/index.html b/shopfloor_delivery_shipment/static/description/index.html index 4fb02fa0ae..1b0897c3ba 100644 --- a/shopfloor_delivery_shipment/static/description/index.html +++ b/shopfloor_delivery_shipment/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z 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 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* 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 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -369,7 +369,7 @@

Shopfloor - Delivery with shipment advice

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:92f864184d8b226015d3bf530f5fe6b5380037660e0bd2db36c22839cc32b24a !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

Shopfloor scenario to manage the delivery process based on shipment advices.

Important

@@ -396,7 +396,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.

@@ -431,13 +431,15 @@

Other credits

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 maintainers:

sebalix TDu

-

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

+

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_delivery_shipment/tests/test_delivery_shipment_base.py b/shopfloor_delivery_shipment/tests/test_delivery_shipment_base.py index 67b023792a..6e28c80ae8 100644 --- a/shopfloor_delivery_shipment/tests/test_delivery_shipment_base.py +++ b/shopfloor_delivery_shipment/tests/test_delivery_shipment_base.py @@ -8,7 +8,7 @@ class DeliveryShipmentCommonCase(common.CommonCase): @classmethod def setUpClassVars(cls, *args, **kwargs): - super().setUpClassVars(*args, **kwargs) + result = super().setUpClassVars(*args, **kwargs) cls.menu = cls.env.ref( "shopfloor_delivery_shipment.shopfloor_menu_delivery_shipment" ) @@ -20,10 +20,11 @@ def setUpClassVars(cls, *args, **kwargs): cls.dock = cls.env.ref("shipment_advice.stock_dock_demo") cls.dock.sudo().barcode = "DOCK" cls.dock2 = cls.dock.sudo().copy({"barcode": "DOCK2"}) + return result @classmethod def setUpClassBaseData(cls, *args, **kwargs): - super().setUpClassBaseData(*args, **kwargs) + result = super().setUpClassBaseData(*args, **kwargs) # Create 3 deliveries cls.product_c.tracking = "lot" cls.pickings = cls.env["stock.picking"] @@ -55,11 +56,13 @@ def setUpClassBaseData(cls, *args, **kwargs): picking.action_assign() # Create a shipment advice cls.shipment = cls._create_shipment() + return result @classmethod def setUpShopfloorApp(cls): - super().setUpShopfloorApp() + result = super().setUpShopfloorApp() cls.shopfloor_app.sudo().profile_ids += cls.profile + return result def setUp(self): super().setUp() diff --git a/shopfloor_delivery_shipment/tests/test_delivery_shipment_scan_document_location.py b/shopfloor_delivery_shipment/tests/test_delivery_shipment_scan_document_location.py index 021ab7170d..f0cf96888d 100644 --- a/shopfloor_delivery_shipment/tests/test_delivery_shipment_scan_document_location.py +++ b/shopfloor_delivery_shipment/tests/test_delivery_shipment_scan_document_location.py @@ -8,7 +8,7 @@ class DeliveryShipmentScanDocumentLocationCase(DeliveryShipmentCommonCase): @classmethod def setUpClassBaseData(cls, *args, **kwargs): - super().setUpClassBaseData(*args, **kwargs) + result = super().setUpClassBaseData(*args, **kwargs) cls.location = cls.menu.picking_type_ids.default_location_src_id cls.sublocation = cls.env.ref("stock.stock_location_14") cls.badlocation = cls.env.ref("stock.stock_location_customers") @@ -31,6 +31,8 @@ def setUpClassBaseData(cls, *args, **kwargs): cls.pick_subloc.action_assign() assert cls.pick_subloc.state == "assigned" + return result + def test_scan_document_location_ok_to_work_from(self): """Scan a location allowed per the menu transfer type.""" self._plan_records_in_shipment(self.shipment, self.picking1.move_lines)