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

Hello Guys:

Please, i have a problem with context defined in xml view.

Need Help please and thanks a lot in advance :)

Here is my code:

    <field name="domain">[('mail_validated','=',False),'|',(('mail_removed','=',False),('mail_duree','&lt;=',15))]</field>

And Here is what i get :

AssertionError: This domain is syntactically not correct: [[u'mail_validated', u'=', False], u'|', [[u'mail_removed', u'=', False], [u'mail_duree', u'<=', 15]]]

Ảnh đại diện
Huỷ bỏ

<field name="domain">['|', '|', ('mail_validated','=',False),(('mail_removed','=',False),('mail_duree','&lt;=',15))]</field>

Tác giả

it doesnt work :/ the same error

AssertionError: This domain is syntactically not correct: [u'|', u'|', [u'mail_validated', u'=', False], [[u'mail_removed', u'=', False], [u'mail_duree', u'<=', 15]]]

Tác giả Câu trả lời hay nhất

Hi everybody!!!

Here is the solution to my problem:

Instead of using domain i have used filter_domain.

<field name="filter_domain">['|', ('mail_validated','=',False),(('mail_removed','=',False),('period_mail','&lt;=',15))]</field>

Best Regards.

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

Try this <field name="domain">[('mail_validated','=',False),'|',('mail_removed','=',False),('mail_duree','&lt;=',15)]</field>

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 11 23
7510
2
thg 2 21
3592
7
thg 2 19
13753
6
thg 12 17
8910
5
thg 10 22
13823