changeset 2ff2430b92ac in modules/purchase:default details: https://hg.tryton.org/modules/purchase?cmd=changeset&node=2ff2430b92ac description: Do not show edited delivery date once the purchase is processed
We must show the computed delivery date once the edition is not more possible issue10394 review348341002 diffstat: purchase.py | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diffs (28 lines): diff -r 17b4effbfd08 -r 2ff2430b92ac purchase.py --- a/purchase.py Mon May 03 15:54:35 2021 +0200 +++ b/purchase.py Mon May 10 12:39:02 2021 +0200 @@ -1165,9 +1165,11 @@ delivery_date = fields.Function(fields.Date('Delivery Date', states={ 'invisible': ((Eval('type') != 'line') - | Eval('delivery_date_edit', False)), + | (Eval('delivery_date_edit', False) + & ~Eval('purchase_state').in_( + ['processing', 'done', 'cancelled']))), }, - depends=['type', 'delivery_date_edit']), + depends=['type', 'delivery_date_edit', 'purchase_state']), 'on_change_with_delivery_date') delivery_date_edit = fields.Boolean( "Edit Delivery Date", @@ -1182,7 +1184,9 @@ "Delivery Date", states={ 'invisible': ((Eval('type') != 'line') - | ~Eval('delivery_date_edit', False)), + | ~Eval('delivery_date_edit', False) + | Eval('purchase_state').in_( + ['processing', 'done', 'cancelled'])), 'readonly': Eval('purchase_state').in_([ 'processing', 'done', 'cancelled']), },