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 ?

Était-ce utile?

La 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()
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top