Skip to Content
मेन्यू
This question has been flagged
1 Reply
4192 Views

Hello everyone,

I am trying to create a button that clicks it go to product view(tree) and add automatically partner_id to the search field.

<button class="oe_stat_button" type="action" name="%(product.product_search_form_view)d" context="{'search_default_partner_id': active_id}" attrs="{'invisible': [('product_count', '=', 0)]}" icon="fa-dropbox">

<field string="Products" name="product_count" widget="statinfo"/>

</button>

When i click on the button it goes to Tasks view.. 

Ta
Avatar
Discard

Have a look into odoo customization tips: https://www.scoop.it/t/learn-openerp

Best Answer

Hi Gabriel: The model on which product.product_search_form_view is based does not have a partner_id field in it. On which screen are you trying to add this button ?

Avatar
Discard
Author

I add this field on the model.

Its a Custom model wich i put that field

Related Posts Replies Views Activity
1
जन॰ 21
7117
0
जन॰ 23
1954
1
अक्तू॰ 22
2144
3
अग॰ 20
4370
2
मार्च 15
7989