Upgrade issue12414.diff
This commit is contained in:
parent
c96aadd6a0
commit
2fb2f5f86a
|
@ -1,12 +1,26 @@
|
||||||
diff --git a/tryton/modules/stock_lot_sled/stock.py b/tryton/modules/stock_lot_sled/stock.py
|
diff --git a/tryton/modules/stock_lot_sled/stock.py b/tryton/modules/stock_lot_sled/stock.py
|
||||||
index 111b160821..0ca38fbfa8 100644
|
index 111b160821..ffa7e8dd04 100644
|
||||||
--- a/tryton/modules/stock_lot_sled/stock.py
|
--- a/tryton/modules/stock_lot_sled/stock.py
|
||||||
+++ b/tryton/modules/stock_lot_sled/stock.py
|
+++ b/tryton/modules/stock_lot_sled/stock.py
|
||||||
@@ -183,6 +183,7 @@ class Move(metaclass=PoolMeta):
|
@@ -51,7 +51,9 @@ class LotSledMixin:
|
||||||
@property
|
states={
|
||||||
def to_check_expiration(self):
|
'required': (
|
||||||
if (self.lot
|
Eval('shelf_life_expiration_state', 'none') == 'required'),
|
||||||
+ and self.product.shelf_life_state != 'none'
|
- 'invisible': Eval('shelf_life_expiration_state', 'none') == 'none',
|
||||||
and self.lot.shelf_life_expiration_date
|
+ 'invisible': (
|
||||||
and self.effective_date > self.lot.shelf_life_expiration_date):
|
+ (Eval('shelf_life_expiration_state', 'none') == 'none')
|
||||||
return True
|
+ & ~Eval('shelf_life_expiration_date')),
|
||||||
|
})
|
||||||
|
shelf_life_expiration_state = fields.Function(
|
||||||
|
fields.Selection(DATE_STATE, 'Shelf Life Expiration State'),
|
||||||
|
@@ -59,7 +61,9 @@ class LotSledMixin:
|
||||||
|
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'),
|
||||||
|
|
Loading…
Reference in New Issue