Odoo Help

1

where can i find the def of the button VALIDATE ?

By
Alcaline
on 11/6/14, 3:37 AM 932 views

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



 

0
Bole
On 11/6/14, 4:21 AM

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

Alcaline
on 11/8/14, 3:06 AM
0

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

Alcaline
on 11/8/14, 3:06 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 11/6/14, 3:37 AM
Seen: 932 times
Last updated: 3/16/15, 8:10 AM