← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 619289] Re: Import Order discount

 

This branch is not use anymore.
If you still have trouble with the stable branch, please re-open the bug or open a new one.
Best regards

** Changed in: magentoerpconnect
       Status: New => Won't Fix

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

Title:
  Import Order  discount

Status in Magento OpenERP Connector:
  Won't Fix

Bug description:
  I'm working on lp:~openlabs-akretion-consortium/magentoerpconnect/improved_discount_n_address
  When I try to import order got this ERROR:

  [2010-08-17 16:59:26,544] ERROR:web-services:[01]: 
  [2010-08-17 16:59:26,544] ERROR:web-services:[02]: Environment Information : 
  [2010-08-17 16:59:26,544] ERROR:web-services:[03]: System : Linux-2.6.26-2-vserver-686-i686-with-debian-5.0.5
  [2010-08-17 16:59:26,544] ERROR:web-services:[04]: OS Name : posix
  [2010-08-17 16:59:26,545] ERROR:web-services:[05]: Operating System Release : 2.6.26-2-vserver-686
  [2010-08-17 16:59:26,545] ERROR:web-services:[06]: Operating System Version : #1 SMP Thu May 13 01:30:39 UTC 2010
  [2010-08-17 16:59:26,545] ERROR:web-services:[07]: Operating System Architecture : 32bit
  [2010-08-17 16:59:26,546] ERROR:web-services:[08]: Operating System Locale : fr_FR.UTF8
  [2010-08-17 16:59:26,546] ERROR:web-services:[09]: Python Version : 2.5.2
  [2010-08-17 16:59:26,546] ERROR:web-services:[10]: OpenERP-Server Version : 5.0.12
  [2010-08-17 16:59:26,546] ERROR:web-services:[11]: Last revision No. & ID : 
  [2010-08-17 16:59:26,546] ERROR:web-services:[12]: Traceback (most recent call last):
  [2010-08-17 16:59:26,547] ERROR:web-services:[13]:   File "/usr/src/openerp/openerp-server-5.0.12/bin/osv/osv.py", line 58, in wrapper
  [2010-08-17 16:59:26,547] ERROR:web-services:[14]:     return f(self, dbname, *args, **kwargs)
  [2010-08-17 16:59:26,547] ERROR:web-services:[15]:   File "/usr/src/openerp/openerp-server-5.0.12/bin/osv/osv.py", line 119, in execute
  [2010-08-17 16:59:26,547] ERROR:web-services:[16]:     res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  [2010-08-17 16:59:26,547] ERROR:web-services:[17]:   File "/usr/src/openerp/openerp-server-5.0.12/bin/osv/osv.py", line 111, in execute_cr
  [2010-08-17 16:59:26,548] ERROR:web-services:[18]:     return getattr(object, method)(cr, uid, *args, **kw)
  [2010-08-17 16:59:26,548] ERROR:web-services:[19]:   File "/usr/src/openerp/openerp-server-5.0.12/bin/addons/base_sale_multichannels/sale.py", line 196, in import_orders
  [2010-08-17 16:59:26,548] ERROR:web-services:[20]:     self.import_shop_orders(cr, uid, shop, defaults, ctx)
  [2010-08-17 16:59:26,548] ERROR:web-services:[21]:   File "/usr/src/openerp/openerp-server-5.0.12/bin/addons/magentoerpconnect_generic/sale.py", line 114, in import_shop_orders
  [2010-08-17 16:59:26,548] ERROR:web-services:[22]:     'ids_or_filter':ids_or_filter
  [2010-08-17 16:59:26,549] ERROR:web-services:[23]:   File "/usr/src/openerp/openerp-server-5.0.12/bin/addons/magentoerpconnect_generic/magerp_osv.py", line 262, in mage_import_base
  [2010-08-17 16:59:26,549] ERROR:web-services:[24]:     rec_result = self.ext_import(cr, uid, rec_data, external_referential_id, defaults, context)
  [2010-08-17 16:59:26,549] ERROR:web-services:[25]:   File "/usr/src/openerp/openerp-server-5.0.12/bin/addons/base_external_referentials/external_osv.py", line 155, in ext_import
  [2010-08-17 16:59:26,549] ERROR:web-services:[26]:     vals = self.oevals_from_extdata(cr, uid, external_referential_id, each_row, for_key_field, mapping_lines, defaults, context)
  [2010-08-17 16:59:26,549] ERROR:web-services:[27]:   File "/usr/src/openerp/openerp-server-5.0.12/bin/addons/magentoerpconnect_generic/sale.py", line 418, in oevals_from_extdata
  [2010-08-17 16:59:26,550] ERROR:web-services:[28]:     res = self.get_order_discount(cr, uid, res, data_record, context)
  [2010-08-17 16:59:26,550] ERROR:web-services:[29]:   File "/usr/src/openerp/openerp-server-5.0.12/bin/addons/magentoerpconnect_generic/sale.py", line 394, in get_order_discount
  [2010-08-17 16:59:26,550] ERROR:web-services:[30]:     discount_product_id = self.pool.get('product.product').search(cr, uid, [('default_code', '=', 'DISCOUNT MAGENTO')])[0]
  [2010-08-17 16:59:26,550] ERROR:web-services:[31]: IndexError: list index out of range

  I disabled this line in sale.py and it works of course without discount management
  #res = self.get_order_discount(cr, uid, res, data_record, context)

To manage notifications about this bug go to:
https://bugs.launchpad.net/magentoerpconnect/+bug/619289/+subscriptions