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

[IMP] core: avoid to check access rules on empty recordset #32313

Closed
wants to merge 1 commit into from

Conversation

Xavier-Do
Copy link
Contributor

@Xavier-Do Xavier-Do commented Apr 1, 2019

Checking access rules only makes sence if we have some records,
_filter_access_rules will always return a subset or current
recordset, and a subset or a empty recordset is an empty recordset.

@Xavier-Do Xavier-Do changed the title Master test access rule xdo [IMP] core: avoid to check access rules on empty recordset Apr 1, 2019
@Xavier-Do Xavier-Do requested a review from rco-odoo April 1, 2019 15:33
@C3POdoo C3POdoo added the RD research & development, internal work label Apr 1, 2019
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Apr 1, 2019
odoo/models.py Outdated Show resolved Hide resolved
Checking access rules only makes sence if we have some records,
_filter_access_rules will always return a subset or current
recordset, and a subset or a empty recordset is an empty recordset.
@robodoo robodoo added CI 🤖 Robodoo has seen passing statuses and removed CI 🤖 Robodoo has seen passing statuses labels Apr 2, 2019
Copy link
Member

@rco-odoo rco-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pniederlag pushed a commit to datenbetrieb/odoo that referenced this pull request Apr 2, 2019
Checking access rules only makes sence if we have some records,
_filter_access_rules will always return a subset or current
recordset, and a subset or a empty recordset is an empty recordset.

closes odoo#32313

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
@robodoo
Copy link
Contributor

robodoo commented Apr 2, 2019

Merged, thanks!

@robodoo robodoo closed this Apr 2, 2019
@Xavier-Do Xavier-Do deleted the master-test-acces-rule-xdo branch June 17, 2019 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants