From f37c2ea7867d1580c8ea8670052ea05137b1832f Mon Sep 17 00:00:00 2001 From: Maxime Richez Date: Mon, 12 Oct 2020 23:19:54 +0200 Subject: [PATCH] Add picked step to customer shipment workflow issue9634 review329071002 --- stock.py | 4 ++-- tests/scenario_stock_package.rst | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/stock.py b/stock.py index e3aa911356..e11fce06da 100644 --- a/stock.py +++ b/stock.py @@ -177,13 +177,13 @@ class PackageMixin(object): __slots__ = () packages = fields.One2Many('stock.package', 'shipment', 'Packages', states={ - 'readonly': Eval('state').in_(['packed', 'done', 'cancelled']), + 'readonly': Eval('state') != 'picked', }) root_packages = fields.Function(fields.One2Many('stock.package', 'shipment', 'Packages', domain=[('parent', '=', None)], states={ - 'readonly': Eval('state').in_(['packed', 'done', 'cancelled']), + 'readonly': Eval('state') != 'picked', }), 'get_root_packages', setter='set_root_packages') def get_root_packages(self, name): diff --git a/tests/scenario_stock_package.rst b/tests/scenario_stock_package.rst index 5969402517..95d1f98660 100644 --- a/tests/scenario_stock_package.rst +++ b/tests/scenario_stock_package.rst @@ -80,6 +80,7 @@ Pack shipment:: >>> shipment_out.click('wait') >>> shipment_out.click('assign_force') + >>> shipment_out.click('pick') Package products::