Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018158Openbravo ERP02. Master data managementpublic2011-08-02 13:432011-08-23 13:13
adrianromero 
adrianromero 
urgentmajorrandom
closedfixed 
5
2.50MP31 
2.50MP33 
Core
No
0018158: 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.
depends on defect 0018159 closed adrianromero When syncrhonizing a and processing orders at the same time orders are not properly imported 
related to backport 00182682.50MP33 closed adrianromero When syncrhonizing a and processing orders at the same time orders are not properly imported 
Issue History
2011-08-02 13:43adrianromeroNew Issue
2011-08-02 13:43adrianromeroAssigned To => adrianromero
2011-08-02 13:43adrianromeroModules => Core
2011-08-02 13:43adrianromeroIssue generated from0018099
2011-08-02 13:44adrianromeroStatusnew => scheduled
2011-08-02 13:44adrianromerofix_in_branch => pi
2011-08-02 13:45adrianromeroIssue cloned0018159
2011-08-02 13:45adrianromeroRelationship addeddepends on 0018159
2011-08-02 13:47adrianromeroTarget Version3.0MP3 =>
2011-08-02 13:47adrianromerofix_in_branchpi =>
2011-08-08 14:48hgbotCheckin
2011-08-08 14:48hgbotNote Added: 0040002
2011-08-08 14:48hgbotStatusscheduled => resolved
2011-08-08 14:48hgbotResolutionopen => fixed
2011-08-08 14:48hgbotFixed in SCM revision => http://code.openbravo.com/erp/stable/2.50/rev/3566ab13442fd4b1672de48c246f209831885641 [^]
2011-08-08 15:21hgbotCheckin
2011-08-08 15:21hgbotNote Added: 0040004
2011-08-08 15:21hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/stable/2.50/rev/3566ab13442fd4b1672de48c246f209831885641 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.pos.sync/rev/48e207d5d25d732a59420a302c03c3ecbc053c70 [^]
2011-08-09 09:54adrianromeroNote Added: 0040024
2011-08-12 10:32adrianromeroIssue cloned0018268
2011-08-12 10:32adrianromeroRelationship addedrelated to 0018268
2011-08-23 13:13jonalegriaesarteNote Added: 0040438
2011-08-23 13:13jonalegriaesarteStatusresolved => closed
2011-08-23 13:13jonalegriaesarteFixed in Version => 2.50MP33

Notes
(0040002)
hgbot   
2011-08-08 14:48   
Repository: erp/stable/2.50
Changeset: 3566ab13442fd4b1672de48c246f209831885641
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Aug 08 14:32:35 2011 +0200
URL: http://code.openbravo.com/erp/stable/2.50/rev/3566ab13442fd4b1672de48c246f209831885641 [^]

Fixes issue 0018158: 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/org/openbravo/erpCommon/ad_process/ImportOrder_data.xsql
---
(0040004)
hgbot   
2011-08-08 15:21   
Repository: erp/pmods/org.openbravo.pos.sync
Changeset: 48e207d5d25d732a59420a302c03c3ecbc053c70
Author: Adrián Romero <adrianromero <at> openbravo.com>
Date: Mon Aug 08 13:44:38 2011 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.pos.sync/rev/48e207d5d25d732a59420a302c03c3ecbc053c70 [^]

Fixes issue 0018158: 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/org/openbravo/pos/sync/rest/UploadOrderProcess.java
---
(0040024)
adrianromero   
2011-08-09 09:54   
* 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/1cf76cbf04fe/resources/test_orders_2.50.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.
(0040438)
jonalegriaesarte   
2011-08-23 13:13   
Verified