product: fix onchange for volume
parent
e7f58c86fc
commit
3ecb2ec251
|
|
@ -60,7 +60,7 @@ class ProductTemplate(models.Model):
|
||||||
manufacturing_number = fields.Char(string='Herstellnummer')
|
manufacturing_number = fields.Char(string='Herstellnummer')
|
||||||
product_color = fields.Char(string='Farbe')
|
product_color = fields.Char(string='Farbe')
|
||||||
|
|
||||||
@api.onchange('length', 'width', 'thickness')
|
@api.onchange('length', 'width', 'thickness', 'height')
|
||||||
def _onchange_measures(self):
|
def _onchange_measures(self):
|
||||||
if self.length>0 and self.width>0 and self.thickness>0:
|
if self.length>0 and self.width>0 and self.thickness>0:
|
||||||
self.volume = self.length*self.width*self.thickness / (1000*1000*1000)
|
self.volume = self.length*self.width*self.thickness / (1000*1000*1000)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue