Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4317 มุมมอง

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
7254
0
ม.ค. 23
2135
1
ต.ค. 22
2301
Dynamic Form from Tree View แก้ไขแล้ว
3
ส.ค. 20
4472
2
มี.ค. 15
8061