Skip to content

[18.0][FIX] account_usability: restrict journal items partner binding to accounting users - #2333

Open
RicardCForgeFlow wants to merge 1 commit into
OCA:18.0from
ForgeFlow:18.0-fix-account_usability-journal-items-binding-groups
Open

[18.0][FIX] account_usability: restrict journal items partner binding to accounting users#2333
RicardCForgeFlow wants to merge 1 commit into
OCA:18.0from
ForgeFlow:18.0-fix-account_usability-journal-items-binding-groups

Conversation

@RicardCForgeFlow

Copy link
Copy Markdown
Contributor

A user without accounting permissions but with a Sales role (sales_team.group_sale_salesman, while sale is installed) can open a contact's Journal Items from the res.partner form, when this should only be possible with accounting access (account.group_account_readonly).
image

image

<field name="binding_model_id" ref="base.model_res_partner" />
<field
name="groups_id"
eval="[(4, ref('account.group_account_readonly'))]"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about a Account Manager user who hasn't this group? It's not mandatory to have it:

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I understand is that group_account_manager implies group_account_user:

<record id="account.group_account_manager" model="res.groups">

And group_account_user implies group_account_readonly:
https://github.com/odoo/odoo/blob/90ee4710064f39086150045ee3f82023eafb224f/addons/account/security/account_security.xml#L72

@RicardCForgeFlow RicardCForgeFlow changed the title [FIX] account_usability: restrict journal items partner binding to accounting users [18.0][FIX] account_usability: restrict journal items partner binding to accounting users Jun 16, 2026

@Saran440 Saran440 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@BhaveshHeliconia BhaveshHeliconia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants