跳至内容
菜单
此问题已终结
1 回复
4216 查看

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

相关帖文 回复 查看 活动
1
1月 21
7179
0
1月 23
1989
1
10月 22
2170
3
8月 20
4404
2
3月 15
8010