develop
Andreas Brückl 2018-02-23 10:05:01 +01:00
parent 5836b075a8
commit ed6f94e27b
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ class AccountInvoiceLine(models.Model):
intrastat_id = fields.Many2one(comodel_name='report.intrastat.code', string='Intrastat Code')
@api.one
@api.model
def create(self, vals):
if vals.get('product_id', False) and not vals.get('intrastat_id', False):
vals.update(intrastat_id=self.env['product.template'].browse(vals['product_id']).intrastat_id.id)