Maintainers
This module is maintained by the OCA.
- + + +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.
diff --git a/setup/_metapackage/VERSION.txt b/setup/_metapackage/VERSION.txt index 0c272d93f8..d182fbf255 100644 --- a/setup/_metapackage/VERSION.txt +++ b/setup/_metapackage/VERSION.txt @@ -1 +1 @@ -16.0.20240911.0 \ No newline at end of file +16.0.20241005.0 \ No newline at end of file diff --git a/setup/_metapackage/setup.py b/setup/_metapackage/setup.py index 9bbf4c7d3e..efe2d098f6 100644 --- a/setup/_metapackage/setup.py +++ b/setup/_metapackage/setup.py @@ -43,6 +43,7 @@ 'odoo-addon-stock_release_channel_process_end_time>=16.0dev,<16.1dev', 'odoo-addon-stock_release_channel_propagate_channel_picking>=16.0dev,<16.1dev', 'odoo-addon-stock_release_channel_shipment_advice>=16.0dev,<16.1dev', + 'odoo-addon-stock_release_channel_shipment_advice_deliver>=16.0dev,<16.1dev', 'odoo-addon-stock_release_channel_shipment_advice_process_end_time>=16.0dev,<16.1dev', 'odoo-addon-stock_release_channel_shipment_advice_toursolver>=16.0dev,<16.1dev', 'odoo-addon-stock_release_channel_shipment_lead_time>=16.0dev,<16.1dev', diff --git a/shopfloor/README.rst b/shopfloor/README.rst index e3abc1d4de..b1668c4b28 100644 --- a/shopfloor/README.rst +++ b/shopfloor/README.rst @@ -7,7 +7,7 @@ Shopfloor !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:ead0fe2c0f59657c626fab9f161b3488d16841ff8c6dfab47b091d6e5fb9c852 + !! source digest: sha256:8c610188b1ca56f5f11da8e51e3fd390897186bc38eed9c6246f4cc394dccda1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/shopfloor/__manifest__.py b/shopfloor/__manifest__.py index ab29111e43..f891ae7762 100644 --- a/shopfloor/__manifest__.py +++ b/shopfloor/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Shopfloor", "summary": "manage warehouse operations with barcode scanners", - "version": "16.0.2.1.1", + "version": "16.0.2.2.0", "development_status": "Beta", "category": "Inventory", "website": "https://github.com/OCA/wms", diff --git a/shopfloor/models/stock_move_line.py b/shopfloor/models/stock_move_line.py index 9f73e2ab9a..452fe771d2 100644 --- a/shopfloor/models/stock_move_line.py +++ b/shopfloor/models/stock_move_line.py @@ -308,3 +308,13 @@ def _filter_on_picking(self, picking=False): """ picking = picking or fields.first(self.picking_id) return self.filtered_domain([("picking_id", "=", picking.id)]) + + def shopfloor_postpone(self, *recordsets): + """ + Specific behavior for move lines. + As we need to reset qty_done. + + """ + res = super().shopfloor_postpone(*recordsets) + self.qty_done = 0.0 + return res diff --git a/shopfloor/services/cluster_picking.py b/shopfloor/services/cluster_picking.py index 24292e6f4b..533267cfc1 100644 --- a/shopfloor/services/cluster_picking.py +++ b/shopfloor/services/cluster_picking.py @@ -339,8 +339,7 @@ def _pick_next_line(self, batch, message=None, force_line=None): return self.prepare_unload(batch.id) return self._response_for_start_line(next_line, message=message) - @staticmethod - def _sort_key_lines(line): + def _sort_key_lines(self, line): return ( line.shopfloor_priority or 10, line.location_id.shopfloor_picking_sequence or "", diff --git a/shopfloor/static/description/index.html b/shopfloor/static/description/index.html index d815d49268..fe7105ce36 100644 --- a/shopfloor/static/description/index.html +++ b/shopfloor/static/description/index.html @@ -367,7 +367,7 @@Shopfloor
!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:ead0fe2c0f59657c626fab9f161b3488d16841ff8c6dfab47b091d6e5fb9c852 +!! source digest: sha256:8c610188b1ca56f5f11da8e51e3fd390897186bc38eed9c6246f4cc394dccda1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->Shopfloor is a barcode scanner application for internal warehouse operations.
diff --git a/shopfloor/tests/test_location_content_transfer_base.py b/shopfloor/tests/test_location_content_transfer_base.py index 698f9318c7..c9f1e4fee2 100644 --- a/shopfloor/tests/test_location_content_transfer_base.py +++ b/shopfloor/tests/test_location_content_transfer_base.py @@ -20,6 +20,30 @@ def setUpClassVars(cls, *args, **kwargs): @classmethod def setUpClassBaseData(cls, *args, **kwargs): super().setUpClassBaseData(*args, **kwargs) + cls.product_e = ( + cls.env["product.product"] + .sudo() + .create( + { + "name": "Product E", + "type": "product", + "default_code": "E", + "barcode": "E", + "weight": 3, + } + ) + ) + cls.product_e_packaging = ( + cls.env["product.packaging"] + .sudo() + .create( + { + "name": "Box", + "product_id": cls.product_e.id, + "barcode": "ProductEBox", + } + ) + ) cls.content_loc = ( cls.env["stock.location"] .sudo() @@ -31,6 +55,19 @@ def setUpClassBaseData(cls, *args, **kwargs): } ) ) + # This is an additional content location to manage the cases + # where a product can be stored in several locations + cls.content_loc_1 = ( + cls.env["stock.location"] + .sudo() + .create( + { + "name": "Content Location 1", + "barcode": "Content1", + "location_id": cls.picking_type.default_location_src_id.id, + } + ) + ) def setUp(self): super().setUp() @@ -98,11 +135,30 @@ def assert_response_scan_destination_all( ) def assert_response_start_single( - self, response, pickings, message=None, popup=None + self, response, pickings, message=None, popup=None, postponed=False ): + """ + + This will check if the line returned correspond to the + next operation to do + + :param response: The response returned by the service + :type response: dict + :param pickings: Pickings to check (recordset) + :type pickings: stock.picking + :param message: The message returned in the response, defaults to None + :type message: dict, optional + :param popup: The popup message returned to the operator, defaults to None + :type popup: dict, optional + :param postponed: Fill in this in order to check if the returned line + should be the first one or the next one, defaults to False + :type postponed: bool, optional + """ sorter = self.service._actions_for("location_content_transfer.sorter") sorter.feed_pickings(pickings) location = pickings.mapped("location_id") + if postponed: + next(sorter) self.assert_response( response, next_state="start_single", diff --git a/shopfloor/tests/test_location_content_transfer_single.py b/shopfloor/tests/test_location_content_transfer_single.py index 5639e90e3d..3ef9e59384 100644 --- a/shopfloor/tests/test_location_content_transfer_single.py +++ b/shopfloor/tests/test_location_content_transfer_single.py @@ -20,7 +20,25 @@ class LocationContentTransferSingleCase(LocationContentTransferCommonCase): @classmethod def setUpClassBaseData(cls): super().setUpClassBaseData() - products = cls.product_a + cls.product_b + cls.product_c + cls.product_d + cls.shelves = ( + cls.env["stock.location"] + .sudo() + .create( + { + "location_id": cls.stock_location.id, + "name": "Shelves", + "usage": "view", + } + ) + ) + (cls.shelf1 | cls.shelf2 | cls.shelf3).sudo().location_id = cls.shelves + products = ( + cls.product_a + + cls.product_b + + cls.product_c + + cls.product_d + + cls.product_e + ) for product in products: cls.env["stock.putaway.rule"].sudo().create( { @@ -37,7 +55,11 @@ def setUpClassBaseData(cls): cls.picking2 = picking2 = cls._create_picking( lines=[(cls.product_c, 10), (cls.product_d, 10)] ) - cls.pickings = picking1 | picking2 + cls.picking3 = cls._create_picking( + lines=[(cls.product_e, 10)], + ) + cls.picking3.location_dest_id = cls.shelves + cls.pickings = picking1 | picking2 | cls.picking3 cls._fill_stock_for_moves( picking1.move_ids, in_package=True, location=cls.content_loc ) @@ -48,6 +70,9 @@ def setUpClassBaseData(cls): cls._fill_stock_for_moves( picking2.move_ids[1], location=cls.content_loc, in_lot=cls.product_d_lot ) + # Set Product E in several content locations + cls._update_qty_in_location(cls.content_loc, cls.product_e, 5.0) + cls._update_qty_in_location(cls.content_loc_1, cls.product_e, 5.0) cls.pickings.action_assign() cls._simulate_pickings_selected(cls.pickings) @@ -508,6 +533,53 @@ def test_postpone_line_ok(self): move_lines.mapped("picking_id"), ) + def test_postpone_line_ok_with_two_lines_and_view(self): + """ + Use case: + - A stock move with two move lines (e.g.: two different source locations) + - A default destination as a view + - Postpone the first line + - Validate the second line + - Only the first quantity should be transfered + - The backorder line should be proposed after + """ + move_line = self.picking3.move_line_ids[0] + previous_priority = move_line.shopfloor_priority + self.assertFalse(move_line.shopfloor_postponed) + response = self.service.dispatch( + "postpone_line", + params={"location_id": self.content_loc.id, "move_line_id": move_line.id}, + ) + self.assertTrue(move_line.shopfloor_postponed) + self.assertEqual(move_line.shopfloor_priority, previous_priority + 1) + + self.assert_response_start_single(response, self.picking3, postponed=True) + + # Select the next line + move_line = self.picking3.move_line_ids[1] + previous_priority = move_line.shopfloor_priority + self.assertFalse(move_line.shopfloor_postponed) + + # Set the destination + response = self.service.dispatch( + "set_destination_line", + params={ + "location_id": self.content_loc.id, + "move_line_id": move_line.id, + "quantity": move_line.reserved_uom_qty, + "barcode": self.shelf1.barcode, + }, + ) + backorder = self.picking3.backorder_ids + self.assertTrue(backorder) + message = { + "body": "Content transfer to Shelf 1 completed", + "message_type": "success", + } + + # Check the backorder is proposed to operator + self.assert_response_start_single(response, backorder, message=message) + def test_stock_out_package_wrong_parameters(self): """Wrong 'location_id' and 'package_level_id' parameters, redirect the user to the 'start' screen. diff --git a/shopfloor_batch_automatic_creation/README.rst b/shopfloor_batch_automatic_creation/README.rst index d7fce4240f..d3a47d89a1 100644 --- a/shopfloor_batch_automatic_creation/README.rst +++ b/shopfloor_batch_automatic_creation/README.rst @@ -7,7 +7,7 @@ Shopfloor - Batch Transfer Automatic Creation !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:fb7645e99251124cd53392c41fe64a07b36af442b7b9963b8093a3c20a21ce26 + !! source digest: sha256:01bebb5a6d8c7280ef4863a41147714f144ac19e198d5e009f12c6076ef1e044 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/shopfloor_batch_automatic_creation/__manifest__.py b/shopfloor_batch_automatic_creation/__manifest__.py index 4f69dc4215..fa67da4ac7 100644 --- a/shopfloor_batch_automatic_creation/__manifest__.py +++ b/shopfloor_batch_automatic_creation/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Shopfloor - Batch Transfer Automatic Creation", "summary": "Create batch transfers for Cluster Picking", - "version": "16.0.1.0.0", + "version": "16.0.1.1.0", "category": "Inventory", "website": "https://github.com/OCA/wms", "author": "Camptocamp, Odoo Community Association (OCA)", @@ -14,6 +14,7 @@ "depends": ["shopfloor", "stock_picking_batch_creation"], "data": [ "views/shopfloor_menu_views.xml", + "views/stock_device_type.xml", ], "installable": True, } diff --git a/shopfloor_batch_automatic_creation/i18n/es_AR.po b/shopfloor_batch_automatic_creation/i18n/es_AR.po index ac8b7574a7..3abcf9a12c 100644 --- a/shopfloor_batch_automatic_creation/i18n/es_AR.po +++ b/shopfloor_batch_automatic_creation/i18n/es_AR.po @@ -16,6 +16,18 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 4.3.2\n" +#. module: shopfloor_batch_automatic_creation +#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.stock_device_type_form_view +msgid "" +"line
: The stock move line Record for with the key must be "
+"computed."
+msgstr ""
+
+#. module: shopfloor_batch_automatic_creation
+#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.stock_device_type_form_view
+msgid "super
: The initial method to compute the key."
+msgstr ""
+
#. module: shopfloor_batch_automatic_creation
#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_shopfloor_menu__batch_create
msgid "Automatic Batch Creation"
@@ -40,20 +52,30 @@ msgstr ""
"las 2 transferencias prioritarias."
#. module: shopfloor_batch_automatic_creation
-#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_shopfloor_menu__display_name
-msgid "Display Name"
-msgstr "Mostrar Nombre"
+#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.shopfloor_menu_form_view
+msgid "Batch Creation"
+msgstr ""
+
+#. module: shopfloor_batch_automatic_creation
+#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.stock_device_type_form_view
+msgid "Custom code to construct the key to sort move lines"
+msgstr ""
+
+#. module: shopfloor_batch_automatic_creation
+#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_shopfloor_menu__stock_device_type_ids
+msgid "Default device types"
+msgstr ""
+
+#. module: shopfloor_batch_automatic_creation
+#: model:ir.model.fields,help:shopfloor_batch_automatic_creation.field_shopfloor_menu__stock_device_type_ids
+msgid "Default list of eligible device types when creating a batch transfer"
+msgstr ""
#. module: shopfloor_batch_automatic_creation
#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_shopfloor_menu__batch_group_by_commercial_partner
msgid "Group by commercial entity"
msgstr "Agrupar por entidad comercial"
-#. module: shopfloor_batch_automatic_creation
-#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_shopfloor_menu__id
-msgid "ID"
-msgstr "ID"
-
#. module: shopfloor_batch_automatic_creation
#: model:ir.model.fields,help:shopfloor_batch_automatic_creation.field_shopfloor_menu__batch_group_by_commercial_partner
msgid ""
@@ -64,52 +86,89 @@ msgstr ""
"Esto podría mezclar prioridades e ignorar las restricciones para aplicar."
#. module: shopfloor_batch_automatic_creation
-#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_shopfloor_menu____last_update
-msgid "Last Modified on"
-msgstr "Última Modificación el"
+#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.stock_device_type_form_view
+msgid "Leave blank to use the default method."
+msgstr ""
#. module: shopfloor_batch_automatic_creation
-#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_shopfloor_menu__batch_create_max_weight
-msgid "Max Weight (kg)"
-msgstr "Peso Máximo (kg)"
+#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_stock_device_type__line_sort_key_code
+msgid "Line sort key method"
+msgstr ""
#. module: shopfloor_batch_automatic_creation
-#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_shopfloor_menu__batch_create_max_picking
-msgid "Max transfers"
-msgstr "Transferencias máximas"
+#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_shopfloor_menu__batch_maximum_number_of_preparation_lines
+msgid "Maximum number of preparation lines for the batch"
+msgstr ""
#. module: shopfloor_batch_automatic_creation
-#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_shopfloor_menu__batch_create_max_volume
-msgid "Max volume (m³)"
-msgstr "Volumen máximo (m³)"
+#: model:ir.model,name:shopfloor_batch_automatic_creation.model_shopfloor_menu
+msgid "Menu displayed in the scanner application"
+msgstr "Menú mostrado en la aplicación de escaner"
#. module: shopfloor_batch_automatic_creation
-#: model:ir.model.fields,help:shopfloor_batch_automatic_creation.field_shopfloor_menu__batch_create_max_picking
+#: model:ir.model.fields,help:shopfloor_batch_automatic_creation.field_stock_device_type__line_sort_key_code
msgid ""
-"Maximum number of transfers to add in an automatic batch. 0 means no limit."
+"Python code to sort the lines in the batch.\n"
+"\n"
+" The 'line' will be a recordset of stock.move.line.\n"
+" and the method must assign a value to the variable 'key'\n"
+" that will be used to sort the lines. You can also call\n"
+" the super method to get the default behavior.\n"
+" "
msgstr ""
-"Número máximo de transferencias para agregar en un lote automático. 0 "
-"significa sin límite."
#. module: shopfloor_batch_automatic_creation
-#: model:ir.model.fields,help:shopfloor_batch_automatic_creation.field_shopfloor_menu__batch_create_max_volume
-msgid ""
-"Maximum volume in cubic meters of goods in transfers to add in an automatic "
-"batch. 0 means no limit."
+#: model:ir.model,name:shopfloor_batch_automatic_creation.model_stock_device_type
+msgid "Stock Device Type"
msgstr ""
-"Volumen máximo en metros cúbicos de mercadería en transferencias para "
-"agregar en un lote automático. 0 significa sin límite."
#. module: shopfloor_batch_automatic_creation
-#: model:ir.model.fields,help:shopfloor_batch_automatic_creation.field_shopfloor_menu__batch_create_max_weight
+#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.stock_device_type_form_view
msgid ""
-"Maximum weight in kg of goods in transfers to add in an automatic batch. 0 "
-"means no limit."
+"To assign the key value: key = (line.product_id.weight, ) + "
+"super(line)
"
msgstr ""
-"Peso máximo en kg de mercancía en transferencias para agregar en un lote "
-"automático. 0 significa sin límite."
#. module: shopfloor_batch_automatic_creation
-#: model:ir.model,name:shopfloor_batch_automatic_creation.model_shopfloor_menu
-msgid "Menu displayed in the scanner application"
-msgstr "Menú mostrado en la aplicación de escaner"
+#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.stock_device_type_form_view
+msgid "Two variables are available:"
+msgstr ""
+
+#~ msgid "Display Name"
+#~ msgstr "Mostrar Nombre"
+
+#~ msgid "ID"
+#~ msgstr "ID"
+
+#~ msgid "Last Modified on"
+#~ msgstr "Última Modificación el"
+
+#~ msgid "Max Weight (kg)"
+#~ msgstr "Peso Máximo (kg)"
+
+#~ msgid "Max transfers"
+#~ msgstr "Transferencias máximas"
+
+#~ msgid "Max volume (m³)"
+#~ msgstr "Volumen máximo (m³)"
+
+#~ msgid ""
+#~ "Maximum number of transfers to add in an automatic batch. 0 means no "
+#~ "limit."
+#~ msgstr ""
+#~ "Número máximo de transferencias para agregar en un lote automático. 0 "
+#~ "significa sin límite."
+
+#~ msgid ""
+#~ "Maximum volume in cubic meters of goods in transfers to add in an "
+#~ "automatic batch. 0 means no limit."
+#~ msgstr ""
+#~ "Volumen máximo en metros cúbicos de mercadería en transferencias para "
+#~ "agregar en un lote automático. 0 significa sin límite."
+
+#~ msgid ""
+#~ "Maximum weight in kg of goods in transfers to add in an automatic batch. "
+#~ "0 means no limit."
+#~ msgstr ""
+#~ "Peso máximo en kg de mercancía en transferencias para agregar en un lote "
+#~ "automático. 0 significa sin límite."
diff --git a/shopfloor_batch_automatic_creation/i18n/it.po b/shopfloor_batch_automatic_creation/i18n/it.po
index fcf44527c4..c2d549ad37 100644
--- a/shopfloor_batch_automatic_creation/i18n/it.po
+++ b/shopfloor_batch_automatic_creation/i18n/it.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2024-05-14 18:34+0000\n"
+"PO-Revision-Date: 2024-10-05 17:06+0000\n"
"Last-Translator: mymage line
: The stock move line Record for with the key must be "
+"computed."
+msgstr ""
+"riga
: è necessario calcolare il record di riga di movimento di "
+"magazzino per la chiave."
+
+#. module: shopfloor_batch_automatic_creation
+#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.stock_device_type_form_view
+msgid "super
: The initial method to compute the key."
+msgstr "super
: il metodo iniziale per calcolare la chiave."
#. module: shopfloor_batch_automatic_creation
#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_shopfloor_menu__batch_create
@@ -27,9 +41,9 @@ msgid ""
"Automatically create a batch when an operator uses the \"Get Work\" button "
"and no existing batch has been found. The system will first look for "
"priority transfers and fill up the batch till the defined constraints (max "
-"of transfers, volume, weight, ...). It never mixes priorities, so if you get"
-" 2 available priority transfers and a max quantity of 3, the batch will only"
-" contain the 2 priority transfers."
+"of transfers, volume, weight, ...). It never mixes priorities, so if you get "
+"2 available priority transfers and a max quantity of 3, the batch will only "
+"contain the 2 priority transfers."
msgstr ""
"Crea automaticamente un gruppo quando l'operatore utilizza il pulsante "
"\"Inizia un lavoro\" e non sono stati trovati gruppi. Il sistema "
@@ -44,6 +58,12 @@ msgstr ""
msgid "Batch Creation"
msgstr "Creazione gruppo"
+#. module: shopfloor_batch_automatic_creation
+#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.stock_device_type_form_view
+msgid "Custom code to construct the key to sort move lines"
+msgstr ""
+"Codice personalizzato per costruire la chiave per ordinare le righe movimento"
+
#. module: shopfloor_batch_automatic_creation
#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_shopfloor_menu__stock_device_type_ids
msgid "Default device types"
@@ -70,6 +90,16 @@ msgstr ""
"Se abilitata, i trasferimenti verranno raggruppati per entità commerciale. "
"Questo potrebbe mischiare le priorità e ignorare i vincoli da applicare."
+#. module: shopfloor_batch_automatic_creation
+#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.stock_device_type_form_view
+msgid "Leave blank to use the default method."
+msgstr "Lasciare vuoto per usare il metodo predefinito."
+
+#. module: shopfloor_batch_automatic_creation
+#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_stock_device_type__line_sort_key_code
+msgid "Line sort key method"
+msgstr "Metodo chiave di ordinamento della riga"
+
#. module: shopfloor_batch_automatic_creation
#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_shopfloor_menu__batch_maximum_number_of_preparation_lines
msgid "Maximum number of preparation lines for the batch"
@@ -79,3 +109,41 @@ msgstr "Numero massim di righe di preparazione per il gruppo"
#: model:ir.model,name:shopfloor_batch_automatic_creation.model_shopfloor_menu
msgid "Menu displayed in the scanner application"
msgstr "Menu visualizzato nell'applicazione di scansione"
+
+#. module: shopfloor_batch_automatic_creation
+#: model:ir.model.fields,help:shopfloor_batch_automatic_creation.field_stock_device_type__line_sort_key_code
+msgid ""
+"Python code to sort the lines in the batch.\n"
+"\n"
+" The 'line' will be a recordset of stock.move.line.\n"
+" and the method must assign a value to the variable 'key'\n"
+" that will be used to sort the lines. You can also call\n"
+" the super method to get the default behavior.\n"
+" "
+msgstr ""
+"Codice Python per ordinare le righe nel lotto.\n"
+"\n"
+" La \"riga\" sarà un recordset di stock.move.line.\n"
+" e il metodo deve assegnare un valore alla variabile \"chiave\"\n"
+" che sarà usato per ordinare le linee. Si può anche chiamare\n"
+" il metodo super per ottenere il comportamento predefinito.\n"
+" "
+
+#. module: shopfloor_batch_automatic_creation
+#: model:ir.model,name:shopfloor_batch_automatic_creation.model_stock_device_type
+msgid "Stock Device Type"
+msgstr "Tipo dispositivo magazzino"
+
+#. module: shopfloor_batch_automatic_creation
+#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.stock_device_type_form_view
+msgid ""
+"To assign the key value: key = (line.product_id.weight, ) + "
+"super(line)
"
+msgstr ""
+"Per assegnare il valore chiave: key = (riga.product_id.weight, ) + "
+"super(line)
"
+
+#. module: shopfloor_batch_automatic_creation
+#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.stock_device_type_form_view
+msgid "Two variables are available:"
+msgstr "Sono disponibili due variabili:"
diff --git a/shopfloor_batch_automatic_creation/i18n/shopfloor_batch_automatic_creation.pot b/shopfloor_batch_automatic_creation/i18n/shopfloor_batch_automatic_creation.pot
index 7997f655bb..049342f216 100644
--- a/shopfloor_batch_automatic_creation/i18n/shopfloor_batch_automatic_creation.pot
+++ b/shopfloor_batch_automatic_creation/i18n/shopfloor_batch_automatic_creation.pot
@@ -13,6 +13,18 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
+#. module: shopfloor_batch_automatic_creation
+#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.stock_device_type_form_view
+msgid ""
+"line
: The stock move line Record for with the key must be "
+"computed."
+msgstr ""
+
+#. module: shopfloor_batch_automatic_creation
+#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.stock_device_type_form_view
+msgid "super
: The initial method to compute the key."
+msgstr ""
+
#. module: shopfloor_batch_automatic_creation
#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_shopfloor_menu__batch_create
msgid "Automatic Batch Creation"
@@ -34,6 +46,11 @@ msgstr ""
msgid "Batch Creation"
msgstr ""
+#. module: shopfloor_batch_automatic_creation
+#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.stock_device_type_form_view
+msgid "Custom code to construct the key to sort move lines"
+msgstr ""
+
#. module: shopfloor_batch_automatic_creation
#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_shopfloor_menu__stock_device_type_ids
msgid "Default device types"
@@ -56,6 +73,16 @@ msgid ""
"priorities and will ignore the constraints to apply."
msgstr ""
+#. module: shopfloor_batch_automatic_creation
+#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.stock_device_type_form_view
+msgid "Leave blank to use the default method."
+msgstr ""
+
+#. module: shopfloor_batch_automatic_creation
+#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_stock_device_type__line_sort_key_code
+msgid "Line sort key method"
+msgstr ""
+
#. module: shopfloor_batch_automatic_creation
#: model:ir.model.fields,field_description:shopfloor_batch_automatic_creation.field_shopfloor_menu__batch_maximum_number_of_preparation_lines
msgid "Maximum number of preparation lines for the batch"
@@ -65,3 +92,32 @@ msgstr ""
#: model:ir.model,name:shopfloor_batch_automatic_creation.model_shopfloor_menu
msgid "Menu displayed in the scanner application"
msgstr ""
+
+#. module: shopfloor_batch_automatic_creation
+#: model:ir.model.fields,help:shopfloor_batch_automatic_creation.field_stock_device_type__line_sort_key_code
+msgid ""
+"Python code to sort the lines in the batch.\n"
+"\n"
+" The 'line' will be a recordset of stock.move.line.\n"
+" and the method must assign a value to the variable 'key'\n"
+" that will be used to sort the lines. You can also call\n"
+" the super method to get the default behavior.\n"
+" "
+msgstr ""
+
+#. module: shopfloor_batch_automatic_creation
+#: model:ir.model,name:shopfloor_batch_automatic_creation.model_stock_device_type
+msgid "Stock Device Type"
+msgstr ""
+
+#. module: shopfloor_batch_automatic_creation
+#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.stock_device_type_form_view
+msgid ""
+"To assign the key value: key = (line.product_id.weight, ) + "
+"super(line)
"
+msgstr ""
+
+#. module: shopfloor_batch_automatic_creation
+#: model_terms:ir.ui.view,arch_db:shopfloor_batch_automatic_creation.stock_device_type_form_view
+msgid "Two variables are available:"
+msgstr ""
diff --git a/shopfloor_batch_automatic_creation/models/__init__.py b/shopfloor_batch_automatic_creation/models/__init__.py
index 8bd3d5195c..d7a5455f66 100644
--- a/shopfloor_batch_automatic_creation/models/__init__.py
+++ b/shopfloor_batch_automatic_creation/models/__init__.py
@@ -1 +1,2 @@
from . import shopfloor_menu
+from . import stock_device_type
diff --git a/shopfloor_batch_automatic_creation/models/stock_device_type.py b/shopfloor_batch_automatic_creation/models/stock_device_type.py
new file mode 100644
index 0000000000..7b4fbac812
--- /dev/null
+++ b/shopfloor_batch_automatic_creation/models/stock_device_type.py
@@ -0,0 +1,33 @@
+# Copyright 2021 ACSONE SA/NV
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+from odoo import api, fields, models
+from odoo.exceptions import ValidationError
+from odoo.tools.safe_eval import test_python_expr
+
+
+class StockDeviceType(models.Model):
+
+ _inherit = "stock.device.type"
+
+ line_sort_key_code = fields.Text(
+ groups="base.group_system",
+ string="Line sort key method",
+ help="""Python code to sort the lines in the batch.
+
+ The 'line' will be a recordset of stock.move.line.
+ and the method must assign a value to the variable 'key'
+ that will be used to sort the lines. You can also call
+ the super method to get the default behavior.
+ """,
+ )
+
+ @api.constrains("line_sort_key_code")
+ def _check_line_sort_key_code(self):
+ for record in self:
+ code = record.line_sort_key_code and record.line_sort_key_code.strip()
+ if not code:
+ continue
+ msg = test_python_expr(expr=code, mode="exec")
+ if msg:
+ raise ValidationError(msg)
diff --git a/shopfloor_batch_automatic_creation/services/cluster_picking.py b/shopfloor_batch_automatic_creation/services/cluster_picking.py
index 7e165e4cbe..5bfb22f50c 100644
--- a/shopfloor_batch_automatic_creation/services/cluster_picking.py
+++ b/shopfloor_batch_automatic_creation/services/cluster_picking.py
@@ -1,6 +1,8 @@
# Copyright 2020 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+from odoo.tools.safe_eval import safe_eval
+
from odoo.addons.component.core import Component
@@ -25,3 +27,19 @@ def _batch_auto_create(self):
stock_device_types=menu.stock_device_type_ids,
shopfloor_menu=menu,
)
+
+ def _sort_key_lines(self, line):
+ # we get the device from the batch
+ device = line.batch_id.picking_device_id
+ # the sort key code is protected by the group base.group_system
+ sudo_device = device.sudo()
+ code = sudo_device.line_sort_key_code and sudo_device.line_sort_key_code.strip()
+ if code:
+ context = {
+ "line": line,
+ "super": super()._sort_key_lines,
+ "key": None,
+ }
+ safe_eval(code, context, mode="exec", nocopy=True)
+ return context["key"]
+ return super()._sort_key_lines(line)
diff --git a/shopfloor_batch_automatic_creation/static/description/index.html b/shopfloor_batch_automatic_creation/static/description/index.html
index 06971c0e6f..8b3e2bbf8f 100644
--- a/shopfloor_batch_automatic_creation/static/description/index.html
+++ b/shopfloor_batch_automatic_creation/static/description/index.html
@@ -367,7 +367,7 @@ Shopfloor - Batch Transfer Automatic Creation
!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:fb7645e99251124cd53392c41fe64a07b36af442b7b9963b8093a3c20a21ce26 +!! source digest: sha256:01bebb5a6d8c7280ef4863a41147714f144ac19e198d5e009f12c6076ef1e044 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->Extension for Shopfloor’s cluster picking.
diff --git a/shopfloor_batch_automatic_creation/tests/test_batch_create.py b/shopfloor_batch_automatic_creation/tests/test_batch_create.py index 9d670e0262..cc814920d4 100644 --- a/shopfloor_batch_automatic_creation/tests/test_batch_create.py +++ b/shopfloor_batch_automatic_creation/tests/test_batch_create.py @@ -246,3 +246,37 @@ def test_create_batch_group_by_commercial_partner(self): group_by_commercial_partner=True, ) self.assertEqual(batch.picking_ids, self.picking2 | self.picking3) + + def test_specific_device_sort_key(self): + self.device.sudo().line_sort_key_code = "key=line.product_id.weight" + self.product_a.weight = 1 + self.product_b.weight = 5 + self.product_c.weight = 15 + self.product_d.weight = 20 + + batch = self.auto_batch.create_batch( + self.picking_type, + stock_device_types=self.device, + maximum_number_of_preparation_lines=20, + ) + lines = batch.move_line_ids + lines = self.service._lines_for_picking_batch(batch) + self.assertEqual( + lines.mapped("product_id"), + self.product_a + self.product_b + self.product_c + self.product_d, + ) + self.product_a.weight = 25 + lines = self.service._lines_for_picking_batch(batch) + self.assertEqual( + lines.mapped("product_id"), + self.product_b + self.product_c + self.product_d + self.product_a, + ) + # we can call super method to use the default sorting + self.device.sudo().line_sort_key_code = ( + "key=(line.product_id.weight,) + super(line)" + ) + lines = self.service._lines_for_picking_batch(batch) + self.assertEqual( + lines.mapped("product_id"), + self.product_b + self.product_c + self.product_d + self.product_a, + ) diff --git a/shopfloor_batch_automatic_creation/views/stock_device_type.xml b/shopfloor_batch_automatic_creation/views/stock_device_type.xml new file mode 100644 index 0000000000..f707e50b02 --- /dev/null +++ b/shopfloor_batch_automatic_creation/views/stock_device_type.xml @@ -0,0 +1,32 @@ + + +Custom code to construct the key to sort move lines
+Two variables are available:
+-
+
line
: The stock move line Record for with the key must be computed.
+ super
: The initial method to compute the key. + +
+ - To assign the key value:
key = (line.product_id.weight, ) + super(line)
+
Leave blank to use the default method.
+Stock Available to Promise Release
!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:a5bba09bafe4370f4a8f6a7c6c7339405e19175b54bc8192a8ef5644fe439f0d +!! source digest: sha256:42f7fb139e7b798bb6c28460f28908d564bcd0b91455af3e30c4f5f4532c0bc9 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->Currently the reservation is performed by adding reserved quantities on quants,
diff --git a/stock_available_to_promise_release/tests/common.py b/stock_available_to_promise_release/tests/common.py
index 6a42322dea..6fd56df73a 100644
--- a/stock_available_to_promise_release/tests/common.py
+++ b/stock_available_to_promise_release/tests/common.py
@@ -39,6 +39,16 @@ def setUpClass(cls):
{"name": "Bin1", "location_id": cls.loc_stock.id}
)
+ @classmethod
+ def _create_procurement_group(cls, move_type="direct"):
+ cls.group = cls.env["procurement.group"].create(
+ {
+ "name": "TEST",
+ "move_type": move_type,
+ "partner_id": cls.partner_delta.id,
+ }
+ )
+
@classmethod
def _create_picking_chain(cls, wh, products=None, date=None, move_type="direct"):
"""Create picking chain
@@ -55,16 +65,10 @@ def _create_picking_chain(cls, wh, products=None, date=None, move_type="direct")
if products is None:
products = []
- group = cls.env["procurement.group"].create(
- {
- "name": "TEST",
- "move_type": move_type,
- "partner_id": cls.partner_delta.id,
- }
- )
+ cls._create_procurement_group(move_type=move_type)
values = {
"company_id": wh.company_id,
- "group_id": group,
+ "group_id": cls.group,
"date_planned": date or fields.Datetime.now(),
"warehouse_id": wh,
}
@@ -94,7 +98,7 @@ def _create_picking_chain(cls, wh, products=None, date=None, move_type="direct")
)
]
)
- pickings = cls._pickings_in_group(group)
+ pickings = cls._pickings_in_group(cls.group)
pickings.mapped("move_ids").write(
{"date_priority": date or fields.Datetime.now()}
)
diff --git a/stock_available_to_promise_release/tests/test_unrelease.py b/stock_available_to_promise_release/tests/test_unrelease.py
index 1b1d1ae4c4..2909d9288d 100644
--- a/stock_available_to_promise_release/tests/test_unrelease.py
+++ b/stock_available_to_promise_release/tests/test_unrelease.py
@@ -194,3 +194,26 @@ def test_auto_unrelease_on_backorder(self):
self.assertTrue(
all(m.procure_method == "make_to_order" for m in backorder_ship.move_ids)
)
+
+ def test_cancel_procurement(self):
+ """
+ Simulate a quantity cancel
+ """
+ values = {
+ "group_id": self.group,
+ "warehouse_id": self.wh,
+ }
+ self.env["procurement.group"].run(
+ [
+ self.env["procurement.group"].Procurement(
+ self.product1,
+ -5.0,
+ self.product1.uom_id,
+ self.loc_customer,
+ "TEST",
+ "TEST",
+ self.env.company,
+ values,
+ )
+ ]
+ )
diff --git a/stock_release_channel/README.rst b/stock_release_channel/README.rst
index 0c90ee14d0..6ebfb85acb 100644
--- a/stock_release_channel/README.rst
+++ b/stock_release_channel/README.rst
@@ -7,7 +7,7 @@ Stock Release Channels
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:92e089b6110d418cbfb3602da22df14e753572bd0f50ed578d07440f384f9166
+ !! source digest: sha256:93fa48450721de36fe59554810f82bfb161e861a82bc96f08a3cdd1ea3daebcf
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
diff --git a/stock_release_channel/__manifest__.py b/stock_release_channel/__manifest__.py
index 9bbc37076a..1bd258a74e 100644
--- a/stock_release_channel/__manifest__.py
+++ b/stock_release_channel/__manifest__.py
@@ -5,7 +5,7 @@
{
"name": "Stock Release Channels",
"summary": "Manage workload in WMS with release channels",
- "version": "16.0.2.17.0",
+ "version": "16.0.2.18.0",
"development_status": "Beta",
"license": "AGPL-3",
"author": "Camptocamp, BCIM, ACSONE SA/NV, Odoo Community Association (OCA)",
diff --git a/stock_release_channel/i18n/es.po b/stock_release_channel/i18n/es.po
index ca4b48b1ca..17218cd280 100644
--- a/stock_release_channel/i18n/es.po
+++ b/stock_release_channel/i18n/es.po
@@ -477,6 +477,11 @@ msgstr "¡No hay nada en la cola!"
msgid "Open"
msgstr "Abrir"
+#. module: stock_release_channel
+#: model:ir.model.fields,field_description:stock_release_channel.field_stock_release_channel__open_picking_ids
+msgid "Open Transfers"
+msgstr ""
+
#. module: stock_release_channel
#: model:ir.model.fields,field_description:stock_release_channel.field_stock_release_channel__picking_type_ids
msgid "Operation Types"
@@ -701,16 +706,13 @@ msgid ""
"and release operations are allowed.\n"
" * Locked: Release operations are forbidden. (Assignement processes are "
"still working)\n"
+"* Delivering: A background task is running to automatically deliver ready "
+"shipments\n"
+"* Delivering Error: An error occurred in the delivery background task\n"
+"* Delivered: Ready transfers are delivered\n"
"* Asleep: Assigned pickings not processed are unassigned from the release "
"channel.\n"
msgstr ""
-"El estado permite controlar la disponibilidad del canal de liberación.\n"
-"* Abierto: La asignación de picking manual y automático a la liberación es "
-"efectiva y se permiten las operaciones de liberación.\n"
-" * Bloqueado: Las operaciones de liberación están prohibidas. (Los procesos "
-"de asignación siguen funcionando)\n"
-"* Dormido: Las recogidas asignadas no procesadas se desasignan del canal de "
-"liberación.\n"
#. module: stock_release_channel
#: model:ir.model.fields,help:stock_release_channel.field_stock_release_channel__state_at_wakeup
@@ -834,6 +836,23 @@ msgstr ""
msgid "name"
msgstr "nombre"
+#~ msgid ""
+#~ "The state allows you to control the availability of the release channel.\n"
+#~ "* Open: Manual and automatic picking assignment to the release is "
+#~ "effective and release operations are allowed.\n"
+#~ " * Locked: Release operations are forbidden. (Assignement processes are "
+#~ "still working)\n"
+#~ "* Asleep: Assigned pickings not processed are unassigned from the release "
+#~ "channel.\n"
+#~ msgstr ""
+#~ "El estado permite controlar la disponibilidad del canal de liberación.\n"
+#~ "* Abierto: La asignación de picking manual y automático a la liberación "
+#~ "es efectiva y se permiten las operaciones de liberación.\n"
+#~ " * Bloqueado: Las operaciones de liberación están prohibidas. (Los "
+#~ "procesos de asignación siguen funcionando)\n"
+#~ "* Dormido: Las recogidas asignadas no procesadas se desasignan del canal "
+#~ "de liberación.\n"
+
#~ msgid "To Do Situation"
#~ msgstr "Situación por hacer"
diff --git a/stock_release_channel/i18n/fr.po b/stock_release_channel/i18n/fr.po
index 5d4f1e91e3..c4610c58d6 100644
--- a/stock_release_channel/i18n/fr.po
+++ b/stock_release_channel/i18n/fr.po
@@ -466,6 +466,11 @@ msgstr ""
msgid "Open"
msgstr ""
+#. module: stock_release_channel
+#: model:ir.model.fields,field_description:stock_release_channel.field_stock_release_channel__open_picking_ids
+msgid "Open Transfers"
+msgstr ""
+
#. module: stock_release_channel
#: model:ir.model.fields,field_description:stock_release_channel.field_stock_release_channel__picking_type_ids
msgid "Operation Types"
@@ -687,6 +692,10 @@ msgid ""
"and release operations are allowed.\n"
" * Locked: Release operations are forbidden. (Assignement processes are "
"still working)\n"
+"* Delivering: A background task is running to automatically deliver ready "
+"shipments\n"
+"* Delivering Error: An error occurred in the delivery background task\n"
+"* Delivered: Ready transfers are delivered\n"
"* Asleep: Assigned pickings not processed are unassigned from the release "
"channel.\n"
msgstr ""
@@ -810,3 +819,21 @@ msgstr ""
#: model_terms:ir.ui.view,arch_db:stock_release_channel.stock_release_channel_kanban_view
msgid "name"
msgstr ""
+
+#~ msgid ""
+#~ "The state allows you to control the availability of the release channel.\n"
+#~ "* Open: Manual and automatic picking assignment to the release is "
+#~ "effective and release operations are allowed.\n"
+#~ "* Locked: Release operations are forbidden. (Assignement processes are "
+#~ "still working)\n"
+#~ "* Asleep: Assigned pickings not processed are unassigned from the release "
+#~ "channel.\n"
+#~ msgstr ""
+#~ "L'état vous permet de contrôler la disponibilité du canal de livraison.\n"
+#~ "* Ouvert: l'affectation manuelle et automatique des transferts au canal "
+#~ "de livraison est effective et les opérations de préparation sont "
+#~ "autorisées.\n"
+#~ "* Verrouillé: les opérations de préparation sont interdites. (Les "
+#~ "processus d'affectation fonctionnent toujours)\n"
+#~ "* Endormi: les transferts affectés non traités sont désaffectés du canal "
+#~ "de livraison.\n"
diff --git a/stock_release_channel/i18n/it.po b/stock_release_channel/i18n/it.po
index 99f6fbc9d6..98e98cdfe3 100644
--- a/stock_release_channel/i18n/it.po
+++ b/stock_release_channel/i18n/it.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2024-09-26 09:06+0000\n"
+"PO-Revision-Date: 2024-10-05 17:06+0000\n"
"Last-Translator: mymage Release channels are: This module adds an action to the release channel to automate the delivery of
@@ -432,7 +432,9 @@ This module is maintained by the OCA. 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.Stock Release Channels
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! source digest: sha256:92e089b6110d418cbfb3602da22df14e753572bd0f50ed578d07440f384f9166
+!! source digest: sha256:93fa48450721de36fe59554810f82bfb161e861a82bc96f08a3cdd1ea3daebcf
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
\n"
+" If you choose to proceed, these preparations will be "
+"unreleased.
\n"
" Are you sure you want to proceed with the delivery?"
msgstr ""
-"Il y a des transferts qui n'ont pas été finalisés.\n
-" Si vous choisissez de continuer, ces transferts vont être délibérés.
\n"
-" Etes-vous sûr de vouloir lancer la livraison?"
#. module: stock_release_channel_shipment_advice_deliver
-#: model:ir.model,name:stock_release_channel_shipment_advice_deliver.model_stock_release_channel_shipment_advice_deliver_check_wizard
+#: model:ir.model,name:stock_release_channel_shipment_advice_deliver.model_stock_picking
+msgid "Transfer"
+msgstr "Transfert"
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model,name:stock_release_channel_shipment_advice_deliver.model_stock_release_channel_deliver_check_wizard
msgid "stock release channel deliver check wizard"
msgstr ""
diff --git a/stock_release_channel_shipment_advice_deliver/i18n/it.po b/stock_release_channel_shipment_advice_deliver/i18n/it.po
new file mode 100644
index 0000000000..3e28f33630
--- /dev/null
+++ b/stock_release_channel_shipment_advice_deliver/i18n/it.po
@@ -0,0 +1,306 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * stock_release_channel_shipment_advice_deliver
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 16.0\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: 2024-10-08 10:06+0000\n"
+"Last-Translator: mymage
\n"
+" Are you sure you want to proceed with the delivery?"
+msgstr ""
+"Ci sono alcuni preparativi che non sono stati completati.\n"
+" Se si sceglie di procedere, questi preparativi non "
+"saranno pubblicati.
\n"
+" Si è sicuri di voler procedere con la consegna?"
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model,name:stock_release_channel_shipment_advice_deliver.model_stock_picking
+msgid "Transfer"
+msgstr "Trasferimento"
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model,name:stock_release_channel_shipment_advice_deliver.model_stock_release_channel_deliver_check_wizard
+msgid "stock release channel deliver check wizard"
+msgstr "procedura guidata controllo consegna canale rilascio magazzino"
diff --git a/stock_release_channel_shipment_advice_deliver/i18n/stock_release_channel_shipment_advice_deliver.pot b/stock_release_channel_shipment_advice_deliver/i18n/stock_release_channel_shipment_advice_deliver.pot
new file mode 100644
index 0000000000..d3f3034a8e
--- /dev/null
+++ b/stock_release_channel_shipment_advice_deliver/i18n/stock_release_channel_shipment_advice_deliver.pot
@@ -0,0 +1,272 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * stock_release_channel_shipment_advice_deliver
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 16.0\n"
+"Report-Msgid-Bugs-To: \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_shipment_advice_deliver
+#: model_terms:ir.ui.view,arch_db:stock_release_channel_shipment_advice_deliver.stock_release_channel_kanban_view
+msgid "Deliver"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#. odoo-python
+#: code:addons/stock_release_channel_shipment_advice_deliver/models/stock_release_channel.py:0
+#, python-format
+msgid "Action 'Deliver' is not allowed for the channel %(name)s."
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#. odoo-python
+#: code:addons/stock_release_channel_shipment_advice_deliver/models/stock_release_channel.py:0
+#, python-format
+msgid "Action 'Delivered' is not allowed for channel %(name)s."
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#. odoo-python
+#: code:addons/stock_release_channel_shipment_advice_deliver/models/stock_release_channel.py:0
+#, python-format
+msgid "Action 'Delivering Error' is not allowed for channel %(name)s."
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#. odoo-python
+#: code:addons/stock_release_channel_shipment_advice_deliver/models/stock_release_channel.py:0
+#, python-format
+msgid ""
+"An error occurred in the delivery background task for the channel %(name)s"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#. odoo-python
+#: code:addons/stock_release_channel_shipment_advice_deliver/models/stock_release_channel.py:0
+#, python-format
+msgid ""
+"An error occurred while processing the delivery automatically:\n"
+"- %(related_object_name)s: %(error)s"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel__auto_deliver
+msgid "Auto Deliver"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#. odoo-python
+#: code:addons/stock_release_channel_shipment_advice_deliver/models/shipment_advice.py:0
+#: code:addons/stock_release_channel_shipment_advice_deliver/models/stock_release_channel.py:0
+#, python-format
+msgid "Automatically process the shipment advice %(name)s."
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model_terms:ir.ui.view,arch_db:stock_release_channel_shipment_advice_deliver.stock_release_channel_deliver_check_wizard_form_view
+msgid "Cancel the deliver"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#. odoo-python
+#: code:addons/stock_release_channel_shipment_advice_deliver/models/stock_release_channel.py:0
+#, python-format
+msgid "Confirm delivery"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel_deliver_check_wizard__create_uid
+msgid "Created by"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel_deliver_check_wizard__create_date
+msgid "Created on"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model_terms:ir.ui.view,arch_db:stock_release_channel_shipment_advice_deliver.stock_release_channel_form_view
+msgid "Deliver"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model_terms:ir.ui.view,arch_db:stock_release_channel_shipment_advice_deliver.stock_release_channel_deliver_check_wizard_form_view
+msgid "Deliver any way"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields.selection,name:stock_release_channel_shipment_advice_deliver.selection__stock_release_channel__state__delivered
+msgid "Delivered"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields.selection,name:stock_release_channel_shipment_advice_deliver.selection__stock_release_channel__state__delivering
+#: model_terms:ir.ui.view,arch_db:stock_release_channel_shipment_advice_deliver.stock_release_channel_search_view
+msgid "Delivering"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel__delivering_error
+#: model:ir.model.fields.selection,name:stock_release_channel_shipment_advice_deliver.selection__stock_release_channel__state__delivering_error
+msgid "Delivering Error"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#. odoo-python
+#: code:addons/stock_release_channel_shipment_advice_deliver/models/stock_release_channel.py:0
+#, python-format
+msgid "Delivering release channel %(name)s."
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel_deliver_check_wizard__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel_deliver_check_wizard__id
+msgid "ID"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel__in_process_shipment_advice_ids
+msgid "In Process Shipment Advice"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_shipment_advice__in_release_channel_auto_process
+msgid "In Release Channel Auto Process"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel__is_action_deliver_allowed
+msgid "Is Action Deliver Allowed"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel__is_action_delivered_allowed
+msgid "Is Action Delivered Allowed"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel__is_action_delivering_error_allowed
+msgid "Is Action Delivering Error Allowed"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel_deliver_check_wizard____last_update
+msgid "Last Modified on"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel_deliver_check_wizard__write_uid
+msgid "Last Updated by"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel_deliver_check_wizard__write_date
+msgid "Last Updated on"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#. odoo-python
+#: code:addons/stock_release_channel_shipment_advice_deliver/models/stock_release_channel.py:0
+#, python-format
+msgid "No picking to deliver for channel %(name)s."
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#. odoo-python
+#: code:addons/stock_release_channel_shipment_advice_deliver/models/stock_release_channel.py:0
+#, python-format
+msgid ""
+"One of the delivery for channel %(name)s is waiting on another transfer. \n"
+"Please finish it manually or cancel its start and done quantities to be able to deliver.\n"
+"%(pickings)s"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel_deliver_check_wizard__release_channel_id
+msgid "Release Channel"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model,name:stock_release_channel_shipment_advice_deliver.model_shipment_advice
+msgid "Shipment Advice"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#. odoo-python
+#: code:addons/stock_release_channel_shipment_advice_deliver/models/stock_release_channel.py:0
+#, python-format
+msgid ""
+"Some deliveries have not been prepared but cannot be unreleased.\n"
+"\n"
+"%(shipping)s"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel__state
+msgid "State"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model_terms:ir.ui.view,arch_db:stock_release_channel_shipment_advice_deliver.stock_release_channel_deliver_check_wizard_form_view
+msgid "Stock Release Channel Deliver Check"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model,name:stock_release_channel_shipment_advice_deliver.model_stock_release_channel
+msgid "Stock Release Channels"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,help:stock_release_channel_shipment_advice_deliver.field_shipment_advice__in_release_channel_auto_process
+msgid ""
+"Technical field to flag shipment advice that are in a release channel auto-"
+"process"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#. odoo-python
+#: code:addons/stock_release_channel_shipment_advice_deliver/models/stock_release_channel.py:0
+#, python-format
+msgid "The delivery background task is done for the channel %(name)s"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model.fields,help:stock_release_channel_shipment_advice_deliver.field_stock_release_channel__state
+msgid ""
+"The state allows you to control the availability of the release channel.\n"
+"* Open: Manual and automatic picking assignment to the release is effective and release operations are allowed.\n"
+" * Locked: Release operations are forbidden. (Assignement processes are still working)\n"
+"* Delivering: A background task is running to automatically deliver ready shipments\n"
+"* Delivering Error: An error occurred in the delivery background task\n"
+"* Delivered: Ready transfers are delivered\n"
+"* Asleep: Assigned pickings not processed are unassigned from the release channel.\n"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model_terms:ir.ui.view,arch_db:stock_release_channel_shipment_advice_deliver.stock_release_channel_deliver_check_wizard_form_view
+msgid ""
+"There are some preparations that have not been completed.\n"
+" If you choose to proceed, these preparations will be unreleased.
\n"
+" Are you sure you want to proceed with the delivery?"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model,name:stock_release_channel_shipment_advice_deliver.model_stock_picking
+msgid "Transfer"
+msgstr ""
+
+#. module: stock_release_channel_shipment_advice_deliver
+#: model:ir.model,name:stock_release_channel_shipment_advice_deliver.model_stock_release_channel_deliver_check_wizard
+msgid "stock release channel deliver check wizard"
+msgstr ""
diff --git a/stock_release_channel_shipment_advice_deliver/models/stock_release_channel.py b/stock_release_channel_shipment_advice_deliver/models/stock_release_channel.py
index 6e1145c71d..f45acda9c6 100644
--- a/stock_release_channel_shipment_advice_deliver/models/stock_release_channel.py
+++ b/stock_release_channel_shipment_advice_deliver/models/stock_release_channel.py
@@ -115,11 +115,7 @@ def _picking_moves_to_unrelease(self):
)
def _shipping_moves_to_unrelease(self):
- moves = self.picking_ids.move_ids.filtered(
- lambda m: m.picking_type_id.code == "outgoing"
- and not m.need_release
- and m.state in ("waiting", "partially_available")
- )
+ moves = self.open_picking_ids.move_ids.filtered(lambda m: m._is_unreleaseable())
# The internal operation could have been processed without backorder.
# In this case, we don't have something to unrelease
for move in moves:
diff --git a/stock_release_channel_shipment_advice_deliver/static/description/icon.png b/stock_release_channel_shipment_advice_deliver/static/description/icon.png
new file mode 100644
index 0000000000..3a0328b516
Binary files /dev/null and b/stock_release_channel_shipment_advice_deliver/static/description/icon.png differ
diff --git a/stock_release_channel_shipment_advice_deliver/static/description/index.html b/stock_release_channel_shipment_advice_deliver/static/description/index.html
index dd0c209704..21dbe7e8e9 100644
--- a/stock_release_channel_shipment_advice_deliver/static/description/index.html
+++ b/stock_release_channel_shipment_advice_deliver/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 {
@@ -367,7 +367,7 @@ Stock Release Channel Shipment Advice Deliver
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! source digest: sha256:3be993cbf406a294ea53a79355920e76f18b7430227b696ac8b052fa7d45b673
+!! source digest: sha256:dc1500cd3d3aeb4cc935b248aebbb30988b012245111ed6a0685e9bce156503d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
Authors
Maintainers