diff --git a/hr_commission/models/product_template.py b/hr_commission/models/product_template.py index 9a8ca77e..6278552b 100644 --- a/hr_commission/models/product_template.py +++ b/hr_commission/models/product_template.py @@ -5,9 +5,3 @@ class ProductTemplate(models.Model): _inherit = 'product.template' no_commission = fields.Boolean('Exclude from Commissions') - can_edit_no_commission = fields.Boolean(compute='_compute_can_edit_no_commission') - - def _compute_can_edit_no_commission(self): - can_edit = self.env.user.has_group('account.group_account_user') - for template in self: - template.can_edit_no_commission = can_edit diff --git a/hr_commission/views/product_views.xml b/hr_commission/views/product_views.xml index 656f8f0f..7839df65 100644 --- a/hr_commission/views/product_views.xml +++ b/hr_commission/views/product_views.xml @@ -7,11 +7,22 @@ - - - + + + + + + + product.template.common.form.inherit.manager + product.template + + + + + 0