Skip to content

Commit 8e136ee

Browse files
committed
[ADD] company_id field on ResUsersRoleLine
1 parent 9e4adc8 commit 8e136ee

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

base_user_role_company/models/role.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class ResUsersRoleLine(models.Model):
1515
domain="[('id', 'in', allowed_company_ids)]",
1616
help="If set, this role only applies when this is the main company selected."
1717
" Otherwise it applies to all companies.",
18+
store=True,
1819
)
1920

2021
@api.constrains("user_id", "company_id")

base_user_role_company/views/role.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,15 @@
1717
</xpath>
1818
</field>
1919
</record>
20+
21+
<record id="view_res_users_role_form" model="ir.ui.view">
22+
<field name="model">res.users.role</field>
23+
<field name="inherit_id" ref="base_user_role.view_res_users_role_form" />
24+
<field name="arch" type="xml">
25+
<field name="user_id" position="after">
26+
<field name="company_id" />
27+
</field>
28+
</field>
29+
</record>
30+
2031
</odoo>

0 commit comments

Comments
 (0)