Context value is not passed in JSON call of base_import

Bug #1247821 reported by Andreas Brueckl
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Low
OpenERP R&D Addons Team 1

Bug Description

Problem:
========
I am using German values when I am importing many2one fields in CSV. For example I use the value "Deutschland" for the field "country_id" of res.partner. When validating the csv import, an error is shown which says that the value "Deutschland" is not available.
The language of the user is set to "de_DE".

Solution Approach
================
When I manually add the line "context.update({'lang': 'de_DE'})" in "location_name_search" of base/res/res_country.py then everything is working fine.
After some further investigation I found out that the json-call of "base_import.import:do" does not pass the context correctly. I think that the context should be passed like the option "dry_run" is.

Revision history for this message
Andreas Brueckl (andreas-brueckl) wrote :

The original problem occurs in version 7.0-20131003-231232 (Ubuntu 12.04 LTS).

Now I tried the same import in another OpenERP instance (source from 2013-10-23) and everything was working correctly. The country_id "Deutschland" has been recognized as "Germany". In both instances I have installed both languages (en + de).

I have no idea where the difference between the instances is.
Can anyone confirm this issue?

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
importance: Undecided → Low
status: New → Confirmed
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.