This question has been flagged
1 Reply
2537 Views

  How can I setup an automated action to email an invoice once it is validated?  I have tried on creation,  but that tries to send the email as soon as the invoice is created and before it is validated resulting in a $0 invoice being sent.  

Avatar
Discard
Best Answer

Hello, 

When validated Invoice, system was create account_move -> account_move_line. You want Automatic email on invoice validation, you write in post function in account move.

 class AccountMove(models.Model):

_inherit = 'account.move'


@api.multi

def post(self):

res = super(AccountMove, self).post()

// You write function send mail

return res

Avatar
Discard