Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3322 Vizualizări

In case you want to set a column in a tree view which is part of a form view as conditionally invisible, you cannot base your invisibility condition on the row of the tree view itself. You have to base the condition on a field of the parent model (the one of the form view).

Imagine profil
Abandonează
Autor Cel mai bun răspuns

In case you want to set a column in a tree view which is part of a form view as conditionally invisible, you cannot base your invisibility condition on the row of the tree view itself. You have to base the condition on a field of the parent model (the one of the form view). Please see the below example:

On a stock.picking (delivery, transfer,...) you have by default one tree view (stock.move) and you can add detailed operations (stock.move.line). On those two tree views, I added a column, a related field, which allows to print the description which was set on the PO lines. This is only necessary if the stock.picking has an operation type "receipts". Here is the way to add the invisibility condition in this case:



{'column_invisible': [('parent.picking_type_id','not in', [1])]}


Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
mai 21
2274
1
apr. 21
8
1
iul. 21
2119
1
iun. 21
87
1
mai 21
2798