Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions base_user_role_company/models/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class ResUsersRoleLine(models.Model):
domain="[('id', 'in', allowed_company_ids)]",
help="If set, this role only applies when this is the main company selected."
" Otherwise it applies to all companies.",
store=True,
)

@api.constrains("user_id", "company_id")
Expand Down
11 changes: 11 additions & 0 deletions base_user_role_company/views/role.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,15 @@
</xpath>
</field>
</record>

<record id="view_res_users_role_form" model="ir.ui.view">
<field name="model">res.users.role</field>
<field name="inherit_id" ref="base_user_role.view_res_users_role_form" />
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="company_id" />
</field>
</field>
</record>

</odoo>