[FIX] Intrastat Value in Sale Order Line

develop
Andreas Wabro 2018-06-11 13:29:05 +02:00
parent 053488c3d1
commit 54764e4d8b
1 changed files with 1 additions and 1 deletions

View File

@ -490,7 +490,7 @@ class SaleOrderLine(models.Model):
if vals.get('lot_id', False):
vals.update(intrastat_id=self.env['stock.production.lot'].browse(vals['lot_id']).intrastat_id.id)
elif vals.get('product_id', False):
vals.update(intrastat_id=self.env['product.template'].browse(vals['product_id']).intrastat_id.id)
vals.update(intrastat_id=self.env['product.product'].browse(vals['product_id']).intrastat_id.id)
return super(SaleOrderLine, self).create(vals)
@api.multi