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

I need to know wich method is called from the button "Create Invoice" of the object stock_picking. I turned on the developer mode, and doing mouse over the button I can see the next information about the button:

Object: stock.picking
Modifiers: {"invisible":["|",["state",@<|","done"],
["invoice_state","<>","2binvoiced"]]}
Button Type action
Action ID: 464

I guess the code of this button is declarated at the stock.picking object, but, How can I now wich method is called by this button? Thanks.

아바타
취소
베스트 답변

In this case, it is an action button, and action ID is actualy id of action in database.
In order to find out wich action is triggered by a button you need to take a look at stock_view.xml in stock module.. 
Find a button (reconginze it by string) and take a look at what action is it calling 
You can find some examples arround line 755-756 .. code definig that button could look something like:
<button name="%(action_stock_invoice_onshipping)d" string="Create Invoice/Refund"  attrs="{'invisible': ['|','|',('state','&lt;&gt;','done'),('invoice_state','=','invoiced'),('invoice_state','=','none')]}"  type="action" class="oe_highlight" groups="base.group_user"/>

"%(action_stock_invoice_onshipping)d"  is part you are looking for...

 

Now you know wich action is triggered.. so you need to search for action_stock_invoice_onshipping in redocrd ids and you will know what you wanted to find out.. 

Hope it helps.. 
 

아바타
취소
작성자

Thanks for your answers, it helps to me.

베스트 답변

It's an action button, it displays a window for example, or return some view you can know the method of a button when it's an object button.

아바타
취소
작성자

Thanks for your answer, I didn't knew the difference between objetcs and actions. Helpfull answer ;)

관련 게시물 답글 화면 활동
0
8월 23
1888
1
1월 24
14428
Expected singleton 해결 완료
9
3월 20
42228
2
10월 18
4118
2
3월 18
5240