Cédric Krier pushed to branch branch/default at Tryton / Tryton
Commits:
472922fe by Cédric Krier at 2023-07-23T18:48:01+02:00
Show expiration date on lot if filled
Even if the product has the expiration date state to 'none', if the
date is
filled we should show it to let the user clear it.
Closes #12414
- - - - -
1 changed file:
- modules/stock_lot_sled/stock.py
Changes:
=====================================
modules/stock_lot_sled/stock.py
=====================================
@@ -51,7 +51,9 @@
states={
'required': (
Eval('shelf_life_expiration_state', 'none') == 'required'),
- 'invisible': Eval('shelf_life_expiration_state', 'none') == 'none',
+ 'invisible': (
+ (Eval('shelf_life_expiration_state', 'none') == 'none')
+ & ~Eval('shelf_life_expiration_date')),
})
shelf_life_expiration_state = fields.Function(
fields.Selection(DATE_STATE, 'Shelf Life Expiration State'),
@@ -59,7 +61,9 @@
expiration_date = fields.Date('Expiration Date',
states={
'required': Eval('expiration_state', 'none') == 'required',
- 'invisible': Eval('expiration_state', 'none') == 'none',
+ 'invisible': (
+ (Eval('expiration_state', 'none') == 'none')
+ & ~Eval('expiration_date')),
})
expiration_state = fields.Function(
fields.Selection(DATE_STATE, 'Expiration State'),
View it on Heptapod:
https://foss.heptapod.net/tryton/tryton/-/commit/472922fe525b95a9111fe0a1351f8a2666cd780b
--
View it on Heptapod:
https://foss.heptapod.net/tryton/tryton/-/commit/472922fe525b95a9111fe0a1351f8a2666cd780b
You're receiving this email because of your account on foss.heptapod.net.