Question

I want to add a small process after an user validate an invoice in Openerp 7 (just some recording for the salesperson) but i dont know how to 'intercept' the action ?

Was it helpful?

Solution

Ok, i just had to inherit the account_invoice class and define a new invoice_validate method

@user1576199 is this what you meant ?

from account import account_invoice

class account_invoice(osv.osv):
    _inherit="account.invoice"
    def invoice_validate(self, cr, uid, ids, context=None):
        super(account_invoice,self).invoice_validate()
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top