Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040045Retail ModulesSelfcheckoutpublic2019-01-28 13:272019-02-04 09:11
malsasua 
javierRodriguez 
immediatemajoralways
closedfixed 
5
 
RR19Q2 
marvintm
Gold
7709
https://code.openbravo.com/erp/pmods/org.openbravo.retail.selfcheckout/rev/9ed7b25e3080 [^]
No
0040045: Last panel is overwrite by right Footer panel
The last panel added to OB.SCO.APP.PANELRIGHT array is overwritten by right footer panel
In execution, in Console Developers Tools, add a breakpoint in code:
....
       // Create all Panel Right components
        for (prop in OB.SCO.APP.PANELRIGHT) {
            if (OB.SCO.APP.PANELRIGHT.hasOwnProperty(prop)) {
                component = this.rightPanel.createComponent({
                    kind: OB.SCO.APP.PANELRIGHT[prop],
                    name: prop,
                    executeEvent: this.executeEvent.bind(this),
                    showLoading: this.showLoading.bind(this),
                    hideLoading: this.hideLoading.bind(this),
                    state: this.state,
                    receipt: this.receipt,
                    receiptClone: this.receiptClone
                }).render();
                component.hide();
                this.rightComponents[prop] = component;
            }
        }

        component = this.rightPanel.createComponent({
            kind: 'OB.SCO.rightFooter',
            name: 'rightFooter'
        }).render();
        component.show();
        this.rightComponents[prop] = component;
...

The value of prop is the last panel added (in livebuilds is WeChatPanel), and it is overwritten by rightFooter component
No tags attached.
diff rightfooter.diff (2,226) 2019-01-30 09:33
https://issues.openbravo.com/file_download.php?file_id=12567&type=bug
Issue History
2019-01-28 13:27malsasuaNew Issue
2019-01-28 13:27malsasuaAssigned To => Retail
2019-01-28 13:27malsasuaOBNetwork customer => Gold
2019-01-28 13:27malsasuaSupport ticket => 7709
2019-01-28 13:27malsasuaResolution time => 1549062000
2019-01-28 13:27malsasuaTriggers an Emergency Pack => No
2019-01-28 17:28adrianromeroRegression introduced by commit => https://code.openbravo.com/erp/pmods/org.openbravo.retail.selfcheckout/rev/9ed7b25e3080 [^]
2019-01-28 17:52adrianromeroNote Added: 0109281
2019-01-28 17:52adrianromeroNote Edited: 0109281bug_revision_view_page.php?bugnote_id=0109281#r18203
2019-01-28 18:30adrianromeroIssue Monitored: adrianromero
2019-01-29 09:30hgbotCheckin
2019-01-29 09:30hgbotNote Added: 0109293
2019-01-29 09:30hgbotStatusnew => resolved
2019-01-29 09:30hgbotResolutionopen => fixed
2019-01-29 09:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.selfcheckout/rev/a6a9a4340385191854c0ca499d412e707a8a1338 [^]
2019-01-29 17:33marvintmAssigned ToRetail => javierRodriguez
2019-01-30 09:32adrianromeroNote Added: 0109318
2019-01-30 09:33adrianromeroFile Added: rightfooter.diff
2019-02-01 10:44hgbotCheckin
2019-02-01 10:44hgbotNote Added: 0109420
2019-02-04 09:11marvintmReview Assigned To => marvintm
2019-02-04 09:11marvintmStatusresolved => closed
2019-02-04 09:11marvintmFixed in Version => RR19Q2

Notes
(0109281)
adrianromero   
2019-01-28 17:52   
The following line is not needed
https://code.openbravo.com/erp/pmods/org.openbravo.retail.selfcheckout/file/9ed7b25e3080/web/org.openbravo.retail.selfcheckout/source/components/applicationEngine.js#l92 [^]

In fact, from the project structure point of view, the creation of the component OB.SCO.rightFooter should go in the file scoView.js, in the component field definition or in the init method https://code.openbravo.com/erp/pmods/org.openbravo.retail.selfcheckout/file/tip/web/org.openbravo.retail.selfcheckout/source/view/scoView.js [^] . But not in the applicationEngine component.

(0109293)
hgbot   
2019-01-29 09:30   
Repository: erp/pmods/org.openbravo.retail.selfcheckout
Changeset: a6a9a4340385191854c0ca499d412e707a8a1338
Author: Javier Rodriguez <javier.rodriguez <at> openbravo.com>
Date: Tue Jan 29 08:53:47 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.selfcheckout/rev/a6a9a4340385191854c0ca499d412e707a8a1338 [^]

Fixed issue 40045: Last panel is overwrite by right Footer panel

When rightFooter component was created an included in the right panel, it was overwriting the last component.
In DKT, this las component was termsAndConditionsComponent.

---
M web/org.openbravo.retail.selfcheckout/source/components/applicationEngine.js
---
(0109318)
adrianromero   
2019-01-30 09:32   
As explained in my previous comment it is not needed too add de created component to rightComponents in the applicationEngine, and it makes sense to go outside in scoView as the footer it is not part of the application engine. It is just an static component. Please consider the attached diff that contains also other improvements and removes dead code.
(0109420)
hgbot   
2019-02-01 10:44   
Repository: erp/pmods/org.openbravo.retail.selfcheckout
Changeset: bf20e009b32e4adbb3550b6302ab9dd61195dede
Author: Javier Rodriguez <javier.rodriguez <at> openbravo.com>
Date: Fri Feb 01 10:42:28 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.selfcheckout/rev/bf20e009b32e4adbb3550b6302ab9dd61195dede [^]

Related to issue 40045: Last panel is overwrite by right Footer panel

---
M src/org/openbravo/retail/selfcheckout/SCOComponentProvider.java
M web/org.openbravo.retail.selfcheckout/source/components/applicationEngine.js
M web/org.openbravo.retail.selfcheckout/source/panels/rightFooterPanel.js
---