Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
4254 Переглядів

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
Аватар
Відмінити

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

Найкраща відповідь

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 ?

Аватар
Відмінити
Автор

I add this field on the model.

Its a Custom model wich i put that field

Related Posts Відповіді Переглядів Дія
1
січ. 21
7223
0
січ. 23
2083
1
жовт. 22
2223
3
серп. 20
4432
2
бер. 15
8043