Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
2557 Zobrazení
Hello Odoo Community,

I am using Odoo 16 and and I want to add the group named 'smarten_access_management.group_planning_branch_incharge' to given button in the gannt view of Planning Slot.
The same code worked well in Odoo15 but it is throwing given error in Odoo16.
I am looking forward to your response.
Thank you.

The code is

​planning.group_planning_manager,smarten_access_management.group_planning_branch_incharge attribute>



The Error is

Field 'state' used in attrs ({'invisible': ['|', ('state', '=', 'published'), ('resource_type', '=', 'material')]}) is restricted to the group(s) planning.group_planning_manager.

Avatar
Zrušit
Nejlepší odpověď

Hi,

The above mentioned error is due to the state field used in the attrs is restricted to that planning.group_planning_manager group only.

In order to fix this issue, you can modify the field access in the field definition .Add the smarten_access_management.group_planning_branch_incharge group to the groups attribute alongside the existing planning.group_planning_manager group.

state = fields.Char(
...
groups="planning.group_planning_manager,smarten_access_management.group_planning_branch_incharge",
)

hope this will help you
thanks

Avatar
Zrušit
Autor

Sorry It didn't work.

Related Posts Odpovědi Zobrazení Aktivita
3
srp 25
2645
1
kvě 25
2664
1
dub 25
3661
1
dub 25
4515
1
dub 25
1981