Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][FIX]assets_management: differentiate groups #4113

Merged
merged 2 commits into from
May 2, 2024
Merged
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 assets_management/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class AccountMove(models.Model):

hide_link_asset_button = fields.Boolean(
compute="_compute_hide_link_asset_button",
compute_sudo=True,
default=True,
string="Hide Asset Button",
)
Expand Down
16 changes: 14 additions & 2 deletions assets_management/security/res_groups.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,24 @@

<record id="group_asset_user" model="res.groups">
<field name="name">Asset Users</field>
<field name="category_id" ref="base.module_category_accounting_accounting" />
<field name="category_id" ref="base.module_category_hidden" />
<field name="users" eval="[(4, ref('base.user_root'))]" />
</record>

<record id="group_account_invoice_assets" model="res.groups">
<field name="name">Billing and Assets</field>
<field name="category_id" ref="base.module_category_accounting_accounting" />
<field
name="implied_ids"
eval="[
(4, ref('group_asset_user')),
(4, ref('account.group_account_invoice')),
]"
/>
</record>

<record id="account.group_account_manager" model="res.groups">
<field name="implied_ids" eval="[(4, ref('group_asset_user'))]" />
<field name="implied_ids" eval="[(4, ref('group_account_invoice_assets'))]" />
</record>

</odoo>
Loading