new products imported during sale order does not work

Bug #732163 reported by Kyle Waid
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magento OpenERP Connector
Fix Released
Undecided
Unassigned

Bug Description

Using current sources. If I download a Magento sale order where a product exists in both erp and magento, but an xml id does not exist it will return this error. To correct the error I had to manually create the xml id.

Im not sure if this would happen with a product that does not exist in erp. Also this may be linked with uploaded products to magento from erp, as in if I create a product in erp then upload to magento, when I download product to a different erp installation this may occur.

INE 1: select id from wkf_instance where res_id=false and res_type=...
                                                ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
, in query select id from wkf_instance where res_id=%s and res_type=%s and state=%s
[2011-03-09 11:31:04,198][dev2] ERROR:netsvc.agent:Job call of self.pool.get('sale.shop').run_import_orders_scheduler(cr, uid, *()) failed
Traceback (most recent call last):
  File "/opt/openerp/server/bin/addons/base/ir/ir_cron.py", line 94, in _callback
    f(cr, uid, *args)
  File "/opt/openerp/addons/magentoerpconnect/sale.py", line 265, in run_import_orders_scheduler
    self._sale_shop(cr, uid, self.import_orders, context=context)
  File "/opt/openerp/addons/magentoerpconnect/sale.py", line 257, in _sale_shop
    callback(cr, uid, ids, context=context)
  File "/opt/openerp/addons/base_sale_multichannels/sale.py", line 192, in import_orders
    self.import_shop_orders(cr, uid, shop, defaults, context)
  File "/opt/openerp/addons/magentoerpconnect/sale.py", line 155, in import_shop_orders
    resp = self.pool.get('sale.order').mage_import_base(cr, uid, context.get('conn_obj', False), shop.referential_id.id, defaults=defaults, context={'one_by_one': True, 'ids_or_filter':ids_or_filter})
  File "/opt/openerp/addons/magentoerpconnect/magerp_osv.py", line 236, in mage_import_base
    rec_result = self.ext_import(cr, uid, rec_data, external_referential_id, defaults, context)
  File "/opt/openerp/addons/base_external_referentials/external_osv.py", line 208, in ext_import
    crid = self.oe_create(cr, uid, vals, each_row, external_referential_id, defaults, context)
  File "/opt/openerp/addons/magentoerpconnect/sale.py", line 502, in oe_create
    self.oe_status(cr, uid, order_id, paid, context)
  File "/opt/openerp/addons/base_sale_multichannels/sale.py", line 363, in oe_status
    wf_service.trg_validate(uid, 'account.invoice', invoice_id, 'invoice_open', cr)
  File "/opt/openerp/server/bin/workflow/wkf_service.py", line 78, in trg_validate
    cr.execute('select id from wkf_instance where res_id=%s and res_type=%s and state=%s', (res_id, res_type, 'active'))
  File "/opt/openerp/server/bin/sql_db.py", line 78, in wrapper
    return f(self, *args, **kwargs)
  File "/opt/openerp/server/bin/sql_db.py", line 131, in execute
    res = self._obj.execute(query, params)
ProgrammingError: operator does not exist: integer = boolean
LINE 1: select id from wkf_instance where res_id=false and res_type=...
                                                ^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.

Revision history for this message
Kyle Waid (midwest) wrote :

I confirm this also happens when importing orders where products do not exist in openerp. Before it would create the products, but now it doesnt. Some sort of regression perhaps.

Kyle Waid (midwest)
Changed in magentoerpconnect:
status: New → Confirmed
Revision history for this message
Sébastien BEAU - http://www.akretion.com (sebastien.beau) wrote :

fixed in rev 482 of trunk version

Changed in magentoerpconnect:
status: Confirmed → Fix Released
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.