Cédric Krier pushed to branch branch/default at Tryton / Tryton
Commits: 49adccb5 by Cédric Krier at 2023-02-28T11:17:47+01:00 Prevent filling amendent lines if sale has not been selected The lines depend on the selected sale. - - - - - 3f34dcdd by Cédric Krier at 2023-02-27T18:04:38+01:00 Prevent filling amendent lines if purchase has not been selected The lines depend on the selected purchase. - - - - - 2 changed files: - modules/purchase_amendment/purchase.py - modules/sale_amendment/sale.py Changes: ===================================== modules/purchase_amendment/purchase.py ===================================== @@ -61,7 +61,9 @@ lines = fields.One2Many( 'purchase.amendment.line', 'amendment', "Lines", states={ - 'readonly': Eval('state') != 'draft', + 'readonly': ( + (Eval('state') != 'draft') + | ~Eval('purchase')), }) @classmethod ===================================== modules/sale_amendment/sale.py ===================================== @@ -61,7 +61,9 @@ lines = fields.One2Many( 'sale.amendment.line', 'amendment', "Lines", states={ - 'readonly': Eval('state') != 'draft', + 'readonly': ( + (Eval('state') != 'draft') + | ~Eval('sale')), }) @classmethod View it on Heptapod: https://foss.heptapod.net/tryton/tryton/-/compare/6efb525a7b23ea764c06d37efa7d4e3f697dc352...3f34dcdd56e03ff068d7c5c48a6d04026faeefc1 -- View it on Heptapod: https://foss.heptapod.net/tryton/tryton/-/compare/6efb525a7b23ea764c06d37efa7d4e3f697dc352...3f34dcdd56e03ff068d7c5c48a6d04026faeefc1 You're receiving this email because of your account on foss.heptapod.net.