Skip to content
Snippets Groups Projects
Commit 7f669eb4 authored by Goffin Simon's avatar Goffin Simon
Browse files

[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#65848

Signed-off-by: default avatarSimon Goffin (sig) <sig@openerp.com>
parent f1efbe02
No related branches found
No related tags found
No related merge requests found
......@@ -131,7 +131,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}"/>
<field name="km_home_work" groups="hr.group_hr_user"/>
</group>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment