Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
4175 Vistas

Hi, I have a boolean field 'classified' on sale order and my idea was that only users who are in the group that I created 'Classified quotations' can see records on tree view in which classified is true . I created two rules and I have no idea why it doesn't work. Here is the code:

 <?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>

<record id="sale_order_rule_group_classified_quotations" model="ir.rule">
<field name="name">sale_order_rule_group_classified_quotations</field>
<field name="model_id" search="[('model','=','sale.order')]" model="ir.model"/>
<field name="groups" eval="[(4,ref('group_classified_quotations'))]"/>
<field name="domain_force">['|',('classified','=',True),('classified','=',False)]</field>
</record>

<record id="sale_order_rule_no_group" model="ir.rule">
<field name="name">sale_order_rule_no_group</field>
<field name="model_id" search="[('model','=','sale.order')]" model="ir.model"/>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
<field name="domain_force">[('classified','=',False)]</field>
</record>

</data>
</openerp>



What am I doing wrong?

Avatar
Descartar
Mejor respuesta

Your fist rule makes no sense... 
check domain_force field: 
translated to human readable : force to domain where classified is true or classified is False... domain like that is completly rediclous.. 
domaća zadaća: google: "polish notation", and learn more about using domains in odoo :) 

if needed call for help :)

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
mar 15
7598
2
oct 21
7136
1
may 18
15699
1
ago 24
1645
0
jun 22
2271