fix(shopfloor): tablet tiles domain uses group_ids (Odoo 19 rename)
Same mistake as the original implementer wave — used the deprecated groups_id field name on res.users in the search domain. Odoo 19 raises ValueError: Invalid field res.users.groups_id. Should be group_ids. CLAUDE.md rule 13l example also fixed so future-Claude doesn't copy the bug from the documentation. Module version: 19.0.32.0.12 -> 19.0.32.0.13 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -240,7 +240,7 @@ Use only: `name`, `model_id`, `state`, `code` (or `function`/`model`), `interval
|
|||||||
'fusion_plating.group_fp_owner',
|
'fusion_plating.group_fp_owner',
|
||||||
)]
|
)]
|
||||||
users = env['res.users'].sudo().search([
|
users = env['res.users'].sudo().search([
|
||||||
('groups_id', 'in', shop_branch_ids),
|
('group_ids', 'in', shop_branch_ids), # NB: group_ids not groups_id in Odoo 19, see rule 13c
|
||||||
('share', '=', False), ('active', '=', True),
|
('share', '=', False), ('active', '=', True),
|
||||||
])
|
])
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Fusion Plating — Shop Floor',
|
'name': 'Fusion Plating — Shop Floor',
|
||||||
'version': '19.0.32.0.12',
|
'version': '19.0.32.0.13',
|
||||||
'category': 'Manufacturing/Plating',
|
'category': 'Manufacturing/Plating',
|
||||||
'summary': 'Shop-floor tablet stations, QR scanning, bake window enforcer, '
|
'summary': 'Shop-floor tablet stations, QR scanning, bake window enforcer, '
|
||||||
'first-piece inspection gates.',
|
'first-piece inspection gates.',
|
||||||
|
|||||||
@@ -242,8 +242,9 @@ class FpTabletController(http.Controller):
|
|||||||
return {'ok': False, 'error': 'shop-branch role groups missing'}
|
return {'ok': False, 'error': 'shop-branch role groups missing'}
|
||||||
|
|
||||||
Users = env['res.users'].sudo()
|
Users = env['res.users'].sudo()
|
||||||
|
# Odoo 19 renamed res.users.groups_id -> group_ids (CLAUDE.md rule 13c).
|
||||||
users = Users.search([
|
users = Users.search([
|
||||||
('groups_id', 'in', group_ids),
|
('group_ids', 'in', group_ids),
|
||||||
('share', '=', False),
|
('share', '=', False),
|
||||||
('active', '=', True),
|
('active', '=', True),
|
||||||
])
|
])
|
||||||
|
|||||||
Reference in New Issue
Block a user