Openbravo Issue Tracking System - Retail Modules
View Issue Details
0038676Retail ModulesWeb POSpublic2018-05-31 19:092018-08-03 08:03
marvintm 
ranjith_qualiantech_com 
normalmajoralways
closedfixed 
5
 
RR18Q3 
marvintm
No
0038676: Ticket completion should be executed fully inside the same database transaction, and currently that's not the case
The ticket completion process, which involves:
- updating the order record in the local database
- updating the cashup report information
- updating the document sequence in the local database

should be fully executed in the same database transaction. However, currently the process is broken into two different transactions, and this means that if the user closes the browser, or refreshes the page while the process is being executed, some part of it may be committed, while some other part is yet pending to be completed.
- Place a breakpoint in the following js line:

receipt.set('json', JSON.stringify(receipt.serializeToJSON()));

which is part of the mainReceiptCloseFunction.
- Complete a ticket in the WebPOS.
- After the flow stops in the breakpoint, refresh the WebPOS (F5)
- Notice that the data is not correct anymore.
- The second transaction(trx) should be removed.
- All code should use the initial transaction (tx).
- The OBPOS_PreSyncReceipt should receive this transaction.
- Current French certification modules should be changed to use this transaction which they will now receive in the hook.
No tags attached.
depends on backport 0038770RR18Q2.1 closed ranjith_qualiantech_com Ticket completion should be executed fully inside the same database transaction, and currently that's not the case 
related to defect 0038862 closed migueldejuana Ticket completion should be executed fully inside the same database transaction 
Issue History
2018-05-31 19:09marvintmNew Issue
2018-05-31 19:09marvintmAssigned To => Retail
2018-05-31 19:09marvintmTriggers an Emergency Pack => No
2018-05-31 19:10marvintmResolution time => 1529445600
2018-05-31 19:19marvintmAssigned ToRetail => ranjith_qualiantech_com
2018-06-01 07:15ranjith_qualiantech_comStatusnew => scheduled
2018-06-04 13:15hgbotCheckin
2018-06-04 13:15hgbotNote Added: 0104912
2018-06-04 13:15hgbotStatusscheduled => resolved
2018-06-04 13:15hgbotResolutionopen => fixed
2018-06-04 13:15hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/47ec4987197c0f3172353016e42ddc7406e260f4 [^]
2018-06-04 14:38hgbotCheckin
2018-06-04 14:38hgbotNote Added: 0104919
2018-06-04 14:38ranjith_qualiantech_comStatusresolved => new
2018-06-04 14:38ranjith_qualiantech_comResolutionfixed => open
2018-06-04 14:38ranjith_qualiantech_comStatusnew => scheduled
2018-06-08 07:39hgbotCheckin
2018-06-08 07:39hgbotNote Added: 0105022
2018-06-11 08:14ranjith_qualiantech_comStatusscheduled => resolved
2018-06-11 08:14ranjith_qualiantech_comResolutionopen => fixed
2018-06-15 14:44marvintmStatusresolved => new
2018-06-15 14:44marvintmResolutionfixed => open
2018-06-15 14:44marvintmStatusnew => scheduled
2018-06-15 14:44marvintmStatusscheduled => resolved
2018-06-15 14:44marvintmFixed in Version => RR18Q3
2018-06-15 14:44marvintmResolutionopen => fixed
2018-06-15 14:44marvintmReview Assigned To => marvintm
2018-06-15 14:44marvintmStatusresolved => closed
2018-06-19 14:28ranjith_qualiantech_comNote Added: 0105257
2018-06-19 14:28ranjith_qualiantech_comStatusclosed => new
2018-06-19 14:28ranjith_qualiantech_comResolutionfixed => open
2018-06-19 14:28ranjith_qualiantech_comFixed in VersionRR18Q3 =>
2018-06-19 14:28ranjith_qualiantech_comStatusnew => scheduled
2018-06-21 12:04hgbotCheckin
2018-06-21 12:04hgbotNote Added: 0105300
2018-06-21 12:05hgbotCheckin
2018-06-21 12:05hgbotNote Added: 0105301
2018-06-21 13:38hgbotCheckin
2018-06-21 13:38hgbotNote Added: 0105303
2018-06-26 10:12migueldejuanaAssigned Toranjith_qualiantech_com => migueldejuana
2018-06-26 12:54marvintmAssigned Tomigueldejuana => ranjith_qualiantech_com
2018-06-27 08:47hgbotCheckin
2018-06-27 08:47hgbotNote Added: 0105459
2018-06-27 08:47hgbotStatusscheduled => resolved
2018-06-27 08:47hgbotResolutionopen => fixed
2018-06-27 08:47hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/47ec4987197c0f3172353016e42ddc7406e260f4 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5de50a74a0d2f3ff03b07af7fc8efec6a4a4abb0 [^]
2018-06-29 09:23marvintmNote Added: 0105505
2018-06-29 09:23marvintmStatusresolved => closed
2018-06-29 09:23marvintmFixed in Version => RR18Q3
2018-06-29 09:25marvintmRelationship addedrelated to 0038862
2018-08-03 08:03hgbotCheckin
2018-08-03 08:03hgbotNote Added: 0106127

