diff --git a/ext/custom-addons/dp_intercompany_invoicing/models/account.py b/ext/custom-addons/dp_intercompany_invoicing/models/account.py index bee85fbc..0f788d6c 100644 --- a/ext/custom-addons/dp_intercompany_invoicing/models/account.py +++ b/ext/custom-addons/dp_intercompany_invoicing/models/account.py @@ -38,6 +38,12 @@ class AccountInvoice(models.Model): 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): 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 39e98c9f..be1f2dac 100644 --- a/ext/custom-addons/dp_intercompany_invoicing/views/account_views.xml +++ b/ext/custom-addons/dp_intercompany_invoicing/views/account_views.xml @@ -20,8 +20,9 @@