This question has been flagged
2 Replies
8436 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."

Avatar
Discard
Best Answer

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.

Thanks,

Avatar
Discard
Author

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

Author Best Answer

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

Avatar
Discard

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

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.

Author

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

Author

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!