revert
parent
5836b075a8
commit
ed6f94e27b
|
|
@ -26,7 +26,7 @@ class AccountInvoiceLine(models.Model):
|
||||||
|
|
||||||
intrastat_id = fields.Many2one(comodel_name='report.intrastat.code', string='Intrastat Code')
|
intrastat_id = fields.Many2one(comodel_name='report.intrastat.code', string='Intrastat Code')
|
||||||
|
|
||||||
@api.one
|
@api.model
|
||||||
def create(self, vals):
|
def create(self, vals):
|
||||||
if vals.get('product_id', False) and not vals.get('intrastat_id', False):
|
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)
|
vals.update(intrastat_id=self.env['product.template'].browse(vals['product_id']).intrastat_id.id)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue