Odoo Aide


10 Answers

Mohammed Amal N

--Mohammed Amal N--

| 6 3 9
Ernakulam, Inde
--Mohammed Amal N--

Email : mohammedamal.n@gmail.com

Blog: https://www.blogger.com/profile/14877879550922602186

Mohammed Amal N
28/06/2018 01:43


An open invoice with total amount  zero or is reconciled with full payment will be automatically converted to paid state.

Make sure your invoice's total amount is not zero and you are not creating any payment for this invoice.

Deb Joy
28/06/2018 03:12

Hello, I see that invoice that I create is reconciled. how can I make it to false? even though I assigned it to false, it automatically becomes false. Is there anything that triggers reconciled to true?

Mohammed Amal N
28/06/2018 03:31

I think the code you provided cannot trigger a payment creation or reconcile.

Mohammed Amal N
28/06/2018 03:35

Also check how a payment is created against the customer in the invoice.

Deb Joy
28/06/2018 04:14

I really appreciate your help, can you please give me a sample code where it can trigger a payment creation or reconcile? thank you.

Mohammed Amal N
28/06/2018 06:59

Journal entry for the invoice is called inside function action_invoice_open(), payment creation is maintained in validate button click in register payment wizard. Check if you have edited any of these files

Deb Joy
28/06/2018 19:58

once I clicked validate, it doesn't go to register payment, instead, it's already in 'paid' state.




| 5 2 8
Chennai, Inde

26/02/2019 22:51


If you call validate button it will create one Journal entry for that invoice.

If the Journal entry  having debit and credit accounts both are payable/receivable then the invoice due amount is zero, so invoice moved to paid state.

Note : Either debit account or credit account only payable/receivable but not both.



Did you get a solution?... I am having the same problem...The invoice is getting the paid state instead of open state.

Deb Joy
27/02/2019 01:12

I removed the journal_id in the create of invoice_header, because it would automatically create it's journal_id

27/02/2019 02:19

Hi Raul, please check your accounting configuration in "Customer Invoice" Journal.


When creating an invoice thru code on odoo, even though the default state is draft, i think that you will need to pass that again in your dict as follows,

      # create invoice

        invoice_header = self.env['account.invoice'].create({

            'partner_id': customer,

            # 'number': self.get_invoice_sequence(),

            # 'date_invoice': today_date,

            'account_id': account_id,

            'journal_id': journal_id,

            'user_id': self.env.user.id,

            'state': 'draft',


After that call the action as you did before in your code and it will be okay:


If there are other issues when this invoice is created, you can always inherit the action_invoice_open def and make your changes in the function itself to avoid complications.

Just make sure to call it with super so that other things get calculated as well.

I hope it is helpfull

Riste Kabranov

Odoo developer at simplify-erp.com

Poser une question
Keep Informed
1 Abonné(e)s
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Odoo Training Center

Access to our eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now