Rev 673 breaks order import openerp6.1-module

Bug #1038839 reported by Kyle Waid on 2012-08-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magento OpenERP Connector
In Progress
Undecided
Unassigned

Bug Description

2012-08-20 02:54:04,271 27932 ERROR ? Midwest Supplies: (u'Error with the mapping : price. Error details : float division by zero',)
Traceback (most recent call last):
  File "/usr/local/openerp/openobject-extension/base_external_referentials/decorator.py", line 130, in wrapper
    response = func(self, import_cr, uid, external_session, resource, *args, **kwargs)
  File "/usr/local/openerp/e-commerce-addons/base_sale_multichannels/sale.py", line 562, in _record_one_external_resource
    defaults=defaults, mapping=mapping, mapping_id=mapping_id, context=context)
  File "/usr/local/openerp/openobject-extension/base_external_referentials/external_osv.py", line 682, in _record_one_external_resource
    vals = self._transform_one_resource(cr, uid, external_session, 'from_external_to_openerp', resource, mapping=mapping, mapping_id=mapping_id, defaults=defaults, context=context)
  File "/usr/local/openerp/openobject-extension/base_external_referentials/decorator.py", line 49, in wrapped
    return func(self, cr, uid, argument, *args, **kwargs)
  File "/usr/local/openerp/magentoerpconnect/magentoerpconnect/sale.py", line 422, in _transform_one_resource
    previous_result=previous_result, defaults=defaults, context=context)
  File "/usr/local/openerp/openobject-extension/base_external_referentials/external_osv.py", line 1404, in _transform_one_resource
    vals = self._transform_sub_mapping(cr, uid, external_session, convertion_type, resource, vals, sub_mapping_list, mapping, mapping_id, mapping_line_filter_ids=mapping_line_filter_ids, defaults=defaults, context=context)
  File "/usr/local/openerp/openobject-extension/base_external_referentials/external_osv.py", line 1576, in _transform_sub_mapping
    lines = sub_mapping_obj._transform_resources(*transform_args, **transform_kwargs)
  File "/usr/local/openerp/openobject-extension/base_external_referentials/external_osv.py", line 1296, in _transform_resources
    previous_result=result, defaults=defaults, context=context))
  File "/usr/local/openerp/e-commerce-addons/base_sale_multichannels/sale.py", line 880, in _transform_one_resource
    previous_result=previous_result, defaults=defaults, context=context)
  File "/usr/local/openerp/openobject-extension/base_external_referentials/external_osv.py", line 1378, in _transform_one_resource
    raise MappingError(e, mapping_line['name'], self._name)
MappingError: u'the mapping line : price for the object sale.order.line have an error : float division by zero'

Hi kyle can you test with the rev 676? I push a fix.

Thanks

Changed in magentoerpconnect:
status: New → In Progress
Kyle Waid (midwest) wrote :

Hello, Your patch fixed the issue. However I have a client in Austria that has another bug related to this code. Here is the mapping error

(u'Error with the mapping : price. Error details : float() argument must be a string or a number',)

I reverted to the code before you changed it the first time and it worked. Sorry I don't have any better details than that.

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

Other bug subscribers