콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
4467 화면

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
7495
0
1월 23
2283
1
10월 22
2485
3
8월 20
4658
2
3월 15
8248