[FIX] hr,base: fix layout of simple user form, access rights on create_employee

company_id is not in the group with phone, which makes it unaligned and weird looking, you can
see that especially when HR is installed and adds a boolean with a longer label.

this commit closes odoo/odoo#111567.
task 3127608

Signed-off-by: Kevin Baptiste <kba@odoo.com>
This commit is contained in:
dasz
2023-02-28 13:01:34 +01:00
committed by Kevin Baptiste
parent e649b36a49
commit 5060163ef2
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -206,7 +206,7 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='mobile']" position="after">
<field name="create_employee_id" force_save="1" invisible="1"/>
<field name="create_employee" force_save="1" string="Create Employee" invisible="not context.get('allow_create_employee', True)" attrs="{'invisible': [('create_employee_id', '>', 0)]}"/>
<field name="create_employee" force_save="1" string="Create Employee" invisible="not context.get('allow_create_employee', True)" attrs="{'invisible': [('create_employee_id', '>', 0)]}" groups="hr.group_hr_user"/>
</xpath>
</field>
</record>
+1 -2
View File
@@ -203,10 +203,9 @@ if records:
<field name="login"
placeholder="e.g. email@yourcompany.com"/>
</h2>
<label for="company_id" groups="base.group_multi_company"/>
<field name="company_id" context="{'user_preference': 0}" groups="base.group_multi_company"/>
</div>
<group name="phone_numbers">
<field name="company_id" context="{'user_preference': 0}" groups="base.group_multi_company"/>
<label for="groups_id" string="Access Rights"
attrs="{'invisible': [('id', '>', 0)]}" groups="base.group_no_one"/>
<div attrs="{'invisible': [('id', '>', 0)]}" groups="base.group_no_one">