Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][IMP] stock_release_channel_shipment_advice_deliver: Improve wizard #935

Open
wants to merge 33 commits into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
8a88d26
[FIX] stock_available_to_promise_release: avoid infinite loop when at…
sbejaoui Jul 10, 2024
1309f73
[BOT] post-merge updates
OCA-git-bot Oct 4, 2024
659ab68
[IMP] shopfloor: Add postponed argument for start_single tests
rousseldenis Jun 27, 2024
a13402d
[FIX] shopfloor: When a move line is postponed, reset the qty_done
rousseldenis Jun 27, 2024
da7a618
[BOT] post-merge updates
OCA-git-bot Oct 4, 2024
7d4161b
[IMP] shopfloor: Makes sort method overridable in cluster picking
lmignon Jul 1, 2024
a448d43
[IMP] shopfloor_batch_automatic_creation: Custom sorting by device
lmignon Jul 1, 2024
fbe85e1
[UPD] Update shopfloor_batch_automatic_creation.pot
Oct 4, 2024
e18b4fe
[BOT] post-merge updates
OCA-git-bot Oct 4, 2024
1f2ccfe
Update translation files
weblate Oct 4, 2024
91123aa
[IMP] stock_release_channel
jbaudoux Oct 1, 2024
4beb8ed
[PERF] stock_release_channel_shipment_advice_deliver
jbaudoux Oct 1, 2024
84bda20
stock_release_channel: minor fix
jbaudoux Oct 4, 2024
8b15d6a
[I18N] stock_release_channel_shipment_advice_deliver: fr
jbaudoux Oct 4, 2024
d55f1a8
[UPD] Update stock_release_channel.pot
Oct 5, 2024
7067c61
[UPD] Update stock_release_channel_shipment_advice_deliver.pot
Oct 5, 2024
bdb067f
[BOT] post-merge updates
OCA-git-bot Oct 5, 2024
667c96d
Update translation files
weblate Oct 5, 2024
917a26c
Added translation using Weblate (Italian)
mymage Oct 5, 2024
5a5a75d
Translated using Weblate (Italian)
mymage Oct 5, 2024
e20c89a
Translated using Weblate (Italian)
mymage Oct 5, 2024
601bb78
[FIX] stock_available_to_promise_release: Don't post message if no pi…
rousseldenis Apr 10, 2024
3e35c17
[IMP] stock_available_to_promise_release: Improve tests
rousseldenis Jun 19, 2024
258d80d
[BOT] post-merge updates
OCA-git-bot Oct 7, 2024
1cb9d6c
[FIX] sale_stock_available_to_promise_release MTO sale availability s…
santostelmo May 16, 2024
ed1dc56
[BOT] post-merge updates
OCA-git-bot Oct 7, 2024
75d6915
[IMP] stock_available_to_promise_release: Improve migration/init scri…
rousseldenis Apr 10, 2024
43c34df
[BOT] post-merge updates
OCA-git-bot Oct 7, 2024
29102ff
Translated using Weblate (Italian)
mymage Oct 8, 2024
f323c0a
[IMP] stock_release_channel_shipment_advice_deliver: Allows to displa…
rousseldenis Aug 26, 2024
1fbe6bf
[IMP] stock_release_channel_shipment_advice_deliver: Use field to ret…
rousseldenis Aug 27, 2024
6417020
[IMP] stock_release_channel_shipment_advice_deliver: Improve deliver …
rousseldenis Sep 24, 2024
132812f
[IMP] stock_release_channel_shipment_advice_deliver: Improve deliver …
rousseldenis Oct 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# generated from manifests external_dependencies
openupgradelib
2 changes: 1 addition & 1 deletion sale_stock_available_to_promise_release/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sale_stock_available_to_promise_release/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

/*
:Author: David Goodger ([email protected])
: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.
Expand Down Expand Up @@ -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 }
Expand All @@ -300,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -366,7 +367,7 @@ <h1 class="title">Stock Available to Promise Release - Sale Integration</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e4c37274c2cf3633d0c424f9c698748d1ed14bda2deadcce97d63f29e163f57f
!! source digest: sha256:e0a38c05b7a13502738274fb015828d7be55ec2d96bb57ce438331c8e9991934
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/wms/tree/16.0/sale_stock_available_to_promise_release"><img alt="OCA/wms" src="https://img.shields.io/badge/github-OCA%2Fwms-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/wms-16-0/wms-16-0-sale_stock_available_to_promise_release"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/wms&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Integrate the Release of Operation based on Available to Promise with Sales. The Priority Date of Stock
Expand Down Expand Up @@ -415,7 +416,9 @@ <h2><a class="toc-backref" href="#toc-entry-5">Other credits</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
Expand Down
2 changes: 1 addition & 1 deletion setup/_metapackage/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.0.20240911.0
16.0.20241005.0
1 change: 1 addition & 0 deletions setup/_metapackage/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion shopfloor/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion shopfloor/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 10 additions & 0 deletions shopfloor/models/stock_move_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 1 addition & 2 deletions shopfloor/services/cluster_picking.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "",
Expand Down
2 changes: 1 addition & 1 deletion shopfloor/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Shopfloor</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:ead0fe2c0f59657c626fab9f161b3488d16841ff8c6dfab47b091d6e5fb9c852
!! source digest: sha256:8c610188b1ca56f5f11da8e51e3fd390897186bc38eed9c6246f4cc394dccda1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/wms/tree/16.0/shopfloor"><img alt="OCA/wms" src="https://img.shields.io/badge/github-OCA%2Fwms-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/wms-16-0/wms-16-0-shopfloor"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/wms&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>Shopfloor is a barcode scanner application for internal warehouse operations.</p>
Expand Down
58 changes: 57 additions & 1 deletion shopfloor/tests/test_location_content_transfer_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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",
Expand Down
Loading