Skip to Content
Menu
This question has been flagged
1 Reply
3106 Views

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
Discard
Best Answer

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
Discard
Related Posts Replies Views Activity
1
Mar 15
6593
2
Oct 21
5313
1
May 18
14651
1
Aug 24
345
0
Jun 22
1308