Fix assignation of field of self

This commit is contained in:
Jes?s Mart?n Jim?nez 2016-07-05 13:30:28 +02:00
parent c07f44485f
commit 68c770c369
1 changed files with 2 additions and 2 deletions

View File

@ -70,8 +70,8 @@ class Lot:
'alert_date'):
product_field = fname.replace('date', 'time')
margin = getattr(self.product.template, product_field)
setattr(self, fname) = (margin and date.today() +
timedelta(days=margin))
setattr(self, fname,
margin and date.today() + timedelta(days=margin))
def get_expired(self, name):
pool = Pool()