Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
4191 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
1
Mar 15
7635
2
Okt 21
7188
1
Mei 18
15718
1
Agu 24
1674
0
Jun 22
2287