Odoo Help


Error when importing Leads

Ged Mirski-Fitton
on 1/18/14, 4:31 AM 1,197 views

I am trying to import a set of lead data via the CSV import. I created a dummy lead and exported it to confirm the format and mandatory columns. As far as I can see I have everything matching (clearly something is wrong though). I have also tried various tweaks to the CSV file including controlling the encoding format and quoting all fields. The result is the same every time - "need more than 1 value to unpack".
The format and sample data are:

"contact_name","title","Function","email_from","partner_name","Street","city","Zip","phone","FAX","ref2","ref","Subject" "Michael Smith","Mr","Accounts Manager","m.smith@tbps.co.uk","The Big Partnership","Ground Floor, Big Towers Court Main Street","Anytown","AT41 1AT","01234563000","01234564000","www.thebigpartnership.co.uk",70,"Professional Services"

The error block from the logs is given below:

Traceback (most recent call last):
File "/usr/lib/pymodules/python2.7/openerp/netsvc.py", line 292, in dispatch_rpc result = ExportService.getService(service_name).dispatch(method, params) File "/usr/lib/pymodules/python2.7/openerp/service/web_services.py", line 626, in dispatch res = fn(db, uid, params) File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 190, in execute_kw return self.execute(db, uid, obj, method, *args, *kw or {}) File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 132, in wrapper return f(self, dbname, args, *kwargs) File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 199, in execute res = self.execute_cr(cr, uid, obj, method, args, *kw) File "/usr/lib/pymodules/python2.7/openerp/osv/osv.py", line 187, in execute_cr return getattr(object, method)(cr, uid, args, *kw) File "/usr/lib/pymodules/python2.7/openerp/addons/base_import/models.py", line 320, in do cr, uid, import_fields, data, context=context) File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 1379, in load noupdate=noupdate, res_id=id, context=context)) File "/usr/lib/pymodules/python2.7/openerp/addons/base/ir/ir_model.py", line 967, in _update res_id = model_obj.create(cr, uid, values, context=context) File "/usr/lib/pymodules/python2.7/openerp/addons/crm/crm_lead.py", line 99, in create return super(crm_lead, self).create(cr, uid, vals, context=create_context) File "/usr/lib/pymodules/python2.7/openerp/addons/mail/mail_thread.py", line 241, in create thread_id = super(mail_thread, self).create(cr, uid, values, context=context) File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 4452, in create self._check_selection_field_value(cr, user, field, vals[field], context=context) File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 2817, in _check_selection_field_value val_model, val_id_str = value.split(',', 1) ValueError: need more than 1 value to unpack

I may be staring at something obvious, but I can't see why I'm getting this error. Can anybody provide any clues, please?

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: 1/18/14, 4:31 AM
Seen: 1197 times
Last updated: 3/16/15, 8:10 AM