Skip to content

[18.0][FIX] point_of_sale: incorrect method signature - #2

Closed
yotsubasuzu wants to merge 2 commits into
18.0from
18.0-fix-point_of_sale
Closed

yotsubasuzu wants to merge 2 commits into
18.0from
18.0-fix-point_of_sale

Conversation

@yotsubasuzu

@yotsubasuzu yotsubasuzu commented Jul 18, 2025 •

Copy link
Copy Markdown
Owner

Description of the issue/feature this PR addresses:
The method was first introduce from this PR https://github.com/odoo/odoo/pull/183540.

Due to this PR https://github.com/OCA/OCB/pull/1301 the module base_install_request is not auto install, resulted in group base.group_user do not have read access to model ir.module.module.

In pos.session.load_data https://github.com/odoo/odoo/blob/18.0/addons/point_of_sale/models/pos_session.py#L185, a fallback method call inside the except AccessError block may raise a TypeError.

This occurs if the user lacks read access to the ir.module.module model, which normally should be granted by the base.group_user group when the base_install_request module is auto-installed.

If the module is not installed, access rights are missing, leading to an unintended method signature mismatch.

Current behavior before PR:

  • If base_install_request is not installed, base.group_user users may not have read access to ir.module.module.
  • The AccessError is correctly caught, but the fallback method call includes an argument not expected by the method, leading to a TypeError.
  • The tests with OCB in the repository OCA/pos failed

Desired behavior after PR is merged:

  • The fallback method call is updated to match the expected signature.
  • The TypeError is avoided even when access to ir.module.module is restricted due to missing base_install_request.
  • Will make the OCA/pos tests passed

I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

In pos.session.load_data, a fallback call inside except AccessError may raise TypeError if the user lacks read access to ir.module.module due to base_install_request not being auto-installed.
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

Successfully merging this pull request may close these issues.

1 participant