Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
4737 Näkymät

I know I can use operators on attrs but I didn't manage to use the 'AND' operator on my tree view.

For example OR works well:

<button name="638" string="Enviar" class="oe_highlight" type="action" attrs="{'invisible':['|', ('status','=','Pronto'), ('to_wait','=','Sim')]}" /> 

AND should be '&' but rise an error:

xmlParseEntityRef: no name, line 14, column 63 

'&amp;' too doesn't works , exactly as if I write nothing as operator:

<button name="642" string="Avançar" class="oe_highlight" type="action" attrs="{'invisible':[('status','=','A fazer'), ('to_wait','=','Não')]}" /> 

&lt;button name="642" string="Avançar" class="oe_highlight" type="action" attrs="{'invisible':['&amp;',('status','=','A fazer'), ('to_wait','=','Não')]}" /> 

the button continue to be visible.

Any clue?

Edit: on  Odoo doc there is just this explanation

attrs
dynamic attributes based on record values.
A mapping of attributes to domains, domains are evaluated in the context of the current row's record, if True the corresponding attribute is set on the cell.
Possible attributes are invisible (hides the button) and readonly (disables the button but still shows it)

but nothing about operators.

Avatar
Hylkää
Tekijä Paras vastaus

SOLVED: A server reboot do the magic.

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
syysk. 23
34397
5
jouluk. 19
7283
0
heinäk. 15
3307
1
kesäk. 15
5815
0
kesäk. 15
120