Fix on_change_* methods

This commit is contained in:
Jes?s Mart?n Jim?nez 2016-07-05 13:24:16 +02:00
parent 306e9f9bbf
commit f452ec8fe6
1 changed files with 2 additions and 3 deletions

View File

@ -26,10 +26,9 @@ class Production:
@fields.depends('product')
def on_change_product(self):
res = super(Production, self).on_change_product()
super(Production, self).on_change_product()
if self.product and self.product.template.quality_template:
res['quality_template'] = self.product.template.quality_template.id
return res
self.quality_template = self.product.template.quality_template
@classmethod
def compute_request(cls, product, warehouse, quantity, date, company):