← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 683669] Re: openerp6: SALE_ORDER_MAPPING is not defined

 

This is not an error or a bug. You have to set the mapping yourself. In
that file at the beginning of the statement you see a #. This means it
is to not be used. You have to remove the # then go to your magento
panel. Take your very first order and enter that number in the first
field 10000001 and then 3000001 you get it. Then it will work

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

Title:
  openerp6: SALE_ORDER_MAPPING is not defined

Status in Magento Open ERP Connector:
  New

Bug description:
  ==ERRROR==
 File "/home/resteve/openerp-server6/bin/addons/magentoerpconnect/sale.py", line 130, in import_shop_orders
    if SALE_ORDER_MAPPING.get(magento_storeview_id, False):
NameError: global name 'SALE_ORDER_MAPPING' is not defined

==Documentation==
sale.py are comment this line (line 35)

#SALE_ORDER_MAPPING = {1: 100000001, 3: 300000001, 2: 200000001} #Usefull for first import if there is a lot of sale orders! IMPORTANT : Note that this is template, we just let it here for example, working with magento's example data. 

At line 130 get this variable

                    if SALE_ORDER_MAPPING.get(magento_storeview_id, False):
                        ids_or_filter[0]['increment_id'] = {'lt': SALE_ORDER_MAPPING[magento_storeview_id] + SALE_ORDER_IMPORT_STEP}





Follow ups

References