Repository navigation
[FIX] multi_store: allow reading records of other stores by id - #116
Closed
fw-bot-adhoc wants to merge 1 commit into
Closed
fw-bot-adhoc wants to merge 1 commit into
fw-bot-adhoc wants to merge 1 commit into
Conversation
stdout: CONFLICT (modify/delete): account_multi_store/models/account_journal.py deleted in 0b88fff and modified in 06c8836. Version 06c8836 of account_multi_store/models/account_journal.py left in tree. CONFLICT (modify/delete): sale_multi_store/models/sale_order.py deleted in 0b88fff and modified in 06c8836. Version 06c8836 of sale_multi_store/models/sale_order.py left in tree. CONFLICT (modify/delete): stock_multi_store/models/stock_picking_type.py deleted in 0b88fff and modified in 06c8836. Version 06c8836 of stock_multi_store/models/stock_picking_type.py left in tree. stderr:
Author
|
@rov-adhoc @maq-adhoc cherrypicking of pull request #115 failed. stdout: Either perform the forward-port manually (and push to this branch, proceeding as usual) or close this PR (maybe?).
More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
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.
Forward-Port-Of: #115