How to Validate Odoo Invoice Automatically

You might want to validate your odoo invoices automatically, without bothering your users to go to each vendor/customer bill and validate them, instead triggering based on certain conditions. It’s a 4 step code:

First, we get the invoice:

invoice_id = self.env['account.invoice'].browse(your_invoice_id)

Assign the date to it:


Create the invoice moves:


Now you can validate the invoice:


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.