Odoo Help

1

0
10 Answers
1
Avatar

Mohammed Amal

--Mohammed Amal--

2159
| 6 3 9
Malappuram, الهند
--Mohammed Amal--

Email : mohammedamal.n@gmail.com

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

Mohammed Amal
28‏/6‏/2018 1:43 ص

Hi,

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.

6 Comments
Deb Joy
28‏/6‏/2018 3: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
28‏/6‏/2018 3:31 ص

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

Mohammed Amal
28‏/6‏/2018 3:35 ص

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

Deb Joy
28‏/6‏/2018 4: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
28‏/6‏/2018 6: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‏/6‏/2018 7:58 م

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

0
Avatar

subbarao

--subbarao--

1216
| 5 1 7
Chennai, الهند
--subbarao--


subbarao
26‏/2‏/2019 10:51 م

Hello,

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.

0
Raul Contreras Martinez
26‏/2‏/2019 7:57 م

Hi.

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



2 Comments
Deb Joy
27‏/2‏/2019 1:12 ص

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

Dhivya
27‏/2‏/2019 2:19 ص

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

0
Simplify-ERP® Developers
18‏/1‏/2019 7:39 ص

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:

invoice_header.action_invoice_open()

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

Ask a Question
Writer
Keep Informed
1 follower(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.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now