Odoo Help

Welcome!

This community 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.

0

In accounting need to write action_move_create as super function?

By
vadivel
on 9/3/14, 2:38 AM 851 views

Hi Friends,

 

I have to inherit and need to write some code in action_move_create function.So i have to call it from my customized module.But my customized function hasn't called when validation of invoices.I even tried with super notation as below code:

return super(account_invoice,self).action_move_create(cr, uid, ids, *args)

But it didn'd responds.So what i have to do?Help me in this Situation.thanks in advance

1

Bole

--Bole--
2385
| 5 4 6
Zagreb | Karlovac, Croatia
--Bole--

there is only 10 kind of people the ones that understand binary ... and others

Bole
On 9/8/14, 10:36 AM

1. did you put dependancy for account module in your __openerp__.py ?

2. since you probably want to modify moves created by that function... maybe you should do it like:

def action_move_create(self, cr, uid, ids, context=None):
    # first call super to get the result of original method
    res = super(account_invoice, self)..action_move_create(cr, uid, ids, context=context)
    # now modify the result 
    for r in res:
        #...do some modifications
    return res # finaly return modified result

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/3/14, 2:38 AM
Seen: 851 times
Last updated: 3/16/15, 8:10 AM