Odoo Help

Welcome!

This community 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.

0

Unable to cancel Draft Invoices

By
Brandon Bazemore
on 7/27/15, 8:26 PM 556 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 ?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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