Import orders repeat over and over

Bug #709514 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

When we import orders from our magento store it will import say 20 and after it has those 20 start from the beginning and download the others over and over again until I manually shut down the server. Each time it re-downloads an order the order lines double and the invoice goes to 50% then 25% and so on. Some orders that are doubled to not do this. Sometimes it gets stuck and repeatedly downloads orders over and over again and we cant get new order data.

Revision history for this message
Kyle Waid (midwest) wrote :
Download full text (10.0 KiB)

Here is a server log where you can see this happening. I checked our magento database and the orders are in sequential order and the sale.py file specifies an int so that should not be an issue. It seems like the problem went away and now its back in full force and we cant get it fixed.

[2011-01-28 16:13:04,107][dev] INFO:ext synchro:Updated in OpenERP res.partner.address from External Ref with external_id 45095 and OpenERP id 1579 successfully
[2011-01-28 16:13:05,770][dev] INFO:ext synchro:Updated in OpenERP sale.order from External Ref with external_id 1100502 and OpenERP id 24 successfully
[2011-01-28 16:13:06,304][dev] INFO:ext synchro:Updated in OpenERP res.partner.address from External Ref with external_id mag_order1881321 and OpenERP id 1580 successfully
[2011-01-28 16:13:06,342][dev] INFO:ext synchro:Updated in OpenERP res.partner.address from External Ref with external_id mag_order1881322 and OpenERP id 1581 successfully
[2011-01-28 16:13:06,982][dev] INFO:ext synchro:Updated in OpenERP sale.order from External Ref with external_id 1100503 and OpenERP id 25 successfully
[2011-01-28 16:13:07,439][dev] INFO:ext synchro:Updated in OpenERP res.partner.address from External Ref with external_id mag_order1881331 and OpenERP id 1582 successfully
[2011-01-28 16:13:07,469][dev] INFO:ext synchro:Updated in OpenERP res.partner.address from External Ref with external_id mag_order1881332 and OpenERP id 1583 successfully
[2011-01-28 16:13:07,784][dev] INFO:ext synchro:Updated in OpenERP sale.order from External Ref with external_id 1100504 and OpenERP id 26 successfully
[2011-01-28 16:13:08,416][dev] INFO:ext synchro:Updated in OpenERP res.partner.address from External Ref with external_id 11982 and OpenERP id 1584 successfully
[2011-01-28 16:13:08,450][dev] INFO:ext synchro:Updated in OpenERP res.partner.address from External Ref with external_id 11982 and OpenERP id 1584 successfully
[2011-01-28 16:13:09,464][dev] INFO:ext synchro:Updated in OpenERP sale.order from External Ref with external_id 1100505 and OpenERP id 27 successfully
[2011-01-28 16:13:10,189][dev] INFO:ext synchro:Updated in OpenERP res.partner.address from External Ref with external_id mag_order1881341 and OpenERP id 1585 successfully
[2011-01-28 16:13:10,221][dev] INFO:ext synchro:Updated in OpenERP res.partner.address from External Ref with external_id mag_order1881342 and OpenERP id 1586 successfully
[2011-01-28 16:13:11,993][dev] INFO:ext synchro:Updated in OpenERP sale.order from External Ref with external_id 1100506 and OpenERP id 28 successfully
[2011-01-28 16:13:12,565][dev] INFO:ext synchro:Updated in OpenERP res.partner.address from External Ref with external_id 39724 and OpenERP id 1587 successfully
[2011-01-28 16:13:12,601][dev] INFO:ext synchro:Updated in OpenERP res.partner.address from External Ref with external_id 39724 and OpenERP id 1587 successfully
[2011-01-28 16:13:13,509][dev] INFO:ext synchro:Updated in OpenERP sale.order from External Ref with external_id 1100507 and OpenERP id 29 successfully
[2011-01-28 16:13:13,992][dev] INFO:ext synchro:Updated in OpenERP res.partner.address from External Ref with external_id 49337 and OpenERP id 1588 successfully
[...

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

I know whats causing the repeated download of orders. It is this lines here

else:
                    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}

Removing them does not cause the error

Revision history for this message
photo7 (photo7) wrote :

Hi Kyle,
Take a look in bug https://bugs.launchpad.net/magentoerpconnect/+bug/683669 - it is talking about same piece of code. It may help or may not...
Dmitry

Kyle Waid (midwest)
Changed in magentoerpconnect:
status: New → 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.