Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4127 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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 :)

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 3 15
7539
2
thg 10 21
7042
1
thg 5 18
15629
1
thg 8 24
1569
0
thg 6 22
2240