Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
4237 Vizualizări

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
Imagine profil
Abandonează

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

Cel mai bun răspuns

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 ?

Imagine profil
Abandonează
Autor

I add this field on the model.

Its a Custom model wich i put that field

Related Posts Răspunsuri Vizualizări Activitate
1
ian. 21
7206
0
ian. 23
2026
1
oct. 22
2190
3
aug. 20
4411
2
mar. 15
8024