Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4199 Zobrazení

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
Zrušit

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

Nejlepší odpověď

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
Zrušit
Autor

I add this field on the model.

Its a Custom model wich i put that field

Related Posts Odpovědi Zobrazení Aktivita
1
led 21
7145
0
led 23
1973
1
říj 22
2155
3
srp 20
4381
2
bře 15
7998