changeset cfced3f166f2 in modules/stock:default
details: https://hg.tryton.org/modules/stock?cmd=changeset;node=cfced3f166f2
description:
Make outgoing moves editable for same storage and output zone
issue9960
review347401002
diffstat:
CHANGELOG | 1 +
shipment.py | 8 ++++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 22c80034a51f -r cfced3f166f2 CHANGELOG
--- a/CHANGELOG Sat Feb 13 22:10:53 2021 +0100
+++ b/CHANGELOG Mon Feb 15 13:59:13 2021 +0100
@@ -1,4 +1,5 @@
* Add delivery usage to contact mechanism
+* Make customer's outgoing moves editable for same storage and output zone
* Add margin reporting
* Add products_by_locations Model
diff -r 22c80034a51f -r cfced3f166f2 shipment.py
--- a/shipment.py Sat Feb 13 22:10:53 2021 +0100
+++ b/shipment.py Mon Feb 15 13:59:13 2021 +0100
@@ -916,8 +916,12 @@
('company', '=', Eval('company')),
],
states={
- 'readonly': ((Eval('state').in_(
- ['waiting', 'packed', 'done', 'cancelled']))
+ 'readonly': (Eval('state').in_(
+ If(Eval('warehouse_storage')
+ == Eval('warehouse_output'),
+ ['done', 'cancelled'],
+ ['waiting', 'packed', 'done', 'cancelled'],
+ ))
| ~Eval('warehouse') | ~Eval('customer')),
},
depends=['state', 'warehouse', 'customer', 'warehouse_output',