diff options
| author | Goffin Simon <sig@odoo.com> | 2021-02-10 08:56:54 +0000 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2021-02-10 11:44:36 +0000 |
| commit | 8f94577b421a4543670245ebdb4f9b27f5663705 (patch) | |
| tree | 80e89de98a110298766dd198fd963e0322d1ab9c /addons/hr | |
| parent | 2df520f0506770bc7b4486d827e2c9117d0d0c68 (diff) | |
[FIX] hr: Impossible to create an employee
Steps to reproduce the bug:
- Let's consider a user U with a related partner P
- Log with an internal user IU without Admnistration/Settings and Employee Officer access rights
- Create an employee E with address_home_id = P and save
Bug:
An access right was raised because the mobile of P was written on P and
the error was raised at https://github.com/odoo/odoo/blob/13.0/odoo/addons/base/models/res_partner.py#L531
Due to this bug, only internal user with Admnistration/Settings access rights can create an employee
linked to a contact of an internal user.
opw:2445953
closes odoo/odoo#65864
X-original-commit: 7f669eb49250b4936ef63e274e44db3222608e8b
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Diffstat (limited to 'addons/hr')
| -rw-r--r-- | addons/hr/views/hr_employee_views.xml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/hr/views/hr_employee_views.xml b/addons/hr/views/hr_employee_views.xml index d2df1ea82f4..654184c9803 100644 --- a/addons/hr/views/hr_employee_views.xml +++ b/addons/hr/views/hr_employee_views.xml @@ -132,7 +132,7 @@ 'form_view_ref': 'base.res_partner_view_form_private'}" options='{"always_reload": True, "highlight_first_line": True}'/> <field name="private_email" string="Email"/> - <field name="phone" class="o_force_ltr" groups="hr.group_hr_user" string="Phone"/> + <field name="phone" class="o_force_ltr" groups="hr.group_hr_user" string="Phone" readonly="True"/> <field name="bank_account_id" context="{'default_partner_id': address_home_id}"/> <label for="km_home_work"/> <div class="o_row" name="div_km_home_work"> |
