Skip to content

Conversation

@christian-ramos-tecnativa

Standard migration

@Tecnativa TT59219

eLBati and others added 30 commits November 11, 2025 16:58
Restrict some users to only access their assigned points of sale
Currently translated at 100.0% (7 of 7 strings)

Translation: pos-12.0/pos-12.0-pos_user_restriction
Translate-URL: https://translation.odoo-community.org/projects/pos-12-0/pos-12-0-pos_user_restriction/es/
Updated roadmap description
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: pos-15.0/pos-15.0-pos_user_restriction
Translate-URL: https://translation.odoo-community.org/projects/pos-15-0/pos-15-0-pos_user_restriction/
Currently translated at 100.0% (11 of 11 strings)

Translation: pos-15.0/pos-15.0-pos_user_restriction
Translate-URL: https://translation.odoo-community.org/projects/pos-15-0/pos-15-0-pos_user_restriction/it/
Currently translated at 100.0% (11 of 11 strings)

Translation: pos-15.0/pos-15.0-pos_user_restriction
Translate-URL: https://translation.odoo-community.org/projects/pos-15-0/pos-15-0-pos_user_restriction/es/
Migration notes:

1. Removed bypassing group check, since set_cashbox_pos in 16.0+
does not call has_groups method [1]

2. Removed hack in res_users.py, which should not be the case,
since in res.users' write method has_group is replaced with
_is_internal [2]

3. Removed several ir.model.access records for removed models:

- account.bank.statement.cashbox [3]
- account.cashbox.line [3]
- cash.box.out [4]

[1] odoo/odoo#113151
[2] odoo/odoo@dae28c4#diff-16e37db365c1ea1f2e6c79aeb60c80f68f1a5c75970e8e3f198eb18af56278dd
[3] odoo/odoo@4fb0933
[4] odoo/odoo@7e23eda

In this commit we remove bypassing group check
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: pos-17.0/pos-17.0-pos_user_restriction
Translate-URL: https://translation.odoo-community.org/projects/pos-17-0/pos-17-0-pos_user_restriction/
Currently translated at 100.0% (12 of 12 strings)

Translation: pos-17.0/pos-17.0-pos_user_restriction
Translate-URL: https://translation.odoo-community.org/projects/pos-17-0/pos-17-0-pos_user_restriction/it/
@christian-ramos-tecnativa christian-ramos-tecnativa changed the title [18.0][MIG] pos_user_restriction: Migration to version 18.0 [18.0][MIG][WIP] pos_user_restriction: Migration to version 18.0 Nov 11, 2025
@pedrobaeza
Copy link
Member

/ocabot migration pos_user_restriction

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Nov 12, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Nov 12, 2025
16 tasks
@christian-ramos-tecnativa
Copy link
Author

Tried the point_of_sale tests and it seems like something changed upstream that now is checking ir.module.module data in _load_pos_data:

Traceback (most recent call last):
File "/opt/odoo/auto/addons/point_of_sale/models/pos_session.py", line 183, in load_data
response[model] = self.env[model]._load_pos_data(response)
File "/opt/odoo/auto/addons/point_of_sale/models/ir_module_module.py", line 19, in _load_pos_data
'data': self.search_read(domain, fields, load=False),
File "/opt/odoo/custom/src/odoo/odoo/models.py", line 6138, in search_read
records = self.search_fetch(domain or [], fields, offset=offset, limit=limit, order=order)
File "/opt/odoo/custom/src/odoo/odoo/models.py", line 1773, in search_fetch
query = self._search(domain, offset=offset, limit=limit, order=order or self._order)
File "/opt/odoo/custom/src/odoo/odoo/models.py", line 5807, in _search
self.browse().check_access('read')
File "/opt/odoo/custom/src/odoo/odoo/models.py", line 4439, in check_access
raise result1
odoo.exceptions.AccessError: You are not allowed to access 'Module' (ir.module.module) records.

This operation is allowed for the following groups:
- Administration/Settings

Contact your administrator to request access if necessary.

More info:
odoo/odoo#183540
Missing sudo in line

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.