diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py index 796f89e1..2c8f9e7e 100644 --- a/ext/custom-addons/dp_custom/models/sale.py +++ b/ext/custom-addons/dp_custom/models/sale.py @@ -510,8 +510,8 @@ class SaleOrderLine(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.')) not_allowed_designbox_keys = ['product_uom_qty', 'product_uom', 'price_unit'] if not self.check_allowed_vals_from_designbox(not_allowed_designbox_keys, vals): diff --git a/ext/custom-addons/dp_custom/views/res_partner_views.xml b/ext/custom-addons/dp_custom/views/res_partner_views.xml index da040b72..0282dc15 100644 --- a/ext/custom-addons/dp_custom/views/res_partner_views.xml +++ b/ext/custom-addons/dp_custom/views/res_partner_views.xml @@ -73,6 +73,7 @@ + diff --git a/ext/custom-addons/dp_dmi/__manifest__.py b/ext/custom-addons/dp_dmi/__manifest__.py index 284c0439..2579983f 100644 --- a/ext/custom-addons/dp_dmi/__manifest__.py +++ b/ext/custom-addons/dp_dmi/__manifest__.py @@ -43,6 +43,6 @@ 'delivery.carrier.csv', 'res.users.role.csv', ], - 'installable': True, + 'installable': False, 'auto_install': False, } diff --git a/ext/custom-addons/dp_intercompany_invoicing/__init__.py b/ext/custom-addons/dp_intercompany_invoicing/__init__.py index 15bca215..a4a92031 100644 --- a/ext/custom-addons/dp_intercompany_invoicing/__init__.py +++ b/ext/custom-addons/dp_intercompany_invoicing/__init__.py @@ -20,3 +20,4 @@ ############################################################################## from . import models +from . import wizards diff --git a/ext/custom-addons/dp_intercompany_invoicing/__manifest__.py b/ext/custom-addons/dp_intercompany_invoicing/__manifest__.py index d333a251..952bf8ea 100644 --- a/ext/custom-addons/dp_intercompany_invoicing/__manifest__.py +++ b/ext/custom-addons/dp_intercompany_invoicing/__manifest__.py @@ -35,6 +35,7 @@ 'data': [ 'views/account_views.xml', 'views/res_company_views.xml', + 'wizards/wizard_tz_ic.xml', 'security/ir.model.access.csv', ], 'installable': True, diff --git a/ext/custom-addons/dp_intercompany_invoicing/models/account.py b/ext/custom-addons/dp_intercompany_invoicing/models/account.py index 3a475b9e..0f788d6c 100644 --- a/ext/custom-addons/dp_intercompany_invoicing/models/account.py +++ b/ext/custom-addons/dp_intercompany_invoicing/models/account.py @@ -36,6 +36,15 @@ class AccountInvoice(models.Model): charge_further = fields.Boolean(string='Weiterverrechnen', compute='_compute_charge_further', store=True, help='Ist gesetzt, wenn das WV-Flag von mindestens einer Zeile gesetzt ist') + pg_ic_num = fields.Char('PG_IC_Nummer') + pg_ic_flag = fields.Boolean(string='IC', help='Rechnung nach PG exportiert') + pg_admin = fields.Boolean(compute='_is_pg_admin', default=False, store=False) + + @api.multi + def _is_pg_admin(self): + for record in self: + record.pg_admin = self.env.user.has_group('base.group_system') + @api.multi def _compute_inter_company_supplier_isset(self): for record in self: diff --git a/ext/custom-addons/dp_intercompany_invoicing/views/account_views.xml b/ext/custom-addons/dp_intercompany_invoicing/views/account_views.xml index 873e9fee..be1f2dac 100644 --- a/ext/custom-addons/dp_intercompany_invoicing/views/account_views.xml +++ b/ext/custom-addons/dp_intercompany_invoicing/views/account_views.xml @@ -6,11 +6,12 @@ account.invoice - +