Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13.0][14.0][15.0] models: archived records are excluded when filtered only by child_of #81271

Open
frahikLV opened this issue Dec 12, 2021 · 0 comments

Comments

@frahikLV
Copy link
Contributor

Impacted versions:
13.0, 14.0, 15.0

Steps to reproduce:

  • Modify mrp.bom record_rule "mrp_bom multi-company" from
['|', ('company_id', 'in', company_ids), ('company_id','=',False)]

to

['|', ('company_id', 'child_of', company_ids), ('company_id','=',False)]
  • Archive one mrp.bom record
  • Try to unarchive, the following error will show:

image

Current behavior:

When the ORM check if the user has access vía _filter_access_rules_python method, this call filtered_domain, and because the access rule contains a child_of, a search is performed, however, by default, the searches omit records with active = False, for that reason the context active_test=False has to be included.

Expected behavior:
If the filtered_domain doesn't have an explicit domain excluding active records, these should be included in the returned records.

Video/Screenshot link (optional):

Support ticket number submitted via odoo.com/help (optional):

@frahikLV frahikLV changed the title [13.0][14.0 [13.0][14.0][15.0] models: archived records are excluded when filtered only by child_of Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant