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