简体   繁体   中英

inregularity in attrs odoo10

Hello friends I have a button in odoo which I want to be invisible when the 3 conditions are met:

<button class="oe_highlight"  name="formview" type="object" string="Pagar" attrs="{'invisible':['|',('status_inv', '=',2),('validate_cheque', '=',False),('pay', '=',True)]}"/>

I have the invisible attribute in this way but it does not behave well.

if I replace it | by & odoo gives an error finally what I want is that it behaves like the AND operator if the 3 is fulfilled that is invisible

Try this :

<button class="oe_highlight"  name="formview" type="object" string="Pagar" attrs="{'invisible':[('status_inv', '=',2),('validate_cheque', '=',False),('pay', '=',True)]}"/>

If no operator is declared, the '&' operator is put by default.

在此处输入图片说明

A = ('status_inv') == False
B = (validate_cheque) False
C = ('payment') True
A and B == false
False and C == False

And look, you still see the bottom and you should not

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM