Skip to content

[18.0][FIX] sale_financial_risk: avoid writing on commercial_partner during compute on partner - #536

Open
clementmbr wants to merge 1 commit into
OCA:18.0from
akretion:18-fix-sale-financial-risk
Open

[18.0][FIX] sale_financial_risk: avoid writing on commercial_partner during compute on partner#536
clementmbr wants to merge 1 commit into
OCA:18.0from
akretion:18-fix-sale-financial-risk

Conversation

@clementmbr

Copy link
Copy Markdown
Member

Currently Odoo is writing on a commercial_partner when doing _compute_risk_sale_order() on a partner (two different records).

It is against the expected behavior of a non-stored readonly computed field and can create security problems as the commercial_partner record is not necessary accessible by the Odoo user who is accessing the current partner's record.

cc @sebastienbeau

@ivantodorovich

Copy link
Copy Markdown

Why is it writing on commercial_partner_id upon read? the field is stored

IMO previous code was ok

@pedrobaeza pedrobaeza added this to the 18.0 milestone Mar 11, 2026

@pedrobaeza pedrobaeza 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.

This is needed since this change:

akretion@317c47b

and being non stored, it's not a problem.

Please indicate which is the specific problem you want to fix.

@github-actions

Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants