Openbravo Issue Tracking System - Retail Modules
View Issue Details
0035456Retail ModulesWeb POSpublic2017-03-08 19:462017-03-24 12:14
shuehner 
ranjith_qualiantech_com 
normalmajorhave not tried
closedfixed 
5
 
RR17Q2 
marvintm
No
0035456: Multiple duplicate requests to Complementary Products when adding product to ticket with remote data enabled.
When having complementary products feature and remote data preference activated.

Then when adding a product to a new empty ticket several requests to org.openbravo.retail.complementary.master.ComplementaryProducts are fired.

Those look like duplicate request and at most 1 should be done for a single product
i.e. in livebuilds pi_retail with modules
configure a product to have a complementary product
in webpos search search for that product configured in previous step
Add that product to a ticket and check i.e. chromium net panel to notice that several duplicate request are fired for the ComplementaryProduct servlet
Performance
related to feature request 0035501 new Retail Add Warning message to code which inside renderLine hook does either http requests or websql queries 
related to defect 0035520 closed ranjith_qualiantech_com Multiple duplicate requests to Complementary Products when loading a ticket 
Issue History
2017-03-08 19:46shuehnerNew Issue
2017-03-08 19:46shuehnerAssigned To => Retail
2017-03-08 19:46shuehnerTriggers an Emergency Pack => No
2017-03-08 19:46shuehnerTag Attached: Performance
2017-03-08 19:48shuehnerNote Added: 0094843
2017-03-09 09:04marvintmRegression date => 2017-03-30
2017-03-13 13:33maiteResolution time => 1490824800
2017-03-13 13:33maiteRegression date2017-03-30 =>
2017-03-13 19:51shuehnerRelationship addedrelated to 0035501
2017-03-14 15:59ranjith_qualiantech_comAssigned ToRetail => ranjith_qualiantech_com
2017-03-14 16:00ranjith_qualiantech_comStatusnew => scheduled
2017-03-15 10:26SandrahuguetRelationship addedrelated to 0035520
2017-03-15 12:42hgbotCheckin
2017-03-15 12:42hgbotNote Added: 0095026
2017-03-15 12:42hgbotStatusscheduled => resolved
2017-03-15 12:42hgbotResolutionopen => fixed
2017-03-15 12:42hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.complementary/rev/26cb6f846ed99c897ad7b94a89eeb8774d4ad484 [^]
2017-03-16 16:26marvintmNote Added: 0095329
2017-03-16 16:26marvintmStatusresolved => new
2017-03-16 16:26marvintmResolutionfixed => open
2017-03-17 07:48ranjith_qualiantech_comStatusnew => scheduled
2017-03-17 12:22hgbotCheckin
2017-03-17 12:22hgbotNote Added: 0095375
2017-03-17 12:22hgbotStatusscheduled => resolved
2017-03-17 12:22hgbotResolutionopen => fixed
2017-03-17 12:22hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.complementary/rev/26cb6f846ed99c897ad7b94a89eeb8774d4ad484 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.complementary/rev/6b33f0797d08d305197be81e364bc0fbb5949bb6 [^]
2017-03-24 12:14marvintmReview Assigned To => marvintm
2017-03-24 12:14marvintmStatusresolved => closed
2017-03-24 12:14marvintmFixed in Version => RR17Q2

Notes
(0094843)
shuehner   
2017-03-08 19:48   
Note: issue was found in pi-but-dev codeline with snapshot of 20170306 but is also reproducible in livebuilds. Fix should be tested in both codelines
(0095026)
hgbot   
2017-03-15 12:42   
Repository: erp/pmods/org.openbravo.retail.complementary
Changeset: 26cb6f846ed99c897ad7b94a89eeb8774d4ad484
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Wed Mar 15 17:06:10 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.complementary/rev/26cb6f846ed99c897ad7b94a89eeb8774d4ad484 [^]

Fixes issue 35456 : Complementary Product are checked in hook PostAddProductToOrder

* Complementary Product are checked in hook PostAddProductToOrder instead of hook RenderOrderLine, Since RenderOrderLine getting called whenever line attributes changes. this avoids multiple call to server in remote mode

---
M web/org.openbravo.retail.complementary/js/hooks/hookRenderOrderLine.js
---
(0095329)
marvintm   
2017-03-16 16:26   
The main idea behind the fix is correct, but this part can be further improved, because currently we are checking if the product has complementary products every time a new unit is added to the line, and this is not needed. So, the first time a new line is added to the ticket, the request for the complementary products should happen, but afterwards, if a line which already did the check is modified, the check should not be done anymore.
(0095375)
hgbot   
2017-03-17 12:22   
Repository: erp/pmods/org.openbravo.retail.complementary
Changeset: 6b33f0797d08d305197be81e364bc0fbb5949bb6
Author: Ranjith S R <ranjith <at> qualiantech.com>
Date: Fri Mar 17 16:51:46 2017 +0530
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.complementary/rev/6b33f0797d08d305197be81e364bc0fbb5949bb6 [^]

Fixes issue 35456 : Complementary Product should be checked for first time while adding product

* If Product quantity is increased, then Complementary Product should not be checked

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