This question has been flagged
2 Replies
4410 Views

I've added a supplier number and a customer number, and now I need to add this number in the tree view. The problem is that this 2 number are shown in the customer tree and the supplier tree.

How could I hide a column depending on if it is a Suppliers tree view or a Customers tree view ?

Help me please.

I found this one but it doesn't help

https://www.odoo.com/es_ES/forum/help-1/question/how-to-add-a-field-conditional-to-tree-view-of-customer-14707

Avatar
Discard
Best Answer

Hello,

May be this will helpful you.

<tree>
    <field name="customer_number" invisible="context.get('default_customer', False)" />
  <field name="supplier_number" invisible="context.get('default_supplier', False)" />  
</tree>
Avatar
Discard
Author Best Answer

Thank you very much

It worked

Avatar
Discard