← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 791442] Re: Magento Grouped product MPR error message

 

Hello, 
This has been fixed on revision 402
http://bazaar.launchpad.net/~openlabs-akretion-consortium/magentoerpconnect/magentoerpconnect-v6/revision/402
Line 

@@ -956,7 +956,8 @@
             last_updated_time = datetime.datetime.fromtimestamp(time.mktime(time.strptime(last_updated_product, '%Y-%m-%d %H:%M:%S')))
             if product_read[3] == 'grouped':
                 cr.execute('select * from ir_module_module where name=%s and state=%s', ('mrp','installed'))
-                if cr.fetchone() and 'mrp' in data_record and data_record['mrp']:
+                data_record = cr.fetchone()
+                if data_record and 'mrp' in data_record:
                     cr.execute("select id, write_date, create_date from mrp_bom where product_id = %s", (product_read[0],))
                     read_bom = cr.fetchall()
                     for bom in read_bom:

** Changed in: magentoerpconnect
       Status: New => Confirmed

** Changed in: magentoerpconnect
       Status: Confirmed => Fix Released

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/791442

Title:
  Magento Grouped product MPR error message

Status in Magento Open ERP Connector:
  Fix Released

Bug description:
  Environment Information : 
  System : Windows-XP-5.1.2600-SP3
  OS Name : nt
  Operating System Release : XP
  Operating System Version : 5.1.2600
  Operating System Architecture : 32bit
  Operating System Locale : fr_FR.cp1252
  Python Version : 2.5.2
  OpenERP-Client Version : 6.0.1
  Last revision No. & ID :Bazaar Package not Found !Traceback (most recent call last):
    File "/usr/share/pyshared/openerp-server/netsvc.py", line 489, in dispatch
      result = ExportService.getService(service_name).dispatch(method, auth, params)
    File "/usr/share/pyshared/openerp-server/service/web_services.py", line 599, in dispatch
      res = fn(db, uid, *params)
    File "/usr/share/pyshared/openerp-server/osv/osv.py", line 122, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/usr/share/pyshared/openerp-server/osv/osv.py", line 176, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/usr/share/pyshared/openerp-server/osv/osv.py", line 167, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/usr/share/pyshared/openerp-server/addons/base_sale_multichannels.zip/base_sale_multichannels/sale.py", line 148, in export_catalog
      self.export_products(cr, uid, shop, context)
    File "/usr/share/pyshared/openerp-server/addons/base_sale_multichannels.zip/base_sale_multichannels/sale.py", line 139, in export_products
      self.export_products_collection(cr, uid, shop, context)
    File "/usr/share/pyshared/openerp-server/addons/base_sale_multichannels.zip/base_sale_multichannels/sale.py", line 136, in export_products_collection
      self.pool.get('product.product').ext_export(cr, uid, product_to_export, [shop.referential_id.id], {}, context)
    File "/usr/share/pyshared/openerp-server/addons/magentoerpconnect-v6.zip/magentoerpconnect-v6/product.py", line 941, in ext_export
      if cr.fetchone() and 'mrp' in data_record and data_record['mrp']:
  NameError: global name 'data_record' is not defined

  Openerp V6 and Magento ver. 1.4.2.0 
  This message error has occured after creating a grouped product in magento and importing inside openerp.
  Any info?


References