Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018159Openbravo ERP02. Master data managementpublic2011-08-02 13:452012-06-15 13:41
adrianromero 
adrianromero 
urgentmajorrandom
closedfixed 
5
pi 
 
Core
No
0018159: When syncrhonizing a and processing orders at the same time orders are not properly imported
When launching at the same time the job that imports orders in I_ORDER and the process of orders imported, some orders are not properly processed and there is a difference in the total in sales reports in ERP and POS.

Probably the reason is that when starting the process of orders, it is taken part of one order that is currently syncrhonizing. Then the same order in POS will be splitted into two orders in ERP with two shipments and two invoices and the calculation of taxes and discounts may make this difference

When launching the processes at a different time, totals in ERP and POS are equal
Launch the import orders job and the process of orders several times at the same time.
Do not synchronize orders by line but by order. i.e. Syncrhonize all orders line of the same order in the same transaction in order to avoid orders to be splitted into two.
No tags attached.
blocks backport 0018158 closed adrianromero Openbravo ERP When syncrhonizing a and processing orders at the same time orders are not properly imported 
causes defect 0031170 closed vmromanos Modules The legacy module depends on a previous release of import data module 
Issue History
2011-08-02 13:45adrianromeroNew Issue
2011-08-02 13:45adrianromeroAssigned To => adrianromero
2011-08-02 13:45adrianromeroModules => Core
2011-08-02 13:45adrianromeroIssue generated from0018158
2011-08-02 13:45adrianromeroRelationship addedblocks 0018158
2011-08-02 13:46adrianromeroStatusnew => scheduled
2011-08-02 13:46adrianromerofix_in_branch => pi
2011-08-08 12:06hgbotCheckin
2011-08-08 12:06hgbotNote Added: 0039983
2011-08-08 12:06hgbotStatusscheduled => resolved
2011-08-08 12:06hgbotResolutionopen => fixed
2011-08-08 12:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/mods/org.openbravo.importdata/rev/78b2a5ce7e7238395b7e9e89259aa10dd9664ab8 [^]
2011-08-08 12:07hgbotCheckin
2011-08-08 12:07hgbotNote Added: 0039984
2011-08-08 12:07hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/mods/org.openbravo.importdata/rev/78b2a5ce7e7238395b7e9e89259aa10dd9664ab8 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.pos.sync/rev/61cf966eed5551ce6edb7c1271e4dcb3be67b5e6 [^]
2011-08-09 09:52adrianromeroNote Added: 0040023
2012-06-15 13:41guilleaerNote Added: 0049857
2012-06-15 13:41guilleaerStatusresolved => closed
2015-11-19 16:32vmromanosRelationship addedcauses 0031170

Notes
(0039983)
hgbot   
2011-08-08 12:06   
Repository: erp/mods/org.openbravo.importdata
Changeset: 78b2a5ce7e7238395b7e9e89259aa10dd9664ab8
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Aug 08 12:05:31 2011 +0200
URL: http://code.openbravo.com/erp/mods/org.openbravo.importdata/rev/78b2a5ce7e7238395b7e9e89259aa10dd9664ab8 [^]

Fixes issue 0018159: When syncrhonizing a and processing orders at the same time orders are not properly imported
It has been added a check that sets when all lines of an order have been synchronized

---
M src-db/database/model/tables/I_ORDER.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_ELEMENT.xml
M src-db/database/sourcedata/AD_MODULE.xml
M src/org/openbravo/erpCommon/ad_process/ImportOrder_data.xsql
---
(0039984)
hgbot   
2011-08-08 12:07   
Repository: erp/pmods/org.openbravo.pos.sync
Changeset: 61cf966eed5551ce6edb7c1271e4dcb3be67b5e6
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Aug 08 11:02:39 2011 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.pos.sync/rev/61cf966eed5551ce6edb7c1271e4dcb3be67b5e6 [^]

Fixes issue 0018159: When syncrhonizing a and processing orders at the same time orders are not properly imported
It has been added a check that sets when all lines of an order have been synchronized

---
M resources/ORDERS.ktr
M src-db/database/sourcedata/AD_MODULE.xml
M src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml
M src/org/openbravo/pos/sync/rest/UploadOrderProcess.java
---
(0040023)
adrianromero   
2011-08-09 09:52   
* Testing the issue

It must be verified first that a simple cycle of orders import can be done without any issue.

To test sepcifically the issue it must be tested that orders not fully synchronized are not taken into account when processing orders. To do this use the testing job https://code.openbravo.com/erp/pmods/org.openbravo.pos.sync/file/8601f2072228/resources/test_orders_2.ktr [^]

* Synchronize one line of one order of two lines. To do this indicate in the url generation step line_id = 0 and maxline_id = 1. This indicates that it is going to be synchronized a line of an order of two lines: 0 and 1

* Try to execute the import orders process and verify that no order is created.

* Synchronize the second line of the order : line_id = 1 and maxline_id = 1

* Try to execute the import orders process and verify that one order of two lines has been synchronized.

* Other areas affected

Only the import order process and synchronization process has been affected.
(0049857)
guilleaer   
2012-06-15 13:41   
Code reviewed and tested using the version 1.2.8 of module org.openbravo.pos.sync