Odoo Help

0

Unable to cancel Draft Invoices

By
Brandon Bazemore
on 7/27/15, 8:26 PM 830 views

Hello everyone,

When trying to cancel Draft invoices, an exception is thrown. The error in the logs is 

ERROR:  duplicate key value violates unique constraint "account_invoice_number_uniq"
DETAIL: Key (number, company_id, journal_id, type)=(, 1, 2, out_invoice) already exists.
Query failed
PostgreSQL said: duplicate key value violates unique constraint "account_invoice_number_uniq"
Detail: Key (number, company_id, journal_id, type)=(, 1, 2, out_invoice) already exists.


According to postgresql, the query it is trying to run is 

UPDATE "account_invoice" SET "internal_number"='',"number"='',"write_uid"=5,"write_date"=(now() at time zone 'UTC') WHERE id IN (1873)


It looks like the value for number is not being passed.

Any suggestions ?

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

Question tools

1 follower(s)

Stats

Asked: 7/27/15, 8:26 PM
Seen: 830 times
Last updated: 7/27/15, 8:26 PM