This question has been flagged
2 Replies
3029 Views

Hello,

When i create a supplier company with one or more contacts, the suppliers tree view shows each contact as a supplier, ej: <computer inc="">,<1 contact name> <computer inc="">,<2 contact name> ......

but that is not true, the contacts are not suppliers, only the companies. Looking the database, res_partner file have a "is_company" field. There exists some way of limiting the tree view to only shows the registers with this field = True?

Thanks.

Avatar
Discard
Best Answer

Hello,

In server you can find a file res_partner_view.xml(server/openerp/addons/base/res/res_partner_view.xml). There is a record with id="action_partner_supplier_form". Here, In domain add domain like :

[('is_company','=',1)]

it will show's the suppliers where is_company=True.

Thank You.

Avatar
Discard
Author

Thanks for your help

Best Answer

Create a menu leading to an action In this action you can use 'Domain value' [('is_company','=',False)] OR Context Value {"search_default_customer":1}

Avatar
Discard
Author

Could you give me more details how to do this? I am newbie and i have just 3 weeks learning openerp. Thanks for your help