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

I want to know the def of this button where can i find this?? anyone please help thanks in advance..



 

아바타
취소
베스트 답변

It is part of account workflow...

Look under: Settings -> Technical -> Workflow -> account.invoice.basic 
Check : open , that is  the state to wich invoice transfers, and befor that it executes 4 python actions:
action_date_assign()
action_move_create()
action_number()
invoice_validate()

In general, buttons can have
type="object" -> meaning it starts a python method where name="name_of_method"
type="action" -> meaning it starts %(action_external_id)s

OR type is not present ( not defined ) , and in that case it is part of workflow, (usualy transition or activity ) 

hope it helps : )

may the source be with you !
 

아바타
취소
작성자

thanks Bole

베스트 답변

Hi,

Here Validate button is type of workflow by default. Because if you are not specify any type into button then it will default take "workflow" type.

So, based on that button it will trigger one signal "invoice_open". Based on this signal "invoice_open" workflow will trigger activity and it will be "act_draft" to "act_open" and invoice will be moved from "Draft" to "Open".

And system will trigger functions of the destination activity. In this case desination activity is "act_open". According to the "act_open" activity there is four different function will be called when you press "Validate" button.

        <record id="act_open" model="workflow.activity">
            <field name="wkf_id" ref="wkf"/>
            <field name="name">open</field>
            <field name="action">action_date_assign()
action_move_create()
action_number()
invoice_validate()</field>
            <field name="kind">function</field>
        </record>

Here you can see that 1) action_date_assign(), 2) action_move_create(), 3) action_number(), 4) invoice_validate() will called.

I hope it is easy to understand and you will get what you want.

아바타
취소
작성자

thanks Empiro