855447fc77fdbe2972be043b7ba9131567d21b9f
Create two models, `object` and `category`. The object have a Many2One to the category. Override the `search` on the category so it returns a subset of the records if a context key is present. Create an IR Rule on object with the following pseudo-domain: `categ_id in category.search([])`. Search on object with the context key present. Even if the context should only be applied to category, it is applied to object too thus there are some object missing. When evaluating the domain of IR Rules, the current user is propagated with the current environment context. API calls triggered by the domain are called with the given context, possibly populating the cache with different records than it would normally does without the context (i.e. at `addons/point_of_sale/models/account_journal.py#L19-L23`). Following requests do use that invalid cache thus return invalid results. Forcing an empty context on the user used during the evaluation of the context ensures the IR Rules are working as they should and is future-proof (cf `load_company` v13 context key) opw-2041667 closes #35123 closes #35125 closes odoo/odoo#35667 Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com> Co-authored-by: Hugo Adan <hugo@vauxoo.com>
…
…
…
…
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
Then follow the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%