allow entry of intrastat_id even if there is no lot

develop
Andreas Osim 2018-09-14 11:33:27 +02:00
parent a602a65275
commit 85bfc5dc0c
1 changed files with 2 additions and 2 deletions

View File

@ -62,8 +62,8 @@ class AccountInvoiceLine(models.Model):
self.env['stock.production.lot'].browse([lot_id.id]).write({
'intrastat_id': vals.get('intrastat_id')
})
elif vals.get('intrastat_id', False) and not lot_id:
raise UserError(_('Der Intrastrat Code kann nur gesetzt werden wenn ein Lot angegeben wurde.'))
# elif vals.get('intrastat_id', False) and not lot_id:
# raise UserError(_('Der Intrastrat Code kann nur gesetzt werden wenn ein Lot angegeben wurde.'))
return res