Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
1 Відповісти
9011 Переглядів

Hi Friends.

Good Morning.

 

I want to override the Validate function in Customer Invoices from Customer Module.

I know How to override and how to create Custom Module, my query was that when I search for the function, I am unable to find the function in the addons.

If that function didn't relate to that module , how openerp was performing the functionality.

Or if I am wrong , please post me the function module details.

The function Name is : invoice_open

This function relate to "account.invoice" module.

 

Thanks,

Omkar

Аватар
Відмінити

Hi Omkar, If my answer is correct then please accept my answer by clicking on the right mark. thanks for that. :)

Найкраща відповідь

Hi Omkar,

Please have a look on the workflow of the invoice. 

Activity :  "open"

        <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>

Transition : "draft" to "open"

        <record id="t4" model="workflow.transition">
            <field name="act_from" ref="act_draft"/>
            <field name="act_to" ref="act_open"/>
            <field name="signal">invoice_open</field>
        </record>

Based on this workflow there is an signal "invoice_open" it is not an method. There is a button with name "invoice_open" and by default type of that button is "workflow". So, when this button is pressed at that time the methods are called as below.

1) action_date_assign()
2) action_move_create()
3) action_number()
4) invoice_validate()

Those four methods are called because those are write down on the activity "open".

So, If you want to override or inherit validate function of invoice then please override or inherite any one of the function.

I hope it is clear to you and helpful to achieve your goal.

 

 

Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
0
серп. 25
2
3
лют. 25
2767
1
лют. 25
1296
invoice number prefix Вирішено
1
лист. 24
2494
1
груд. 23
2418