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).
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
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])]}
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
May 21
|
1300 | ||
|
1
Apr 21
|
7 | ||
|
1
Jul 21
|
1191 | ||
|
1
Jun 21
|
86 | ||
|
1
May 21
|
1901 |