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.
Esconder uma coluna em uma visão de árvore Tree View
Para esconder uma coluna inteira de um componente One2many, imagine que temos uma tree dentro de um form:
<form>
<tree>
<fields .../>
<fields name="campo".../>
</tree>
</form>
Usamos dos atributos para esconder a coluna 'campo' da visão em árvore:
<field name="campo" invisible="context.get('default_my_other', False)" />
ou
<field name="campo" attrs="{'column_invisible': [('parent.field_my_other','=',False)]}" />
neste caso, column_invisible só funciona acessando um elemento do modelo pai por parent, não funcionará acessando um elemento do mesmo modelo
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: 3/4/22, 2:37 PM |
Seen: 501 times |
Last updated: 3/4/22, 2:37 PM |