Odoo Help


Account and Period must belong to the same company

Mota e Mesquita
on 4/2/13, 2:32 PM 4,761 views

I'm getting this while trying to Validate an invoice... All other invoices are validated, I had no problems a few days ago, but now I see this error and have no clue what it means :|

"ERROR openerp openerp.netsvc: ValidateError Ocorreu um erro ao validar o campo(s) company_id: Account and Period must belong to the same company."


Naresh Soni (nch)

--Naresh Soni (nch)--
--Naresh Soni (nch)--

Team Lead, Odoo(Formerly OpenERP) Support & OPW

Naresh Soni (nch)
On 4/2/13, 2:36 PM

Hi Mota,

You need to check the account and the period used on your invoice. They should belong to the same company as of Invoice.


In the invoice? I see no such option... I simply selected the Customer and use the default company I always use!

PS. thanks for the feedback

Mota e Mesquita
on 4/3/13, 11:28 AM
Mota e Mesquita
On 4/3/13, 11:39 AM

OMG.. I can't believe I missed it, I see what you mean... the Account (SNC account 211...) was set to "Your Company" and I'm using another company I created has my default...

I though the system would create the Accounts for both companies, but I guess not...

EDIT: Actually in "Accounting" -> Accounts, I see 211... in the correct company, but in the invoice (if i clicked the account) it was in "your company"... how is this possible?...

After I edited the invoice and manually selecting the account, then save.... I click it again and now it shows in the correct company... This is VERY VERY strange...!

And its still not validating.... takes ages saying "don't go away.... blah blah..." (kind of annoying, is there anyway to stop this and just show the error in the window?)

The error in the log is still the same :S

For each company you need generate the chart of account separately ! If you want to have different accounts per company.

Naresh Soni (nch)
on 4/3/13, 2:21 PM

Agree with Naresh Soni. But you should also check your current (login) user company also from preference of users or Users list. Your user must work with the company he is doing the invoicing.

Mustufa Rangwala (mra)
on 4/3/13, 2:25 PM

The User in case is the Amin account, I created another but I had all kinds of problems with permissions... like not even being able to create an invoice (and yes the user add access to the comapny).

The admin account has both Access to this Company and "Your company" but the default is the one the other... also this is not the first invoice I've created and validated, so the chart of accounts was already generated... I don't know if it can be rested/re-generated? I will look into that, but this is very odd indeed, I was able to validate invoices before and now I can't... very strange

Mota e Mesquita
on 4/4/13, 8:40 AM

So it truns out that the "Account" for clients 2111.... on every costumer is set to "Your Company"'s Account chart... not sure how or why, because one of the first things I've done was creating the primary company... then importing the costumers.... and only after a few other customizations was the account chart (Portugal) generated!

Now it seems the solution is to edit all clients manually, I tried using the "Mass_Editing" module but it seems to be buggy!

Mota e Mesquita
on 4/5/13, 6:42 AM

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

0 follower(s)


Asked: 4/2/13, 2:32 PM
Seen: 4761 times
Last updated: 3/16/15, 8:10 AM