Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

[Solved] [V8] Attrs: what is the operator for 'AND'?

By
FEDERICO LEONI
on 6/17/15, 4:11 PM 667 views

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.

0
FEDERICO LEONI
On 6/17/15, 5:46 PM

SOLVED: A server reboot do the magic.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/17/15, 4:11 PM
Seen: 667 times
Last updated: 6/18/15, 1:59 AM