Cannot import Addresses from exported data due to title translation

Asked by Yann Papouin

There is no way to import import addresses from exported data due to title translation (Monsieur -> M., Madame -> Mme).
You can try with the attached CSV file exported with the FRENCH language with the "compatible import" option.

[2011-07-16 15:52:04,091][online_test1] ERROR:web-services:Uncaught exception
Traceback (most recent call last):
  File "/opt/openerp/openerp-server-6.0.2/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/openerp-server-6.0.2/bin/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/openerp-server-6.0.2/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/openerp-server-6.0.2/bin/osv/orm.py", line 868, in import_data
    process_liness(self, datas, [], current_module, self._name, fields_def, position=position)
  File "/opt/openerp/openerp-server-6.0.2/bin/osv/orm.py", line 818, in process_liness
    res = _get_id(relation, line[i], current_module, mode)
  File "/opt/openerp/openerp-server-6.0.2/bin/osv/orm.py", line 741, in _get_id
    raise ValueError('No record found for %s' % (id,))
ValueError: No record found for Monsieur

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Yann Papouin (yann-papouin) said :
#1
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#2

Hello Yann,

You can easily Import the Address csv even title field also but you need to take care regarding view, You should import this after opening form view because the related field is exist in form view only not in tree view.

I have successfully Imported this by installing French and after setting this lang I have imported following csv file:

"partner_id","name","country_id","title"
"Bank Wealthy and sons","Arthur Grosbonnet AAAA","France","Mademoiselle"
"Tecsas","Centrale BBBB","France","Madame"
"Centrale d'achats BML","Centrale d'achats 1222","France","Mademoiselle"
"Elec Import","Etienne Lacarte CC","Belgique","Monsieur"

Hope this will help you.

Thanks.

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#3

Hello Yann,

The above added csv will help you.

Thanks.

Revision history for this message
Yann Papouin (yann-papouin) said :
#4

You say that you need a form view to import such data ? So why can I export all fields from the tree view ?

There is no way to run an import when using the web interface in form view (no import/export link). So i tried with the GTK client and the error is the same with your CSV (note that system informations are wrong, I'm using Win7 64Bits)

Environment Information :
System : Windows-32bit
OS Name : nt
Operating System Release :
Operating System Version : 32bit
Operating System Architecture : 32bit
Operating System Locale : fr_FR.cp1252
Python Version : 2.5.2
OpenERP-Client Version : 6.0.2
Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
  File "/opt/openerp/openerp-server-6.0.2/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/opt/openerp/openerp-server-6.0.2/bin/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/opt/openerp/openerp-server-6.0.2/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/openerp/openerp-server-6.0.2/bin/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/openerp/openerp-server-6.0.2/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/openerp/openerp-server-6.0.2/bin/osv/orm.py", line 868, in import_data
    process_liness(self, datas, [], current_module, self._name, fields_def, position=position)
  File "/opt/openerp/openerp-server-6.0.2/bin/osv/orm.py", line 818, in process_liness
    res = _get_id(relation, line[i], current_module, mode)
  File "/opt/openerp/openerp-server-6.0.2/bin/osv/orm.py", line 741, in _get_id
    raise ValueError('No record found for %s' % (id,))
ValueError: No record found for Mademoiselle

Can you help with this problem?

Provide an answer of your own, or ask Yann Papouin for more information if necessary.

To post a message you must log in.