Skip to content

Commit 7b320b4

Browse files
committed
[FIX] point_of_sale: search_read with elevated access
Previously, users in the base.group_user group encountered an AccessError when attempting to read the ir.module.module model. This was due to the base_install_request auto-install mechanism being disabled, which removed the implicit read access that non-admin users previously relied on. To resolve this issue, this commit updates the _load_pos_data method to explicitly elevate privileges using sudo() when calling search_read() on the model. This ensures that the operation is executed with administrative rights, allowing all users to retrieve module metadata safely, regardless of their group permissions.
1 parent 1e85b3f commit 7b320b4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

addons/point_of_sale/models/ir_module_module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ def _load_pos_data(self, data):
1616
domain = self._load_pos_data_domain()
1717
fields = self._load_pos_data_fields()
1818
return {
19-
'data': self.search_read(domain, fields, load=False),
19+
'data': self.sudo().search_read(domain, fields, load=False),
2020
'fields': self._load_pos_data_fields(),
2121
}

0 commit comments

Comments
 (0)