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.

1

Constraint Error The code of the journal must be unique per company !

By
Domen česnik
on 2/18/13, 6:19 AM 5,390 views

Helo,

When i try to do anything with modules of settings i get the error "Constraint Error

The code of the journal must be unique per company !"

Where do i fix this?

Best, Domen

did you make experiments with two or more companies, or have you this problem on fresh installation?

Jānis
on 2/18/13, 7:00 AM

There were two companies and one got deleted: If i try to define jouranls per company there is no company option

Domen česnik
on 2/18/13, 7:01 AM

If you dont have many data in database then make fresh database and you solve this problem and any other next problems.

Jānis
on 2/18/13, 7:06 AM

I have a lot of data in the db. Any other solution?

Domen česnik
on 2/18/13, 7:20 AM

Try to make new journals (hope this will make new journals for correct company).

Did you delete other company or just make invisible?

Jānis
on 2/18/13, 7:44 AM

I have created new journals and i can't remove old ones, as they have reference to it. I have deleted the company.

Domen česnik
on 2/18/13, 8:44 AM
1
Jānis
On 2/18/13, 6:37 AM

It looks like that you are using more than one company, so you need to define financial journals per company. Accounting or Invoicing / Configuration / Journals / Journals and define journals per company.

0
Andrey Kolpakov
On 9/9/15, 7:51 AM

I have the same issue and now I know the reason.

I have a custom module which create Journals as module data. I removed that module from the system (but journals were left in the system). And when I try to install this module again system try to insert Journals from that module in the database with the same codes and names as before. That's why you get "The code of the journal must be unique per company !".

As a hack - just rename Journal's names and codes for a while then install your module

0

Ahmet Altinisik

--Ahmet Altinisik--
2137
| 8 7 10
ANKARA, Turkey
--Ahmet Altinisik--

http://www.altinkaya.eu

Ahmet Altinisik
On 2/18/13, 9:17 AM

I am having this error also when: I try to duplicate a journal with a code entry with 4 character. system try to change the code of the new journal by adding something like (copy) at the end of the code. Since length is limited a unique code cannot be created. As a result I see such an error.

You are getting this error because you are trying to create a new journal with already defined code. If you are duplicating the entry try changing the code first after duplicating revert it back to the original value.

If it is not the code of the journal it is code of the attached sequence or journal entry.

0
Domen česnik
On 2/18/13, 6:53 AM

I'm using only one company I have only default Journals

This should be converted to a comment, not enough rights to do it

Yaroslav
on 2/18/13, 7:55 AM

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

2 follower(s)

Stats

Asked: 2/18/13, 6:19 AM
Seen: 5390 times
Last updated: 9/9/15, 7:51 AM