From 85bfc5dc0ceb5331c01c8fccad2375bff6e5ea00 Mon Sep 17 00:00:00 2001 From: Andreas Osim Date: Fri, 14 Sep 2018 11:33:27 +0200 Subject: [PATCH] allow entry of intrastat_id even if there is no lot --- ext/custom-addons/dp_custom/models/account.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/custom-addons/dp_custom/models/account.py b/ext/custom-addons/dp_custom/models/account.py index 661410bf..5167c948 100644 --- a/ext/custom-addons/dp_custom/models/account.py +++ b/ext/custom-addons/dp_custom/models/account.py @@ -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