Odoo Help


integrity error while creating Invoice

Mike Lindsay
on 4/8/13, 10:37 PM 8,778 views

Just starting to test V7 today. This is with a blank install. I successfully created customers, products, and sales orders. After confirming the sales order, and completing the Delivery Order, I click Create Invoice, and get this message;

Integrity Error

The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set

[object with reference: account_id - account.id]

I assume I just haven't completed setup of something. Any ideas what I missed?

Mike Lindsay
On 4/16/13, 10:33 PM

Somehow I installed invoicing and payments, but ended up with Accounting module not even installed. That was the issue.

On 4/9/13, 6:05 AM

I would check the following items:

  • accounting journals
  • properties for your products in sales: check that in the accounting tab of your products

+1 - this is usually because the product your are trying to invoice has no income account.

Ray Carnes
on 4/9/13, 4:39 PM

I set income accounts for the items parent category. I will try to double check this today though, been a little busy.

Mike Lindsay
on 4/12/13, 4:47 PM
On 6/21/13, 1:53 PM

This happens if the Customer you are selling to, has no Accounts Payable and Accounts Receivable tied to his profile.

To be on the safe side, configure an expense and income accounts for the Saleable Product.

Thanks a lot. I was getting this error on Purchase Orders also and I couldn't figure out what to do as I had Income / Expense accounts for the products. Here I missed AP / AR accounts for the Vendor. Fixed that and my problem was resolved.

Thinkwell Designs, Dave Burkholder
on 7/26/13, 10:10 AM



| 5 4 7
Baarn, Netherlands
On 4/9/13, 5:02 AM

The answer is already in the message. Somehow the invoice is missing an id for the account, which is a obligated field. You probably have not setup something for accounting (for example which financial book does the invoice have to be mapped in order for the financial department to process it correctly). Have you installed any financial modules and have you specified which kind of bookkeeping you want to use?

Jordan Vrtanoski
On 11/10/14, 3:07 PM

I had same problem. My solution was to install the Accounting module and to set-up the "Income Account" and "Expense Account" for the product, as well as the accounts for the customer.

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 E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 4/8/13, 10:37 PM
Seen: 8778 times
Last updated: 4/5/18, 4:55 PM