Openbravo Issue Tracking System - Retail Modules
View Issue Details
0044420Retail ModulesWeb POSpublic2020-06-18 22:372020-06-26 15:24
lbressan 
ranjith_qualiantech_com 
highmajoralways
closedfixed 
5
RR19Q4 
piRR20Q3 
marvintm
RR19Q1
No
0044420: The modification of the lines in the hook OrderLoaderPreProcessHook does not take effect
The hook OrderLoaderPreProcessHook has been implemented, I have made a modification in the attributes of the lines and it does not take effect, because the orderLoader class does a new JSONArray to keep the lines of the order instead of performing aliasing.

the main flow affected is the generation of sales orders from the pos.

We found the issue / commit that introduces the change that affects the behavior of "OrderLoaderPreProcessHook" was:
https://issues.openbravo.com/view.php?id=39352 [^]
commit: 1e81317f98de8f93ade73734f15864d98e11473f
Steps to reproduce on ( standard environment strongly advised)?

1- implement the OrderLoaderPreProcessHook hook
2- make a modification in the attribute-value of the lines
3- see that the change does not appear since they are different objects

see example.png
use aliasing as it was before the above-mentioned commit:

JSONArray orderlines = jsonorder.getJSONArray("lines");
No tags attached.
png example.png (63,485) 2020-06-18 22:37
https://issues.openbravo.com/file_download.php?file_id=14654&type=bug
png
Issue History
2020-06-18 22:37lbressanNew Issue
2020-06-18 22:37lbressanAssigned To => Retail
2020-06-18 22:37lbressanFile Added: example.png
2020-06-18 22:37lbressanResolution time => 1593640800
2020-06-18 22:37lbressanRegression introduced in release => RR19Q1
2020-06-18 22:37lbressanTriggers an Emergency Pack => No
2020-06-18 22:38lbressanTarget VersionRR19Q4.4 => pi
2020-06-24 08:14ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2020-06-26 15:06hgbotCheckin
2020-06-26 15:06hgbotNote Added: 0121133
2020-06-26 15:07hgbotCheckin
2020-06-26 15:07hgbotNote Added: 0121134
2020-06-26 15:07hgbotStatusnew => resolved
2020-06-26 15:07hgbotResolutionopen => fixed
2020-06-26 15:07hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/233e6552a4b8ac178e91c6b6961b034ccd02c51a [^]
2020-06-26 15:24marvintmReview Assigned To => marvintm
2020-06-26 15:24marvintmStatusresolved => closed
2020-06-26 15:24marvintmFixed in Version => RR20Q3

Notes
(0121133)
hgbot   
2020-06-26 15:06   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: b12af6f18d4d7ebc5cb5e98e16f7d1f1e89491ab
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Jun 26 18:34:08 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/b12af6f18d4d7ebc5cb5e98e16f7d1f1e89491ab [^]

Related to issue-44420: JSON lines should not copied in OrderLoader

* JSON lines will be modified in hooks, so lines should not be copied
  because original jso should be saved in errors table if sync process failed

---
M src/org/openbravo/retail/posterminal/OrderLoader.java
---
(0121134)
hgbot   
2020-06-26 15:07   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: 233e6552a4b8ac178e91c6b6961b034ccd02c51a
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Jun 26 18:34:21 2020 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/233e6552a4b8ac178e91c6b6961b034ccd02c51a [^]

Fixed issue-44420: Copy of JSON should be used for DataSynchronizationProcess

* If any error occurs in the DataSynchronizationProcess,
  original json should be saved in errors table

---
M src/org/openbravo/mobile/core/process/DataSynchronizationProcess.java
---