Reputation: 11
There is my problem, I got:
(A and B) or (C and D)
In domain i write:
[ '|', (A, B), (C, D) ]
But it not work, and raise error:
Error: Unknown field document_receive_type,!=,vn_post in domain ["|",[["document_receive_type","!=","direct"],["state","!=","vn_post_check"]],[["document_receive_type","!=","vn_post"],["state","!=","result_profile_returned"]]]
Here is my code:
<button name="action_mark_done"
string="Mark Done"
type="object" class="oe_highlight"
attrs="{'invisible': ['|', (('document_receive_type','!=','direct'), ('state', '!=', 'vn_post_check')), (('document_receive_type','!=','vn_post'), ('state', '!=', 'result_profile_returned')) ,]}"
groups="bms_cpdt.group_e_gov_manager"/>
I've tried individually
['&', (A), (B),]
or
['&', (C), (D),]
it still work and show my button but if
['|', '&', (A), (B),'&',(C),(D)]
it has no error but it is not show my button like i want.
Upvotes: 1
Views: 2095
Reputation: 1548
(A and B) or (C and D)
If you want to get that, your domain would be:
['|', '&', (A), (B),'&',(C),(D)]
And with your data:
['|', '&', ('document_receive_type','!=','direct'), ('state', '!=', 'vn_post_check'),'&',('document_receive_type','!=','vn_post'),('state', '!=', 'result_profile_returned')]
For more information about domains you can visit: domain-notation
I hope I've helped
Upvotes: 1
Reputation: 836
Try with this:
attrs="{'invisible': ['|', '&',('document_receive_type','!=','direct'), ('state', '!=', 'vn_post_check'), '&', ('document_receive_type','!=','vn_post'), ('state', '!=', 'result_profile_returned')]}"
Upvotes: 1