Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
4245 Visualizzazioni

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
Abbandona

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

Risposta migliore

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
Abbandona
Autore

I add this field on the model.

Its a Custom model wich i put that field

Post correlati Risposte Visualizzazioni Attività
1
gen 21
7212
0
gen 23
2037
1
ott 22
2197
3
ago 20
4420
2
mar 15
8029