Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
6855 Vues

hi

(odoo11)

I  I wrote some record rules, and set 1 groups in each, but then I decide add other group for each. but when I upgrade module, record rules doesn't update. 

even, I delete record rules from web, and then upgrade module, but again  record rules doesn't update.  

--------------

<record id="support_services_support_team1" model="ir.rule">
<field name="name">support.services: can approve requests.</field>
<field name="model_id" ref="support_services.model_support_services"/>
<field name="domain_force">[('department_second_id', '=', False),('state','=','manager_approve')]</field>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_create" eval="1"/>
<field name="perm_unlink" eval="0" />
<field name="groups" eval="[(4,ref('support_services.group_s_team','support_services.group_s_manager'))]"/>
</record>

----------------------------

 the group " support_services.group_s_manager " has not been added.


Avatar
Ignorer
Meilleure réponse

Hi,

The given syntax is wrong, try like this,

<record id="support_services_support_team1" model="ir.rule">
<field name="name">support.services: can approve requests.</field>
<field name="model_id" ref="support_services.model_support_services"/>
<field name="domain_force">[('department_second_id', '=', False),('state','=','manager_approve')]</field>
<field name="perm_read" eval="1"/>
<field name="perm_write" eval="1"/>
<field name="perm_create" eval="1"/>
<field name="perm_unlink" eval="0" />
<field name="groups" eval="[(4, ref('support_services.group_s_team')), (4, ref('support_services.group_s_manager'))]"/>
</record>

Thanks

Avatar
Ignorer
Auteur

yes, works :)

Thanks :)