Repository navigation
Conversation
Contributor
|
LGTM! 👍 Cosas que están ok:
Cosas que vi y descarté:
|
rov-adhoc
force-pushed
the
18.0-h-132306-rov
branch
from
November 18, 2026 17:15
9b12ef1 to
f4a237f
Compare
Since 17.0, fetch() resolves the ids through _search() as the current user. The store filter that account.journal, sale.order and stock.picking.type add in _search() was meant only to restrict choosing records, but now it also forbids reading them by id, so a user of one store can no longer open an entry, transfer or order of another store (read access error on the journal, operation type or order). Up to 16.0 this was allowed. fetch() now reads with the skip_store_filter context, which _search() honors. Choosing records stays filtered by store and writing on records of other stores stays forbidden by the record rules. The new env keeps env.company (with_company), which is part of the cache key of company-dependent fields: otherwise the values fetched would be cached under another company and reading them would raise MissingError.
rov-adhoc
force-pushed
the
18.0-h-132306-rov
branch
from
November 18, 2026 18:00
f4a237f to
06c8836
Compare
|
@roboadhoc r+ nobump |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Ticket: https://www.adhoc.inc/odoo/helpdesk.ticket/132306
Since 17.0,
fetch()resolves the ids through_search()as the current user. The store filter thataccount.journal,sale.orderandstock.picking.typeadd in_search()was meant only to restrict choosing records, but now it also forbids reading them by id: a user of one store can no longer open an entry, transfer or order of another store (read access error). Up to 16.0 this was allowed.fetch()now reads with theskip_store_filtercontext, which_search()honors. Choosing records stays filtered by store, and writing on records of other stores stays forbidden by the record rules.The new env keeps
env.companyandenv.companies: it passes them asallowed_company_ids, withenv.companyfirst.env.companyis part of the cache key of company-dependent fields: without it, the values fetched were cached under the user's default company, and reading them in an env whose company was set directly (asdemo_fulltests do withself.env.company = ...) raisedMissingError.with_company()alone is not enough: withoutallowed_company_idsin the context it leaves only that company allowed, and the multi-company rules then forbid reading records of the user's other companies.Tests added in the three modules: they fail without the fix and pass with it.