Notes
(0104912)
hgbot   
2018-06-04 13:15   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 47ec4987197c0f3172353016e42ddc7406e260f4
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Jun 04 16:44:29 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/47ec4987197c0f3172353016e42ddc7406e260f4 [^]

Fixed issue 38676 : Removed Additional Transaction before syncing receipt to backoffice

* Previously for PreSyncReceipt hook, Additional Transaction has been added before syncing receipt to backoffice.
  Now Additional Transaction is removed and transaction is passed as param in PreSyncReceipt hook

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---
(0104919)
hgbot   
2018-06-04 14:38   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 09680bdda4f5fe9a572be0deeac0d670123b924b
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Mon Jun 04 18:07:57 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/09680bdda4f5fe9a572be0deeac0d670123b924b [^]

Related to issue 38676 : PreSyncReceipt Transactions should be changed in dependent modules

Backed out changeset: 47ec4987197c

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---
(0105022)
hgbot   
2018-06-08 07:39   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: f7d2963fe467476e41261e614ba94611e1171681
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Jun 08 11:09:11 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/f7d2963fe467476e41261e614ba94611e1171681 [^]

Related to issue 38676 : Removed Additional Transaction before syncing receipt to backoffice

* Previously for PreSyncReceipt hook, Additional Transaction has been added before syncing receipt to backoffice.
  Now Additional Transaction is removed and transaction is passed as param in PreSyncReceipt hook

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---
(0105257)
ranjith_qualiantech_com   
2018-06-19 14:28   
Changes are not correct. args.transaction should be used instead of args.tx.
(0105300)
hgbot   
2018-06-21 12:04   
Repository: erp/pmods/org.openbravo.retail.complementary
Changeset: 041a9e93477982a512437d92c29e4a83575a1364
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Jun 21 15:34:36 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.complementary/rev/041a9e93477982a512437d92c29e4a83575a1364 [^]

Related to issue 38676 : Added currentTransaction to OBPOS_PostAddProductToOrder hook

* If currentTransaction is presents in product options, it should be used to fetch the Complementary Products

---
M web/org.openbravo.retail.complementary/js/hooks/hookRenderOrderLine.js
---
(0105301)
hgbot   
2018-06-21 12:05   
Repository: erp/pmods/org.openbravo.certification.france
Changeset: 187e515a0dac98f77debfaae8b9f5ebc2c350031
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Jun 21 15:35:24 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.certification.france/rev/187e515a0dac98f77debfaae8b9f5ebc2c350031 [^]

Related to issue 38676 : Added PreSyncReceipt hook transaction

* Set "preventOrderSave" to true, for not to save the cancel receipt in local db
* Added PreSyncReceipt hook transaction to OB.Dal methods

---
M web/org.openbravo.certification.france/js/ticket/preSyncReceiptHook.js
---
(0105303)
hgbot   
2018-06-21 13:38   
Repository: erp/pmods/org.openbravo.certification.france
Changeset: 1254908b83bccfbe64f1d83e6268a362afea0edd
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Jun 21 17:08:36 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.certification.france/rev/1254908b83bccfbe64f1d83e6268a362afea0edd [^]

Related to issue 38676 : Added PreSyncReceipt hook transaction

Tests were failed in try-retail
Backed out changeset: 187e515a0dac

---
M web/org.openbravo.certification.france/js/ticket/preSyncReceiptHook.js
---
(0105459)
hgbot   
2018-06-27 08:47   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 5de50a74a0d2f3ff03b07af7fc8efec6a4a4abb0
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Wed Jun 27 12:16:33 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/5de50a74a0d2f3ff03b07af7fc8efec6a4a4abb0 [^]

Fixed issue 38676 : PreSyncReceipt hook should be called when the transaction completes

* Hook "OBPOS_PreSyncReceipt" should be called when receipt save transaction completes
* In Hook Callback, receipt must be saved again and sync process should be called

---
M web/org.openbravo.retail.posterminal/js/data/dataordersave.js
---
(0105505)
marvintm   
2018-06-29 09:23   
With the latest changes, everything happens in the same transaction except for the last save at the end. This part can be improved, but the current solution is enough for now.
(0106127)
hgbot   
2018-08-03 08:03   
Repository: erp/pmods/org.openbravo.retail.complementary
Changeset: fb8c4bba5876c4338734de333865ead457c1bcbd
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Thu Aug 02 16:03:02 2018 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.complementary/rev/fb8c4bba5876c4338734de333865ead457c1bcbd [^]

Related to issue 38676 : Backed out changeset: 041a9e934779

---
M web/org.openbravo.retail.complementary/js/hooks/hookRenderOrderLine.js
---