[IMP] base: prevent changing contact type of users
When a user is linked to a contact, the type should not be modified. Otherwise, the res.partner type may become incompatible with the res.user record (e.g. is set as a private address and a user no longer has access to its own user) Fixes odoo/odoo#48177 closes odoo/odoo#48590 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
@@ -168,7 +168,7 @@
|
||||
|
||||
<group>
|
||||
<group>
|
||||
<field name="type" groups="base.group_no_one"/>
|
||||
<field name="type" groups="base.group_no_one" attrs="{'readonly': [('user_ids', '!=', [])]}"/>
|
||||
<span class="o_form_label o_td_label" name="address_name">
|
||||
<b attrs="{'invisible': [('type', '!=', 'contact')]}">Company Address</b>
|
||||
<b attrs="{'invisible': [('type', '!=', 'invoice')]}">Invoice Address</b>
|
||||
|
||||
Reference in New Issue
Block a user