diff --git a/README.md b/README.md index 52564990b4..e690de02b0 100644 --- a/README.md +++ b/README.md @@ -22,27 +22,27 @@ Available addons addon | version | maintainers | summary --- | --- | --- | --- [delivery_carrier_warehouse](delivery_carrier_warehouse/) | 16.0.1.0.1 | | Get delivery method used in sales orders from warehouse -[sale_stock_available_to_promise_release](sale_stock_available_to_promise_release/) | 16.0.1.1.0 | | Integration between Sales and Available to Promise Release +[sale_stock_available_to_promise_release](sale_stock_available_to_promise_release/) | 16.0.1.1.1 | | Integration between Sales and Available to Promise Release [sale_stock_available_to_promise_release_block](sale_stock_available_to_promise_release_block/) | 16.0.1.0.0 | | Block release of deliveries from sales orders. [sale_stock_release_channel_partner_by_date](sale_stock_release_channel_partner_by_date/) | 16.0.1.1.0 | [![sebalix](https://github.com/sebalix.png?size=30px)](https://github.com/sebalix) | Release channels integration with Sales [sale_stock_release_channel_partner_by_date_delivery](sale_stock_release_channel_partner_by_date_delivery/) | 16.0.1.1.0 | [![sebalix](https://github.com/sebalix.png?size=30px)](https://github.com/sebalix) | Filters channels on sales based on selected carrier. -[shopfloor](shopfloor/) | 16.0.2.1.1 | [![guewen](https://github.com/guewen.png?size=30px)](https://github.com/guewen) [![simahawk](https://github.com/simahawk.png?size=30px)](https://github.com/simahawk) [![sebalix](https://github.com/sebalix.png?size=30px)](https://github.com/sebalix) | manage warehouse operations with barcode scanners +[shopfloor](shopfloor/) | 16.0.2.2.0 | [![guewen](https://github.com/guewen.png?size=30px)](https://github.com/guewen) [![simahawk](https://github.com/simahawk.png?size=30px)](https://github.com/simahawk) [![sebalix](https://github.com/sebalix.png?size=30px)](https://github.com/sebalix) | manage warehouse operations with barcode scanners [shopfloor_base](shopfloor_base/) | 16.0.1.1.0 | [![guewen](https://github.com/guewen.png?size=30px)](https://github.com/guewen) [![simahawk](https://github.com/simahawk.png?size=30px)](https://github.com/simahawk) [![sebalix](https://github.com/sebalix.png?size=30px)](https://github.com/sebalix) | Core module for creating mobile apps -[shopfloor_batch_automatic_creation](shopfloor_batch_automatic_creation/) | 16.0.1.0.0 | [![guewen](https://github.com/guewen.png?size=30px)](https://github.com/guewen) | Create batch transfers for Cluster Picking +[shopfloor_batch_automatic_creation](shopfloor_batch_automatic_creation/) | 16.0.1.1.0 | [![guewen](https://github.com/guewen.png?size=30px)](https://github.com/guewen) | Create batch transfers for Cluster Picking [shopfloor_mobile](shopfloor_mobile/) | 16.0.1.2.0 | [![simahawk](https://github.com/simahawk.png?size=30px)](https://github.com/simahawk) | Mobile frontend for WMS Shopfloor app [shopfloor_mobile_base](shopfloor_mobile_base/) | 16.0.1.1.0 | [![simahawk](https://github.com/simahawk.png?size=30px)](https://github.com/simahawk) | Mobile frontend for WMS Shopfloor app [shopfloor_mobile_base_auth_api_key](shopfloor_mobile_base_auth_api_key/) | 16.0.1.0.0 | | Provides authentication via API key to Shopfloor base mobile app [shopfloor_rest_log](shopfloor_rest_log/) | 16.0.1.0.0 | [![simahawk](https://github.com/simahawk.png?size=30px)](https://github.com/simahawk) | Integrate rest_log into Shopfloor app [shopfloor_workstation](shopfloor_workstation/) | 16.0.1.0.0 | | Manage warehouse workstation with barcode scanners [shopfloor_workstation_mobile](shopfloor_workstation_mobile/) | 16.0.1.0.0 | | Shopfloor mobile app integration for workstation -[stock_available_to_promise_release](stock_available_to_promise_release/) | 16.0.3.3.0 | | Release Operations based on available to promise +[stock_available_to_promise_release](stock_available_to_promise_release/) | 16.0.3.5.0 | | Release Operations based on available to promise [stock_available_to_promise_release_block](stock_available_to_promise_release_block/) | 16.0.1.1.1 | | Block Release of Operations [stock_available_to_promise_release_exclude_location](stock_available_to_promise_release_exclude_location/) | 16.0.1.0.0 | | Exclude locations from available stock [stock_dynamic_routing](stock_dynamic_routing/) | 16.0.1.0.2 | | Dynamic routing of stock moves [stock_picking_batch_creation](stock_picking_batch_creation/) | 16.0.1.0.0 | [![lmignon](https://github.com/lmignon.png?size=30px)](https://github.com/lmignon) | Create a batch of pickings to be processed all together [stock_picking_completion_info](stock_picking_completion_info/) | 16.0.1.0.1 | | Display on current document completion information according to next operations [stock_picking_type_shipping_policy](stock_picking_type_shipping_policy/) | 16.0.1.0.0 | | Define different shipping policies according to picking type -[stock_release_channel](stock_release_channel/) | 16.0.2.17.0 | [![sebalix](https://github.com/sebalix.png?size=30px)](https://github.com/sebalix) [![jbaudoux](https://github.com/jbaudoux.png?size=30px)](https://github.com/jbaudoux) [![mt-software-de](https://github.com/mt-software-de.png?size=30px)](https://github.com/mt-software-de) | Manage workload in WMS with release channels +[stock_release_channel](stock_release_channel/) | 16.0.2.18.0 | [![sebalix](https://github.com/sebalix.png?size=30px)](https://github.com/sebalix) [![jbaudoux](https://github.com/jbaudoux.png?size=30px)](https://github.com/jbaudoux) [![mt-software-de](https://github.com/mt-software-de.png?size=30px)](https://github.com/mt-software-de) | Manage workload in WMS with release channels [stock_release_channel_auto_release](stock_release_channel_auto_release/) | 16.0.1.1.0 | | Add an automatic release mode to the release channel [stock_release_channel_batch_mode_commercial_partner](stock_release_channel_batch_mode_commercial_partner/) | 16.0.1.0.2 | | Release pickings into channels by batch of same commercial entity [stock_release_channel_cutoff](stock_release_channel_cutoff/) | 16.0.1.0.2 | [![jbaudoux](https://github.com/jbaudoux.png?size=30px)](https://github.com/jbaudoux) | Add the cutoff time to the release channel @@ -56,6 +56,7 @@ addon | version | maintainers | summary [stock_release_channel_process_end_time](stock_release_channel_process_end_time/) | 16.0.1.7.0 | [![rousseldenis](https://github.com/rousseldenis.png?size=30px)](https://github.com/rousseldenis) [![jbaudoux](https://github.com/jbaudoux.png?size=30px)](https://github.com/jbaudoux) | Allows to define an end date (and time) on a release channel and propagate it to the concerned pickings [stock_release_channel_propagate_channel_picking](stock_release_channel_propagate_channel_picking/) | 16.0.1.2.0 | | Allows to propagate the channel to every picking that is created from the original one. [stock_release_channel_shipment_advice](stock_release_channel_shipment_advice/) | 16.0.1.2.0 | [![jbaudoux](https://github.com/jbaudoux.png?size=30px)](https://github.com/jbaudoux) | Plan shipment advices for ready and released pickings +[stock_release_channel_shipment_advice_deliver](stock_release_channel_shipment_advice_deliver/) | 16.0.1.1.0 | | This module adds an action to the release channel to automate the delivery of its shippings. [stock_release_channel_shipment_advice_process_end_time](stock_release_channel_shipment_advice_process_end_time/) | 16.0.1.0.0 | | This module allows to set a delay time (in minutes) between the release channel process end time and the shipment advice arrival to the dock time. [stock_release_channel_shipment_advice_toursolver](stock_release_channel_shipment_advice_toursolver/) | 16.0.1.0.1 | | Use TourSolver to plan shipment advices for ready and released pickings [stock_release_channel_shipment_lead_time](stock_release_channel_shipment_lead_time/) | 16.0.1.3.0 | [![jbaudoux](https://github.com/jbaudoux.png?size=30px)](https://github.com/jbaudoux) | Release channel with shipment lead time diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000..180fc49789 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +# generated from manifests external_dependencies +openupgradelib diff --git a/sale_stock_available_to_promise_release/README.rst b/sale_stock_available_to_promise_release/README.rst index d7504b0842..5c45856975 100644 --- a/sale_stock_available_to_promise_release/README.rst +++ b/sale_stock_available_to_promise_release/README.rst @@ -7,7 +7,7 @@ Stock Available to Promise Release - Sale Integration !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:e4c37274c2cf3633d0c424f9c698748d1ed14bda2deadcce97d63f29e163f57f + !! source digest: sha256:e0a38c05b7a13502738274fb015828d7be55ec2d96bb57ce438331c8e9991934 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/sale_stock_available_to_promise_release/__manifest__.py b/sale_stock_available_to_promise_release/__manifest__.py index 29c664e192..cfb4ead19e 100644 --- a/sale_stock_available_to_promise_release/__manifest__.py +++ b/sale_stock_available_to_promise_release/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Stock Available to Promise Release - Sale Integration", - "version": "16.0.1.1.0", + "version": "16.0.1.1.1", "summary": "Integration between Sales and Available to Promise Release", "author": "Camptocamp,Odoo Community Association (OCA)", "category": "Stock Management", diff --git a/sale_stock_available_to_promise_release/models/sale_order_line.py b/sale_stock_available_to_promise_release/models/sale_order_line.py index 96612b8eee..8d1fe4f8cc 100644 --- a/sale_stock_available_to_promise_release/models/sale_order_line.py +++ b/sale_stock_available_to_promise_release/models/sale_order_line.py @@ -77,7 +77,7 @@ def _get_availability_data(self): if self._on_order_route(): availability_status = "on_order" # Fully available - elif ( + if ( product.type == "service" or float_compare( available_qty, self.product_uom_qty, precision_rounding=rounding diff --git a/sale_stock_available_to_promise_release/static/description/index.html b/sale_stock_available_to_promise_release/static/description/index.html index e053237788..cd2a760338 100644 --- a/sale_stock_available_to_promise_release/static/description/index.html +++ b/sale_stock_available_to_promise_release/static/description/index.html @@ -8,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. @@ -274,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 } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -366,7 +367,7 @@

Stock Available to Promise Release - Sale Integration

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:e4c37274c2cf3633d0c424f9c698748d1ed14bda2deadcce97d63f29e163f57f +!! source digest: sha256:e0a38c05b7a13502738274fb015828d7be55ec2d96bb57ce438331c8e9991934 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

Integrate the Release of Operation based on Available to Promise with Sales. The Priority Date of Stock @@ -415,7 +416,9 @@

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.

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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

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 \n" "Language-Team: none\n" "Language: it\n" @@ -14,7 +14,21 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.17\n" +"X-Generator: Weblate 5.6.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 "" +"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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

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 @@ + + + + + + stock.device.type + + +
+

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.

+
+ +
+
+
+ +
diff --git a/stock_available_to_promise_release/README.rst b/stock_available_to_promise_release/README.rst index fcbcb19ff3..0a248b0ae9 100644 --- a/stock_available_to_promise_release/README.rst +++ b/stock_available_to_promise_release/README.rst @@ -7,7 +7,7 @@ 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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/stock_available_to_promise_release/__init__.py b/stock_available_to_promise_release/__init__.py index cedd78e82c..0eff9147b6 100644 --- a/stock_available_to_promise_release/__init__.py +++ b/stock_available_to_promise_release/__init__.py @@ -1,3 +1,3 @@ from . import models from . import wizards -from .hooks import pre_init_hook +from .hooks import init_release_policy, pre_init_hook diff --git a/stock_available_to_promise_release/__manifest__.py b/stock_available_to_promise_release/__manifest__.py index 5cddea8d64..06732e8d05 100644 --- a/stock_available_to_promise_release/__manifest__.py +++ b/stock_available_to_promise_release/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Stock Available to Promise Release", - "version": "16.0.3.3.0", + "version": "16.0.3.5.0", "summary": "Release Operations based on available to promise", "author": "Camptocamp, BCIM, Odoo Community Association (OCA)", "website": "https://github.com/OCA/wms", @@ -25,4 +25,5 @@ "application": False, "development_status": "Beta", "pre_init_hook": "pre_init_hook", + "external_dependencies": {"python": ["openupgradelib"]}, } diff --git a/stock_available_to_promise_release/hooks.py b/stock_available_to_promise_release/hooks.py index 6f895a78e3..4a00ceb42e 100644 --- a/stock_available_to_promise_release/hooks.py +++ b/stock_available_to_promise_release/hooks.py @@ -1,13 +1,35 @@ # Copyright 2023 ACSONE SA/NV # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). - import logging +from openupgradelib import openupgrade + +from odoo import SUPERUSER_ID, api from odoo.tools import sql _logger = logging.getLogger(__name__) +def init_release_policy(cr): + if not sql.column_exists(cr, "stock_picking", "release_policy"): + # Use the default sql query instead relying on ORM as all records will + # be updated. + _logger.info("Creating 'release_policy' field on stock.picking") + env = api.Environment(cr, SUPERUSER_ID, {}) + field_spec = [ + ( + "release_policy", + "stock.picking", + False, + "selection", + False, + "stock_available_to_promise_release", + "direct", + ) + ] + openupgrade.add_fields(env, field_spec=field_spec) + + def pre_init_hook(cr): """create and initialize the date priority column on the stock move""" if not sql.column_exists(cr, "stock_move", "date_priority"): @@ -27,3 +49,4 @@ def pre_init_hook(cr): """ ) _logger.info(f"{cr.rowcount} rows updated") + init_release_policy(cr) diff --git a/stock_available_to_promise_release/migrations/16.0.3.1.0/pre-migrate.py b/stock_available_to_promise_release/migrations/16.0.3.1.0/pre-migrate.py index 9487130dbd..57482b4ad6 100644 --- a/stock_available_to_promise_release/migrations/16.0.3.1.0/pre-migrate.py +++ b/stock_available_to_promise_release/migrations/16.0.3.1.0/pre-migrate.py @@ -2,23 +2,14 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from openupgradelib import openupgrade +# pylint: disable=odoo-addons-relative-import +from odoo.addons.stock_available_to_promise_release.hooks import init_release_policy + @openupgrade.migrate() def migrate(env, version): """ - Initialize default value when adding field instead updating every record. + Use the default sql query instead relying on ORM as all records will + be updated. """ - - field_spec = [ - ( - "release_policy", - "stock.picking", - False, - "char", - "varchar", - "stock_available_to_promise_release", - "direct", - ) - ] - - openupgrade.add_fields(env, field_spec=field_spec) + init_release_policy(env.cr) diff --git a/stock_available_to_promise_release/models/stock_move.py b/stock_available_to_promise_release/models/stock_move.py index bf87d2ca68..33471f9fbe 100644 --- a/stock_available_to_promise_release/models/stock_move.py +++ b/stock_available_to_promise_release/models/stock_move.py @@ -667,9 +667,11 @@ def _get_chained_moves_iterator(self, chain_field): The loop into the iterator is the current moves. """ moves = self + visited_moves = self.browse() while moves: yield moves - moves = moves.mapped(chain_field) + visited_moves += moves + moves = moves.mapped(chain_field) - visited_moves def unrelease(self, safe_unrelease=False): """Unrelease unreleasable moves @@ -711,6 +713,8 @@ def unrelease(self, safe_unrelease=False): for picking, moves in itertools.groupby( moves_to_unrelease, lambda m: m.picking_id ): + if not picking: + continue move_names = "\n".join([m.display_name for m in moves]) body = _( "The following moves have been un-released: \n%(move_names)s", diff --git a/stock_available_to_promise_release/static/description/index.html b/stock_available_to_promise_release/static/description/index.html index 042e05989f..f52440fe11 100644 --- a/stock_available_to_promise_release/static/description/index.html +++ b/stock_available_to_promise_release/static/description/index.html @@ -367,7 +367,7 @@

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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

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 \n" "Language-Team: none\n" "Language: it\n" @@ -477,6 +477,11 @@ msgstr "In questa coda non c'è niente!" msgid "Open" msgstr "Aperto" +#. module: stock_release_channel +#: model:ir.model.fields,field_description:stock_release_channel.field_stock_release_channel__open_picking_ids +msgid "Open Transfers" +msgstr "Trasferimenti aperti" + #. module: stock_release_channel #: model:ir.model.fields,field_description:stock_release_channel.field_stock_release_channel__picking_type_ids msgid "Operation Types" @@ -700,16 +705,25 @@ 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 "" -"Lo stato consenti di controllare la disponibilità del canale di rilascio.\n" -"* Aperto: assegnazione manuale e automatica del prelievo al rilascio è " -"attiva e le operazioni di rilascio sono consentite.\n" -"* Bloccato: le operazioni di rilascio sono vietate. (i processi di " -"assegnazione sono ancora in lavoro)\n" -"* Sospeso: i prelievi assegnati e non elaborati vengono revocati dal canale " -"di rilascio.\n" +"Lo stato consente di controllare la disponibilità del canale di rilascio.\n" +"* Apri: l'assegnazione manuale e automatica di raccolta al rilascio è " +"efficace e sono consentite operazioni di rilascio.\n" +"* Bloccato: le operazioni di rilascio sono vietate. (I processi di " +"assegnazione stanno ancora funzionando)\n" +"* Consegna: un'attività di fondo è in esecuzione per consegnare " +"automaticamente le spedizioni pronte\n" +"* Errore di consegna: si è verificato un errore nell'attività di background " +"di consegna\n" +"* Consegnato: vengono consegnati trasferimenti pronti\n" +"* Dormienti: i prelievi assegnati non elaborati non sono assegnati dal " +"canale di rilascio.\n" #. module: stock_release_channel #: model:ir.model.fields,help:stock_release_channel.field_stock_release_channel__state_at_wakeup @@ -834,6 +848,24 @@ msgstr "" msgid "name" msgstr "nome" +#~ 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 "" +#~ "Lo stato consenti di controllare la disponibilità del canale di " +#~ "rilascio.\n" +#~ "* Aperto: assegnazione manuale e automatica del prelievo al rilascio è " +#~ "attiva e le operazioni di rilascio sono consentite.\n" +#~ "* Bloccato: le operazioni di rilascio sono vietate. (i processi di " +#~ "assegnazione sono ancora in lavoro)\n" +#~ "* Sospeso: i prelievi assegnati e non elaborati vengono revocati dal " +#~ "canale di rilascio.\n" + #~ msgid "To Do Situation" #~ msgstr "Situazione del da fare" diff --git a/stock_release_channel/i18n/stock_release_channel.pot b/stock_release_channel/i18n/stock_release_channel.pot index fc017acc89..ba14126b26 100644 --- a/stock_release_channel/i18n/stock_release_channel.pot +++ b/stock_release_channel/i18n/stock_release_channel.pot @@ -461,6 +461,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" @@ -682,6 +687,9 @@ 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 "" diff --git a/stock_release_channel/models/stock_release_channel.py b/stock_release_channel/models/stock_release_channel.py index fd96c1e064..1e5671e74f 100644 --- a/stock_release_channel/models/stock_release_channel.py +++ b/stock_release_channel/models/stock_release_channel.py @@ -102,6 +102,12 @@ class StockReleaseChannel(models.Model): inverse_name="release_channel_id", check_company=True, ) + open_picking_ids = fields.One2many( + string="Open Transfers", + related="picking_ids", + readonly=True, + domain=[("state", "not in", ("done", "cancel"))], + ) # beware not to store any value which can be changed by concurrent # stock.picking (e.g. the state cannot be stored) @@ -187,7 +193,7 @@ class StockReleaseChannel(models.Model): selection=[("open", "Open"), ("locked", "Locked"), ("asleep", "Asleep")], help="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 " + "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 " diff --git a/stock_release_channel/static/description/index.html b/stock_release_channel/static/description/index.html index 75653d21e7..20ff73a287 100644 --- a/stock_release_channel/static/description/index.html +++ b/stock_release_channel/static/description/index.html @@ -367,7 +367,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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

Release channels are:

diff --git a/stock_release_channel_shipment_advice_deliver/README.rst b/stock_release_channel_shipment_advice_deliver/README.rst index 6f01031b0f..986a237056 100644 --- a/stock_release_channel_shipment_advice_deliver/README.rst +++ b/stock_release_channel_shipment_advice_deliver/README.rst @@ -7,7 +7,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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/stock_release_channel_shipment_advice_deliver/__manifest__.py b/stock_release_channel_shipment_advice_deliver/__manifest__.py index 20c26d9bc9..074ba3c2bb 100644 --- a/stock_release_channel_shipment_advice_deliver/__manifest__.py +++ b/stock_release_channel_shipment_advice_deliver/__manifest__.py @@ -8,7 +8,7 @@ "author": "ACSONE SA/NV, BCIM, Odoo Community Association (OCA)", "website": "https://github.com/OCA/wms", "category": "Warehouse Management", - "version": "16.0.1.0.0", + "version": "16.0.1.1.0", "license": "AGPL-3", "depends": [ "stock_release_channel", diff --git a/stock_release_channel_shipment_advice_deliver/i18n/fr.po b/stock_release_channel_shipment_advice_deliver/i18n/fr.po index fad10ee8d2..33db274cca 100644 --- a/stock_release_channel_shipment_advice_deliver/i18n/fr.po +++ b/stock_release_channel_shipment_advice_deliver/i18n/fr.po @@ -6,15 +6,21 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0+e\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-01-23 15:46+0000\n" -"PO-Revision-Date: 2024-01-23 15:46+0000\n" +"POT-Creation-Date: 2024-10-04 12:08+0000\n" +"PO-Revision-Date: 2024-10-04 12:08+0000\n" "Last-Translator: \n" "Language-Team: \n" +"Language: \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 @@ -34,7 +40,8 @@ msgstr "L'action 'Livré' n'est pas autorisée pour le canal %(name)s." #: 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 "L'action 'Erreur de livraison' n'est pas autorisée pour le canal %(name)s." +msgstr "" +"L'action 'Erreur de livraison' n'est pas autorisée pour le canal %(name)s." #. module: stock_release_channel_shipment_advice_deliver #. odoo-python @@ -57,6 +64,11 @@ msgstr "" "Une erreur s'est produite lors du traitement automatique de la livraison:\n" "- %(related_object_name)s: %(error)s" +#. 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 "Livraison automatique" + #. module: stock_release_channel_shipment_advice_deliver #. odoo-python #: code:addons/stock_release_channel_shipment_advice_deliver/models/shipment_advice.py:0 @@ -66,7 +78,7 @@ msgid "Automatically process the shipment advice %(name)s." msgstr "Traiter automatiquement l'avis d'expédition %(name)s." #. module: stock_release_channel_shipment_advice_deliver -#: model_terms:ir.ui.view,arch_db:stock_release_channel_shipment_advice_deliver.stock_release_channel_shipment_advice_deliver_check_wizard_form_view +#: 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 "Annuler la livraison" @@ -78,14 +90,14 @@ msgid "Confirm delivery" msgstr "Confirmer la livraison" #. module: stock_release_channel_shipment_advice_deliver -#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel_shipment_advice_deliver_check_wizard__create_uid +#: 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 "Créé par" +msgstr "" #. module: stock_release_channel_shipment_advice_deliver -#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel_shipment_advice_deliver_check_wizard__create_date +#: 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 "Créé le" +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 @@ -93,9 +105,9 @@ msgid "Deliver" msgstr "Livrer" #. module: stock_release_channel_shipment_advice_deliver -#: model_terms:ir.ui.view,arch_db:stock_release_channel_shipment_advice_deliver.stock_release_channel_shipment_advice_deliver_check_wizard_form_view +#: 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 "Livrer quand même" +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 @@ -122,12 +134,12 @@ msgid "Delivering release channel %(name)s." msgstr "Livraison du canal de livraison %(name)s" #. module: stock_release_channel_shipment_advice_deliver -#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel_shipment_advice_deliver_check_wizard__display_name +#: 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_shipment_advice_deliver_check_wizard__id +#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel_deliver_check_wizard__id msgid "ID" msgstr "" @@ -157,19 +169,19 @@ msgid "Is Action Delivering Error Allowed" msgstr "Action Erreur de livraison Permise" #. module: stock_release_channel_shipment_advice_deliver -#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel_shipment_advice_deliver_check_wizard____last_update +#: 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 "Dernière modification le" +msgstr "" #. module: stock_release_channel_shipment_advice_deliver -#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel_shipment_advice_deliver_check_wizard__write_uid +#: 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 "Dernière modification par" +msgstr "" #. module: stock_release_channel_shipment_advice_deliver -#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel_shipment_advice_deliver_check_wizard__write_date +#: 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 "Dernière modification le" +msgstr "" #. module: stock_release_channel_shipment_advice_deliver #. odoo-python @@ -183,18 +195,20 @@ msgstr "Aucun picking à livrer pour le canal %(name)s." #: 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 printed transfer. \n" -"Please finish it manually or cancel its start to be able to deliver.\n" +"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 "" -"Une des livraison pour le canal %(name)s est en attente d'un autre transfert imprimé.\n" -"Veuillez le terminer manuellement ou annuler son démarrage pour pouvoir livrer.\n" +"Une des livraison du canal %(name)s est en attente d'un autre transfert. \n" +"Veuillez le finaliser manuellement ou annuler son démarrage et les quantités " +"faites afin de pouvoir le livrer.\n" "%(pickings)s" #. module: stock_release_channel_shipment_advice_deliver -#: model:ir.model.fields,field_description:stock_release_channel_shipment_advice_deliver.field_stock_release_channel_shipment_advice_deliver_check_wizard__release_channel_id +#: 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 "Canaux de livraison" +msgstr "" #. module: stock_release_channel_shipment_advice_deliver #: model:ir.model,name:stock_release_channel_shipment_advice_deliver.model_shipment_advice @@ -210,7 +224,8 @@ msgid "" "\n" "%(shipping)s" msgstr "" -"Certaines livraisons n'ont pas été préparées mais ne peuvent pas être délibérées.\n" +"Certaines livraisons n'ont pas été préparées mais ne peuvent pas être " +"délibérées.\n" "\n" "%(shipping)s" @@ -220,12 +235,7 @@ msgid "State" msgstr "État" #. module: stock_release_channel_shipment_advice_deliver -#: model:ir.model,name:stock_release_channel_shipment_advice_deliver.model_stock_picking -msgid "Stock Picking" -msgstr "" - -#. module: stock_release_channel_shipment_advice_deliver -#: model_terms:ir.ui.view,arch_db:stock_release_channel_shipment_advice_deliver.stock_release_channel_shipment_advice_deliver_check_wizard_form_view +#: 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 "" @@ -246,18 +256,24 @@ msgstr "" #: 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 "La tâche d'arrière-plan de livraison est effectuée pour le canal %(name)s." +msgstr "" +"La tâche d'arrière-plan de livraison est effectuée pour le canal %(name)s." #. module: stock_release_channel_shipment_advice_deliver #: model:ir.model.fields,help:stock_release_channel_shipment_advice_deliver.field_stock_release_channel__state +#, fuzzy 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" +"* 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" +"* 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 " @@ -273,17 +289,20 @@ msgstr "" "livraison.\n" #. module: stock_release_channel_shipment_advice_deliver -#: model_terms:ir.ui.view,arch_db:stock_release_channel_shipment_advice_deliver.stock_release_channel_shipment_advice_deliver_check_wizard_form_view +#: 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" +" 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" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.6.2\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 "Consegna" + +#. 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 "L'azione 'Consegna' non è consentita per il canale %(name)s." + +#. 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 "L'azione 'Consegnato' non è consentita per il canale %(name)s." + +#. 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 "L'azione 'Errore consegna' non è consentita per il canale %(name)s." + +#. 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 "" +"Si è verificato un errore nel lavoro di consegna in background per il canale " +"%(name)s" + +#. 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 "" +"Si è verificato un errore nell'elaborazione della consegna automatica:\n" +"- %(related_object_name)s: %(error)s" + +#. 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 "Auto consegna" + +#. 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 "Elabora automaticamente l'avviso di spedizione: %(name)s." + +#. 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 "Annulla la consegna" + +#. 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 "Conferma la consegna" + +#. 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 "Creato da" + +#. 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 "Creato il" + +#. 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 "Consegna" + +#. 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 "Consegna comunque" + +#. 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 "Consegnato" + +#. 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 "In consegna" + +#. 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 "Errore consegna" + +#. 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 "Canale rilascio consegna %(name)s." + +#. 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 "Nome visualizzato" + +#. 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 "ID" + +#. 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 "Avviso spedizione in corso" + +#. 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 "Nel processo automatico del canale di rilascio" + +#. 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 "L'azione di consegna è consentita" + +#. 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 "L'azione consegnata è consentita" + +#. 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 "L'azione errore in consegna è consentita" + +#. 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 "Ultima modifica il" + +#. 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 "Ultimo aggiornamento di" + +#. 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 "Ultimo aggiornamento il" + +#. 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 "Nessun prelievo da consegnare per il canale %(name)s." + +#. 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 "" +"Una delle consegne per il canale %(name)s è in attesa di un altro " +"trasferimento.\n" +"Si prega di terminarla manualmente o annullare le quantità di avvio e di " +"completamento per poter effettuare la consegna.\n" +"%(pickings)s" + +#. 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 "Canale rilascio" + +#. module: stock_release_channel_shipment_advice_deliver +#: model:ir.model,name:stock_release_channel_shipment_advice_deliver.model_shipment_advice +msgid "Shipment Advice" +msgstr "Avviso spedizione" + +#. 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 "" +"Alcune consegne non sono state preparate ma non possono essere annullate.\n" +"\n" +"%(shipping)s" + +#. 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 "Stato" + +#. 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 "Controllo consegna canale rilascio magazzino" + +#. 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 "Canali rilascio magazzino" + +#. 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 "" +"Campo tecnico per segnalare gli avvisi di spedizione che si trovano in un " +"processo automatico del canale di rilascio" + +#. 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 "" +"Il lavoro di consegna in background è stato eseguito per il canale %(name)s" + +#. 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 "" +"Lo stato consente di controllare la disponibilità del canale di rilascio.\n" +"* Apri: l'assegnazione manuale e automatica di raccolta al rilascio è " +"efficace e sono consentite operazioni di rilascio.\n" +"* Bloccato: le operazioni di rilascio sono vietate. (I processi di " +"assegnazione stanno ancora funzionando)\n" +"* Consegna: un'attività di fondo è in esecuzione per consegnare " +"automaticamente le spedizioni pronte\n" +"* Errore di consegna: si è verificato un errore nell'attività di background " +"di consegna\n" +"* Consegnato: vengono consegnati trasferimenti pronti\n" +"* Dormienti: i prelievi assegnati non elaborati non sono assegnati dal " +"canale di rilascio.\n" + +#. 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 "" +"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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

This module adds an action to the release channel to automate the delivery of @@ -432,7 +432,9 @@

Authors

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.

diff --git a/stock_release_channel_shipment_advice_deliver/wizards/stock_release_channel_deliver_check_wizard.py b/stock_release_channel_shipment_advice_deliver/wizards/stock_release_channel_deliver_check_wizard.py index 6879e718bb..6fbc46fc6e 100644 --- a/stock_release_channel_shipment_advice_deliver/wizards/stock_release_channel_deliver_check_wizard.py +++ b/stock_release_channel_shipment_advice_deliver/wizards/stock_release_channel_deliver_check_wizard.py @@ -1,7 +1,7 @@ # Copyright 2023 ACSONE SA/NV # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo import fields, models +from odoo import api, fields, models class StockReleaseChannelDeliverCheckWizard(models.TransientModel): @@ -10,6 +10,25 @@ class StockReleaseChannelDeliverCheckWizard(models.TransientModel): _description = "stock release channel deliver check wizard" release_channel_id = fields.Many2one("stock.release.channel") + allowed_to_unrelease_picking_ids = fields.One2many( + comodel_name="stock.picking", + compute="_compute_allowed_to_unrelease_picking_ids", + string="Current pickings that will be unreleased", + ) + + @api.depends("release_channel_id") + def _compute_allowed_to_unrelease_picking_ids(self) -> None: + """ + Compute the pickings that are allowed to be unreleased. + This can show the user the possible ones that could be delivered. + """ + for wizard in self: + moves_to_unrelease = ( + wizard.release_channel_id._shipping_moves_to_unrelease() + ) + wizard.allowed_to_unrelease_picking_ids = moves_to_unrelease.filtered( + "unrelease_allowed" + ).picking_id def action_deliver(self): self.ensure_one() diff --git a/stock_release_channel_shipment_advice_deliver/wizards/stock_release_channel_deliver_check_wizard.xml b/stock_release_channel_shipment_advice_deliver/wizards/stock_release_channel_deliver_check_wizard.xml index 563206dd5d..0bbac4bdfe 100644 --- a/stock_release_channel_shipment_advice_deliver/wizards/stock_release_channel_deliver_check_wizard.xml +++ b/stock_release_channel_shipment_advice_deliver/wizards/stock_release_channel_deliver_check_wizard.xml @@ -12,11 +12,28 @@

- There are some preparations that have not been completed. - If you choose to proceed, these preparations will be unreleased.
- Are you sure you want to proceed with the delivery? + There are some preparations that have not been completed.
+ If you choose to proceed, these preparations will be unreleased and won't be delivered or delivered partially.

+ Are you sure you want to proceed with the delivery?

+ + + + + + + +