Welcome!
This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.
Comparação lógica de campos | compare field
Comparar um valor Boolean. Os valores válidos no xml serão True e False.
hide = fields.Boolean()
<field name="send" attrs="{ 'invisible' : [( 'field0' , '=' , True )]}" />
Comparar um Inteiro:
<field name="send" attrs="{ 'invisible' : [( 'field1' , '>=' , 10 )]}" />
Comparar um Char:
<field name="send" attrs="{ 'invisible' : [( 'field2' , '=' , '10' )]}" />
Comparar valor do campo problem_type em lista ['product','administrative'], ou uma variável lista, field-lista:
<field name="nome" attrs="{ 'invisible' : [( 'problem_type' , 'in' , ['product','administrative'] )] } />
<field name="nome" attrs="{ 'invisible' : [( 'problem_type' , 'in' , 'field-lista' )] } />
Comparação lógica | (ou):
<field name="send" attrs="{ 'invisible' : ['|', ('field1','=',5), ('field2','=',10)]}" />
Lista de operadores lógicos: !(não), |
(ou), &
(e)
Lista de operadores comparação: '=', '!=', '<=', '<', '>', '>=', '=?', '=like', '=ilike', 'like', 'not like', 'ilike', 'not ilike', 'in', 'not in', 'child_of'
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!
Keep Informed
About This Community
Moderation Tools
Question tools
Stats
Asked: 2/11/21, 8:50 PM |
Seen: 913 times |
Last updated: 4/9/21, 7:11 PM |