csv import jounal entries as admin fails on company-id

Bug #1203883 reported by Willem Hulshof
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
New
Undecided
Unassigned

Bug Description

In multi company environment the journal entry csv-import fails even on admin because of wrong default company_id in admin user. The message is that validation found that account.company_id is not equal to period.company_id. They ARE equal, but both are not equal to the default company of the user, admin in this case.
If one wants to run an import for entries for more than one company (as admin), this will not work.
Inspecting def _check_company_id in account.move.line.py line 585 shows that this check indeed compares account.company_id with period.company_id. But it also compares both with company_id from context. Which it shouldn't.

ver 7.0 community branch

Revision history for this message
Craig Gowing (credativ) (craiggowing) wrote :

This affects me also, further details are that the company_id on the account.move.line object is a stored field (store=True), but on CSV import the calculation of stored fields seems to be skipped.

It seems to me _check_company_id is failing a fundamental sanity check here:
l.company_id is related to l.account_id.company_id, store=True
l.company_id != l.account_id.company_id

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.