Odoo Help

0

How to hide fields in a tree view

By
Jihen BEN ALI
on 7/15/15, 3:27 AM 993 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

1
Solanki Shamji
On 7/15/15, 3:46 AM

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>
0
Jihen BEN ALI
On 7/15/15, 4:09 AM

Thank you very much

It worked

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 7/15/15, 3:27 AM
Seen: 993 times
Last updated: 7/16/15, 2:47 AM