From a9d58a3fc21ddee3b34f396ff429fed74052d886 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Tue, 12 Dec 2017 19:54:42 +0100 Subject: [PATCH] [FIX] l10n_be_hr_payroll: don't compute field dependent_children if no access Once installed, a standard employee cannot open a employee form view since this field was computed and that field children is not allowed without group hr_user --- addons/l10n_be_hr_payroll/models/l10n_be_hr_payroll.py | 2 +- addons/l10n_be_hr_payroll/views/l10n_be_hr_payroll_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/l10n_be_hr_payroll/models/l10n_be_hr_payroll.py b/addons/l10n_be_hr_payroll/models/l10n_be_hr_payroll.py index aa99a1925a9..8ee0fe0ff37 100644 --- a/addons/l10n_be_hr_payroll/models/l10n_be_hr_payroll.py +++ b/addons/l10n_be_hr_payroll/models/l10n_be_hr_payroll.py @@ -221,7 +221,7 @@ class HrEmployee(models.Model): disabled_children_bool = fields.Boolean(string='Disabled Children', help='if recipient children is/are declared disabled by law') resident_bool = fields.Boolean(string='Nonresident', help='if recipient lives in a foreign country') disabled_children_number = fields.Integer('Number of disabled children') - dependent_children = fields.Integer(compute='_compute_dependent_children', string='Considered number of dependent children') + dependent_children = fields.Integer(compute='_compute_dependent_children', string='Considered number of dependent children', groups="hr.group_hr_user") other_dependent_people = fields.Boolean(string="Other Dependent People", help="If other people are dependent on the employee") other_senior_dependent = fields.Integer('# seniors (>=65)', help="Number of seniors dependent on the employee, including the disabled ones") other_disabled_senior_dependent = fields.Integer('# disabled seniors (>=65)') diff --git a/addons/l10n_be_hr_payroll/views/l10n_be_hr_payroll_view.xml b/addons/l10n_be_hr_payroll/views/l10n_be_hr_payroll_view.xml index 4e7d429f102..37fa58ae2b7 100644 --- a/addons/l10n_be_hr_payroll/views/l10n_be_hr_payroll_view.xml +++ b/addons/l10n_be_hr_payroll/views/l10n_be_hr_payroll_view.xml @@ -141,7 +141,7 @@ - +