OpenERP Addons (modules)

Import sugarcrm doesn't work properly...

Reported by Michel Filion on 2012-02-20
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenERP Addons
Medium
OpenERP R&D Addons Team 1

Bug Description

I am using the import_sugarcrm module. I am running a local copy of openerp 6.1 on Ubuntu 11.4 with python2.7. Sugarcrm is running on version 5.2.0k.

Based on the tests I did, it looks like the exception occurs when attempting to port cases to claims.

I get the following error code:

Traceback (most recent call last):
  File "/home/michel/openerp61/addons/trunk/import_base/import_framework.py", line 387, in run
    (position, warning) = self._import_table(table)
  File "/home/michel/openerp61/addons/trunk/import_base/import_framework.py", line 145, in _import_table
    data = self.get_data(table)
  File "/home/michel/openerp61/addons/trunk/import_sugarcrm/import_sugarcrm.py", line 87, in get_data
    r = sugar.search(self.context.get('port'), self.context.get('session_id'), table, offset, self.MAX_RESULT_PER_PAGE)
  File "/home/michel/openerp61/addons/trunk/import_sugarcrm/sugar.py", line 174, in search
    ans_dir[tools.ustr(j._name)] = import_sugarcrm.unescape_htmlentities(tools.ustr(j._value))
  File "/home/michel/openerp61/addons/trunk/import_sugarcrm/import_sugarcrm.py", line 37, in unescape_htmlentities
    p.feed(s)
  File "/usr/lib/python2.7/sgmllib.py", line 104, in feed
    self.goahead(0)
  File "/usr/lib/python2.7/sgmllib.py", line 193, in goahead
    self.handle_entityref(name)
  File "/usr/lib/python2.7/sgmllib.py", line 436, in handle_entityref
    self.handle_data(replacement)
  File "/usr/lib/python2.7/htmllib.py", line 65, in handle_data
    self.savedata = self.savedata + data
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa0 in position 0: ordinal not in range(128)

If I don't import cases or emails, I can import accounts and contacts.

Amit Parik (amit-parik) wrote :
Download full text (4.5 KiB)

Hello,

I have checked this issue many times with latest trunk as well as 6.1 but I have faced the another problem that's why I can not check whole issue.

I have faced this 2 different error.

1) Traceback (most recent call last):
  File "/home/amp/workspace/6.1/6.1-addons/import_base/import_framework.py", line 384, in run
    res = self._resolve_dependencies(self.get_mapping()[table].get('dependencies', []), imported)
  File "/home/amp/workspace/6.1/6.1-addons/import_base/import_framework.py", line 416, in _resolve_dependencies
    r = self._import_table(dependency)
  File "/home/amp/workspace/6.1/6.1-addons/import_base/import_framework.py", line 155, in _import_table
    return self._save_data(model, dict(map), final_data, table)
  File "/home/amp/workspace/6.1/6.1-addons/import_base/import_framework.py", line 194, in _save_data
    self._import_self_dependencies(model_obj, field, datas)
  File "/home/amp/workspace/6.1/6.1-addons/import_base/import_framework.py", line 210, in _import_self_dependencies
    obj.import_data(self.cr, self.uid, fields, [values], mode='update', current_module=self.module_name, noupdate=True, context=self.context)
  File "/home/amp/workspace/6.1/6.1-sever/openerp/osv/orm.py", line 1412, in import_data
    process_liness(self, datas, [], current_module, self._name, fields_def, position=position)
  File "/home/amp/workspace/6.1/6.1-sever/openerp/osv/orm.py", line 1371, in process_liness
    res = _get_id(relation, line[i], current_module, mode)
  File "/home/amp/workspace/6.1/6.1-sever/openerp/osv/orm.py", line 1268, in _get_id
    record_id = ir_model_data_obj._get_id(cr, uid, module, xml_id)
  File "/home/amp/workspace/6.1/6.1-sever/openerp/tools/cache.py", line 18, in lookup
    r = self.lookup(self2, cr, *args)
  File "/home/amp/workspace/6.1/6.1-sever/openerp/tools/cache.py", line 46, in lookup
    value = d[args] = self.method(self2, cr, *args)
  File "/home/amp/workspace/6.1/6.1-sever/openerp/addons/base/ir/ir_model.py", line 647, in _get_id
    raise ValueError('No such external ID currently defined in the system: %s.%s' % (module, xml_id))
ValueError: No such external ID currently defined in the system: import_sugarcrm.sugarcrm_Accounts_d30411fc-a195-9ab8-a6a2-4b83321e226c

2) 2012-04-12 09:43:40,628 6457 INFO ? import_sugarcrm: Importing Users into res.users
2012-04-12 09:43:46,746 6457 INFO ? import_sugarcrm: Importing Accounts into res.partner
Traceback (most recent call last):
  File "/home/amp/workspace/6.1/6.1-addons/import_base/import_framework.py", line 387, in run
    (position, warning) = self._import_table(table)
  File "/home/amp/workspace/6.1/6.1-addons/import_base/import_framework.py", line 155, in _import_table
    return self._save_data(model, dict(map), final_data, table)
  File "/home/amp/workspace/6.1/6.1-addons/import_base/import_framework.py", line 185, in _save_data
    fields, values = self._fields_mapp(data, mapping, table)
  File "/home/amp/workspace/6.1/6.1-addons/import_base/import_framework.py", line 242, in _fields_mapp
    value = val(dict(dict_sugar))
  File "/home/amp/workspace/6.1/6.1-addons/import_sugarcrm/import_sugarcrm.py", line 792, in get_partner_address
    id = ...

Read more...

summary: - Cannot migrate sugarcrm cases into openerp claims
+ Import sugarcrm doesn't work properly...
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
importance: Undecided → Medium
status: New → Confirmed
Tejas Tank (tta-openerp) on 2012-09-05
Changed in openobject-addons:
status: Confirmed → In Progress
Tejas Tank (tta-openerp) on 2012-09-25
Changed in openobject-addons:
status: In Progress → Confirmed

Module moved to openerp-extra
https://code.launchpad.net/openerp-extra

Changed in openobject-addons:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers