← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 753478] [NEW] Error when exporting stock levels

 

Public bug reported:

Hello

When the scheduler "Magento Export Stock Levels Only" runs I have the
following error in the logs :

Traceback (most recent call last):
  File "/home/openerp/openerp-server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/home/openerp/openerp-server/bin/service/web_services.py", line 599, in dispatch
    res = fn(db, uid, *params)
  File "/home/openerp/openerp-server/bin/osv/osv.py", line 122, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/openerp/openerp-server/bin/osv/osv.py", line 176, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/openerp/openerp-server/bin/osv/osv.py", line 167, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/openerp/openerp-server/bin/addons/base_sale_multichannels/sale.py", line 166, in export_inventory
    res = self.pool.get('product.product').export_inventory(cr, uid, product_ids, '', context)
  File "/home/openerp/openerp-server/bin/addons/magentoerpconnect/product.py", line 1024, in export_inventory
    stock_id = self.pool.get('sale.shop').browse(cr, uid, context['shop_id']).warehouse_id.lot_stock_id.id
AttributeError: 'NoneType' object has no attribute 'id'

So I tried to define a warehouse in the Magento main store shop and got the following warning :
"No external id found, are you sure that the referential are syncronized? Please contact your administrator. (more information in magentoerpconnect/sale.py)"

Do you know how to solve this issue ?

** Affects: magentoerpconnect
     Importance: Undecided
         Status: New

** Description changed:

  Hello
  
  When the scheduler "Magento Export Stock Levels Only" runs I have the
- following in the logs :
+ following error in the logs :
  
  Traceback (most recent call last):
-   File "/home/openerp/openerp-server/bin/netsvc.py", line 489, in dispatch
-     result = ExportService.getService(service_name).dispatch(method, auth, params)
-   File "/home/openerp/openerp-server/bin/service/web_services.py", line 599, in dispatch
-     res = fn(db, uid, *params)
-   File "/home/openerp/openerp-server/bin/osv/osv.py", line 122, in wrapper
-     return f(self, dbname, *args, **kwargs)
-   File "/home/openerp/openerp-server/bin/osv/osv.py", line 176, in execute
-     res = self.execute_cr(cr, uid, obj, method, *args, **kw)
-   File "/home/openerp/openerp-server/bin/osv/osv.py", line 167, in execute_cr
-     return getattr(object, method)(cr, uid, *args, **kw)
-   File "/home/openerp/openerp-server/bin/addons/base_sale_multichannels/sale.py", line 166, in export_inventory
-     res = self.pool.get('product.product').export_inventory(cr, uid, product_ids, '', context)
-   File "/home/openerp/openerp-server/bin/addons/magentoerpconnect/product.py", line 1024, in export_inventory
-     stock_id = self.pool.get('sale.shop').browse(cr, uid, context['shop_id']).warehouse_id.lot_stock_id.id
+   File "/home/openerp/openerp-server/bin/netsvc.py", line 489, in dispatch
+     result = ExportService.getService(service_name).dispatch(method, auth, params)
+   File "/home/openerp/openerp-server/bin/service/web_services.py", line 599, in dispatch
+     res = fn(db, uid, *params)
+   File "/home/openerp/openerp-server/bin/osv/osv.py", line 122, in wrapper
+     return f(self, dbname, *args, **kwargs)
+   File "/home/openerp/openerp-server/bin/osv/osv.py", line 176, in execute
+     res = self.execute_cr(cr, uid, obj, method, *args, **kw)
+   File "/home/openerp/openerp-server/bin/osv/osv.py", line 167, in execute_cr
+     return getattr(object, method)(cr, uid, *args, **kw)
+   File "/home/openerp/openerp-server/bin/addons/base_sale_multichannels/sale.py", line 166, in export_inventory
+     res = self.pool.get('product.product').export_inventory(cr, uid, product_ids, '', context)
+   File "/home/openerp/openerp-server/bin/addons/magentoerpconnect/product.py", line 1024, in export_inventory
+     stock_id = self.pool.get('sale.shop').browse(cr, uid, context['shop_id']).warehouse_id.lot_stock_id.id
  AttributeError: 'NoneType' object has no attribute 'id'
- 
  
  So I tried to define a warehouse in the Magento main store shop and got the following warning :
  "No external id found, are you sure that the referential are syncronized? Please contact your administrator. (more information in magentoerpconnect/sale.py)"
  
  Do you know how to solve this issue ?

-- 
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/753478

Title:
  Error when exporting stock levels

Status in Magento Open ERP Connector:
  New

Bug description:
  Hello

  When the scheduler "Magento Export Stock Levels Only" runs I have the
  following error in the logs :

  Traceback (most recent call last):
    File "/home/openerp/openerp-server/bin/netsvc.py", line 489, in dispatch
      result = ExportService.getService(service_name).dispatch(method, auth, params)
    File "/home/openerp/openerp-server/bin/service/web_services.py", line 599, in dispatch
      res = fn(db, uid, *params)
    File "/home/openerp/openerp-server/bin/osv/osv.py", line 122, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/openerp/openerp-server/bin/osv/osv.py", line 176, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/home/openerp/openerp-server/bin/osv/osv.py", line 167, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/home/openerp/openerp-server/bin/addons/base_sale_multichannels/sale.py", line 166, in export_inventory
      res = self.pool.get('product.product').export_inventory(cr, uid, product_ids, '', context)
    File "/home/openerp/openerp-server/bin/addons/magentoerpconnect/product.py", line 1024, in export_inventory
      stock_id = self.pool.get('sale.shop').browse(cr, uid, context['shop_id']).warehouse_id.lot_stock_id.id
  AttributeError: 'NoneType' object has no attribute 'id'

  So I tried to define a warehouse in the Magento main store shop and got the following warning :
  "No external id found, are you sure that the referential are syncronized? Please contact your administrator. (more information in magentoerpconnect/sale.py)"

  Do you know how to solve this issue ?



Follow ups

References