Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0027431
TypeCategorySeverityReproducibilityDate SubmittedLast Update
backport[Retail Modules] Web POScriticalalways2014-08-23 12:392015-06-10 20:07
ReporterOrekariaView Statuspublic 
Assigned ToRetail 
PrioritynormalResolutionsuspendedFixed in VersionRR15Q3
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned ToOrekaria
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0027431: Sometimes the business partner is empty when the WebPOS loads

DescriptionSometimes the business partner is empty when the WebPOS loads. This seems to happen only the first time the WebPOS loads.

Reproduced in Q4:

When this happens:

The WebPOS is inoperative:
    - fails to add some products whilst others can be added
    - some added products can be deleted whilst others can't
    - the total to pay is always '0.00'
    - the sale can't be finished
    - the receipt can't be deleted


This console errors are shown:

    - when trying to delete a product from the receipt
        Uncaught TypeError: Cannot read property 'get' of null (cause: this.get('bp') === null)
    
        this.receipt.calculateTaxes = function (callback) {
            var me = this,
                bpTaxCategory = this.get('bp').get('taxCategory'),

    - when trying to delete the receipt:
        Uncaught TypeError: Cannot read property 'constructor' of null (cause: model.constructor === null)

            OB.Dal.remove = function (model, success, error) {
                var modelDefinition = OB.Model[model.constructor.prototype.modelName],

        Uncaught TypeError: Cannot read property 'get' of undefined

            if (OB.POS.modelterminal.hasPermission('OBPOS_receipt.invoice')) {
                if (OB.POS.modelterminal.hasPermission('OBPOS_retail.restricttaxidinvoice') && !OB.POS.modelterminal.get('businessPartner').get('taxID')) {

    - when trying to create a new receipt:
        Uncaught TypeError: Cannot read property 'get' of undefined (cause: OB.POS.modelterminal.get('businessPartner') === undefined)

            if (OB.POS.modelterminal.hasPermission('OBPOS_receipt.invoice')) {
                if (OB.POS.modelterminal.hasPermission('OBPOS_retail.restricttaxidinvoice') && !OB.POS.modelterminal.get('businessPartner').get('taxID')) {


Console trace when loading the WebPOS:

    Adding master entry to Application Cache with manifest http://localhost:8080/openbravo/org.openbravo.client.kernel/OBPOS_Main/AppCacheManifest?_appName=WebPOS [^] localhost:8080/openbravo/web/org.openbravo.retail.posterminal/?terminal=VBS-1:1
    Application Cache NoUpdate event localhost:8080/openbravo/web/org.openbravo.retail.posterminal/?terminal=VBS-1:1
    'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead.
    'webkitCancelRequestAnimationFrame' is vendor-specific. Please use the standard 'cancelAnimationFrame' instead.
    OB.UTIL.Debug 0.1 is available
    Deprecated (since RR14Q4.0): OB.UTILS namespace has been removed
    TestRegistry 1.0.2 is available
    Failed to load resource: the server responded with a status of 401 (Unauthorized) http://localhost:8080/openbravo/org.openbravo.mobile.core.service.jsonrest/ [^]…value%22:true,%22type%22:%22boolean%22%7D%7D,%22appName%22:%22WebPOS%22%7D
    Starting to load properties based on properties loaders
    Array[12]
     http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:2964: [^]
    Loading... terminal http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:17079:1 [^]
    Loading... context http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:17142:1 [^]
    loading... payments http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:17159:1 [^]
    loading... cashMgmtDepositEvents
    loading... cashMgmtDropEvents
    loading... businesspartner http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:17202:1 [^]
    loading... location http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:17217:1 [^]
    loading... pricelist http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:17231:1 [^]
    loading... warehouses http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:17245:1 [^]
    loading... writableOrganizations http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:17262:1 [^]
    loading... pricelistversion http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:17276:1 [^]
    loading... currency http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:17294:1 [^]
    "context" "is/are loaded" "http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:2931:" [^]
    "writableOrganizations" "is/are loaded" "http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:2931:" [^]
    "location" "is/are loaded" "http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:2931:" [^]
    "pricelist" "is/are loaded" "http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:2931:" [^]
    "businesspartner" "is/are loaded" "http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:2931:" [^]
    "warehouses" "is/are loaded" "http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:2931:" [^]
    "cashMgmtDepositEvents" "is/are loaded" "http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:2931:" [^]
    "cashMgmtDropEvents" "is/are loaded" "http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:2931:" [^]
    "pricelistversion" "is/are loaded" "http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:2931:" [^]
    "currency" "is/are loaded" "http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:2931:" [^]
    "payments" "is/are loaded" "http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:2931:" [^]
    "terminal" "is/are loaded" "http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:2931:" [^]
    DiscountFilterBusinessPartner is/are loaded http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:1952:1 [^]
    DiscountFilterBusinessPartnerGroup is/are loaded http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:1952:1 [^]
    DiscountFilterProductCategory is/are loaded http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:1952:1 [^]
    DiscountFilterProduct is/are loaded http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:1952:1 [^]
    TaxRate is/are loaded http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:1952:1 [^]
    Discount is/are loaded http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:1952:1 [^]
    DiscountFilterRole is/are loaded http://localhost:8080/openbravo/web/js/gen/5c49b50dd84da3791191799b11c2d010.js:1952:1 [^]
    properties has been loaded successfully:
        appDisplayName: "Openbravo Mobile"
        appModuleId: "FF808181326CC34901326D53DBCF0018"
        appName: "WebPOS"
        applicationFormatUrl: "../../org.openbravo.client.kernel/OBPOS_Main/ApplicationFormats"
        businesspartner: "ABD91C9D3BC94175B876FBBE9CACA008"
        cashMgmtDepositEvents: Array[1]
        cashMgmtDropEvents: Array[2]
        connectedToERP: true
        context: Object
        currency: Object
        dataSyncModels: Array[5]
        documentsequence: 84
        isDisableDiscount: false
        isLoggingIn: false
        lastPaneShown: "scan"
        localDB: Object
        location: Object
        logConfiguration: Object
        logDBStmtThreshold: 1000
        logDBTrxThreshold: 300
        loggedOffline: false
        loginHandlerUrl: "../../org.openbravo.retail.posterminal/POSLoginHandler"
        loginUtilsParams: Object
        loginUtilsUrl: "../../org.openbravo.retail.posterminal.service.loginutils"
        logoutUrlParams: Object
        orgUserId: "3073EDF96A3C42CC86C7069E379522D2"
        paymentcash: "OBPOS_payment.cash"
        payments: Array[4]
        permissions: Object
        pricelist: Object
        pricelistversion: Object
        profileOptions: Object
        propertiesLoaders: Array[12]
        quotationDocumentSequence: 3
        session: "0BB285BA40B287D5CD410FAB1ED51779"
        supportsOffline: true
        terminal: Object
        terminalName: "VBS-1"
        useBarcode: false
        warehouses: Array[2]
        windows: null
        writableOrganizations: Array[2]
        __proto__: Object
     
    The 'x-webkit-speech' input field attribute is deprecated. Please use the JavaScript API instead.
    Total time to log in: 4449



chrome://appcache-internals [^]


Manifest: http://localhost:8080/openbravo/org.openbravo.client.kernel/OBPOS_Main/AppCacheManifest?_appName=WebPOS [^]

Remove View Entries
Size: 9.5 kB
Creation Time: Thursday, August 28, 2014 20:10:11 PM
Last Update Time: Friday, August 29, 2014 8:54:23 AM
Last Access Time: Friday, August 29, 2014 9:10:43 AM

Flags URL Size (headers and data)
Manifest, http://localhost:8080/openbravo/org.openbravo.client.kernel/OBPOS_Main/AppCacheManifest?_appName=WebPOS [^] 316 B
Master, http://localhost:8080/openbravo/web/org.openbravo.retail.posterminal/?terminal=CMS-1 [^] 4.6 kB
Master, http://localhost:8080/openbravo/web/org.openbravo.retail.posterminal/?terminal=VBS-1 [^] 4.6 kB


TestRegistry.registry('payment_paymentTabContent').enyoObject.model.get('order'):

    child {attributes: Object, _escapedAttributes: Object, cid: "c31", changed: Object, _silent: Object…}
    _callbacks: Object
    _changing: false
    _escapedAttributes: Object
    _pending: Object
    _previousAttributes: Object
    _silent: Object
    attributes: Object
    approvals: Array[0]
    bp: null
    change: 0
    client: null
    createdBy: null
    currency: null
    currency$_identifier: null
    description: ""
    documentNo: ""
    documentType: null
    generateInvoice: false
    gross: 0
    hasbeenpaid: "N"
    id: null
    isEditable: true
    isLayaway: false
    isPaid: false
    isQuotation: false
    isbeingprocessed: "N"
    lines: child
    net: 0
    oldId: null
    openDrawer: false
    orderDate: Fri Aug 29 2014 08:54:30 GMT+0200 (CEST)
    orderType: 0
    organization: null
    paidOnCredit: false
    payment: 0
    payments: child
    posTerminal: null
    posTerminal$_identifier: null
    priceIncludesTax: null
    priceList: null
    print: true
    qty: 0
    salesRepresentative: null
    salesRepresentative$_identifier: null
    sendEmail: false
    session: null
    taxes: null
    totalamount: null
    undo: null
    updatedBy: null
    warehouse: null
    __proto__: Object
    calculateTaxes: function (callback) {
    changed: Object
    cid: "c31"


Installed modules:

    org.openbravo.advpaymentmngt/
    org.openbravo.agingbalance/
    org.openbravo.base.weld/
    org.openbravo.client.application/
    org.openbravo.client.htmlwidget/
    org.openbravo.client.kernel/
    org.openbravo.client.myob/
    org.openbravo.client.querylist/
    org.openbravo.client.widgets/
    org.openbravo.financial.cashflowforecast/
    org.openbravo.financial.paymentreport/
    org.openbravo.mobile.core/
    org.openbravo.mobile.warehouse/
    org.openbravo.reports.ordersawaitingdelivery/
    org.openbravo.retail.config/
    org.openbravo.retail.copystore/ (!)
    org.openbravo.retail.discounts/
    org.openbravo.retail.giftcards/
    org.openbravo.retail.pack/
    org.openbravo.retail.poshwmanager/
    org.openbravo.retail.posterminal/
    org.openbravo.retail.returns/
    org.openbravo.retail.sampledata/
    org.openbravo.service.datasource/
    org.openbravo.service.integration.google/
    org.openbravo.service.integration.openid/
    org.openbravo.service.json/
    org.openbravo.userinterface.selector/
    org.openbravo.userinterface.skin.250to300Comp/
    org.openbravo.userinterface.smartclient/
    org.openbravo.utility.multiplebpselector/
    org.openbravo.v3/
    org.openbravo.v3.datasets/
    org.openbravo.v3.framework/
Steps To ReproduceHow to reproduce it:
Log into the WebPOS
Select the business partner 'Arturo Montoro'
In the menu, select 'Invoice this receipt'
Refresh the web page
Verify that the attached screenshot is shown


Deprecated:

If one can reproduce this issue, please backup the Web SQL database before fixing it (clear cache seems to do the trick)

Try this:

Downgrade core, posterminal and giftcards to Q2.2
install.source
clear cache
Load the WebPOS
Log in

Upgrade to Q4
install.source
Do not clear cache
Load the WebPOS
Log in


Or this:

Install copyStore module and its dependencies
Copy the VBS store into another one
Load the WebPOS
Log in as VallBlanca

Proposed SolutionIn a terminal suffering this issue:

Remove chrome://appcache-internals/ [^]
Reload the WebPOS
Verify that this action does not fix the issue

Clear the cache
Reload the WebPOS
Verify that the WebPOS is working again
TagsNo tags attached.
Attached Filespatch file icon Issue 27431: The business partner is required to pay a receipt.patch [^] (2,217 bytes) 2014-08-27 22:55 [Show Content]
png file icon businessPartnerNotShown.png [^] (120,465 bytes) 2014-08-29 08:57


? file icon 5c49b50dd84da3791191799b11c2d010.js [^] (1,467,545 bytes) 2014-08-29 09:15

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0027808RR14Q4 closedmigueldejuana At webpos, when i login both Business partner and Business partner address details shown as blank and also warning message appea 
depends on feature request 0027267RR14Q4 closedOrekaria Stabilization: Core async calls should be watched by the SynchronizationHelper 
depends on feature request 0026894RR14Q4 closedOrekaria Stabilization: Improve the synchronization management 
depends on defect 0026740RR14Q3 closedmalsasua Disable the pay button until the discounts have been applied 
depends on defect 0027268RR14Q4 closedOrekaria Stabilization: Improve the enabling/disabling of the pay button 
depends on feature request 0027505 newRetail Support: Backup/Restore of the browser's WebSQL database 
depends on defect 0027413 newRetail Stabilization: It should never ever be necessary to clear cache. 
depends on defect 0027506RR14Q4 closedOrekaria Stabilization: The 'pay' button should not be enabled if the order can't be payed 
related to feature request 0027526RR14Q4 closedOrekaria Tests: Fix the Business Partner modal to support ScrollableTable test functions 
related to defect 0028428RR15Q3 closedaaroncalero Improve master data loading of WebPOS 
Not all the children of this issue are yet resolved or closed.

-  Notes
(0069704)
dmitry_mezentsev (developer)
2014-08-25 11:35

As for me the real issue here is that there is an option to create a ticket without a BP. It should not be possible at all (similar like it is not possible in the backoffice). And the issue is related with 27228.
(0069715)
Orekaria (administrator)
2014-08-25 16:38
edited on: 2014-08-25 17:10

The issue is fixed in Q4 with the fix 27267 and its dependent issues (26894: new SynchronizationHelper)

I found that it happens in slow/unstable networks. The models are loaded slowly but the WebPOS is operative

The backport of the fix implies several files and changes as it is now

(0069716)
dmitry_mezentsev (developer)
2014-08-25 16:47

Can we think on some very "light" solution till we have the proper fix to avoid this case from happening?
(0069818)
Orekaria (administrator)
2014-08-27 22:57

Attached the patch. Should not be applied on Q4 and later
(0070815)
adrianromero (manager)
2014-10-08 14:28

Right now in a Q3 instance we are reproducing this issue consistently. It is not possible to operate with the POS because of this problem. It is an amazon instance with a lot of data. The patch attached does not help.

Problem is located in:
org.openbravo.retail.posterminal/js/pointofsale/model/pointofsale-model.js
in the line:
var partnerAddressId = OB.MobileApp.model.get('terminal').partnerAddress,

And the error is raised because OB.MobileApp.model.get('terminal') is null...
(0078198)
Orekaria (administrator)
2015-06-10 20:07

This issue is rejected
The improvements introduced in RR15Q3 should fix the issue
If the issue is reproduced again, please create another issue with updated 'Steps to reproduce'
(0078199)
Orekaria (administrator)
2015-06-10 20:07

This issue is rejected
The improvements introduced in RR15Q3 should fix the issue
If the issue is reproduced again, please create another issue with updated 'Steps to reproduce'

- Issue History
Date Modified Username Field Change
2014-08-23 12:39 Orekaria New Issue
2014-08-23 12:39 Orekaria Assigned To => Orekaria
2014-08-23 12:39 Orekaria Triggers an Emergency Pack => No
2014-08-23 12:40 Orekaria Relationship added blocks 0027329
2014-08-23 12:44 Orekaria Description Updated View Revisions
2014-08-23 12:44 Orekaria Steps to Reproduce Updated View Revisions
2014-08-23 12:45 Orekaria File Added: CashUp_18.JPG
2014-08-23 12:46 Orekaria Steps to Reproduce Updated View Revisions
2014-08-23 14:44 Orekaria Description Updated View Revisions
2014-08-23 14:44 Orekaria Steps to Reproduce Updated View Revisions
2014-08-23 14:54 Orekaria Assigned To Orekaria => marvintm
2014-08-23 14:54 Orekaria Summary Stabilization: If a ticket is created with a null business partner, the user is unable to make the cashup => If a ticket is created with a null business partner, the user is unable to make the cashup
2014-08-23 15:22 Orekaria Proposed Solution updated
2014-08-23 15:25 Orekaria Relationship deleted blocks 0027329
2014-08-25 11:35 dmitry_mezentsev Note Added: 0069704
2014-08-25 11:36 dmitry_mezentsev Relationship added related to 0027228
2014-08-25 14:20 jonalegriaesarte Resolution time => 1409004000
2014-08-25 15:42 Orekaria Relationship added depends on 0027267
2014-08-25 16:05 jecharri Issue Monitored: jecharri
2014-08-25 16:38 Orekaria Note Added: 0069715
2014-08-25 16:47 dmitry_mezentsev Note Added: 0069716
2014-08-25 17:10 Orekaria Note Edited: 0069715 View Revisions
2014-08-25 17:10 Orekaria Relationship added depends on 0026894
2014-08-26 11:15 Orekaria Relationship added depends on 0027287
2014-08-26 13:12 Orekaria Relationship added depends on 0026740
2014-08-26 18:37 Orekaria Summary If a ticket is created with a null business partner, the user is unable to make the cashup => Sometimes the business partner is empty when the WebPOS loads
2014-08-26 18:37 Orekaria Description Updated View Revisions
2014-08-26 18:37 Orekaria Steps to Reproduce Updated View Revisions
2014-08-26 18:37 Orekaria Proposed Solution updated
2014-08-27 14:37 Orekaria Target Version RR14Q4 => RR14Q3
2014-08-27 14:40 Orekaria Relationship added depends on 0027268
2014-08-27 21:16 Orekaria Type defect => backport
2014-08-27 22:55 Orekaria File Added: Issue 27431: The business partner is required to pay a receipt.patch
2014-08-27 22:56 Orekaria Note Added: 0069817
2014-08-27 22:56 Orekaria Status new => scheduled
2014-08-27 22:56 Orekaria Assigned To marvintm => Orekaria
2014-08-27 22:56 Orekaria fix_in_branch => pi
2014-08-27 22:57 Orekaria Note Deleted: 0069817
2014-08-27 22:57 Orekaria Note Added: 0069818
2014-08-27 22:57 Orekaria Status scheduled => resolved
2014-08-27 22:57 Orekaria Fixed in Version => RR14Q3
2014-08-27 22:57 Orekaria Resolution open => fixed
2014-08-29 08:56 Orekaria Status resolved => new
2014-08-29 08:56 Orekaria Resolution fixed => open
2014-08-29 08:56 Orekaria Fixed in Version RR14Q3 =>
2014-08-29 08:57 Orekaria File Added: businessPartnerNotShown.png
2014-08-29 09:07 Orekaria fix_in_branch pi =>
2014-08-29 09:07 Orekaria Description Updated View Revisions
2014-08-29 09:07 Orekaria File Deleted: CashUp_18.JPG
2014-08-29 09:12 Orekaria Description Updated View Revisions
2014-08-29 09:15 Orekaria File Added: 5c49b50dd84da3791191799b11c2d010.js
2014-08-29 09:30 Orekaria Description Updated View Revisions
2014-08-29 09:49 Orekaria File Added: eclipse.png
2014-08-29 09:54 Orekaria Description Updated View Revisions
2014-08-29 09:55 Orekaria Description Updated View Revisions
2014-08-29 10:32 Orekaria Description Updated View Revisions
2014-08-29 10:44 Orekaria Steps to Reproduce Updated View Revisions
2014-08-29 10:44 Orekaria Proposed Solution updated
2014-08-29 10:46 Orekaria Steps to Reproduce Updated View Revisions
2014-08-29 10:49 Orekaria Relationship added depends on 0027505
2014-08-29 10:59 Orekaria Relationship added depends on 0027413
2014-08-29 11:00 Orekaria Relationship deleted related to 0027228
2014-08-29 11:02 Orekaria Relationship deleted depends on 0027287
2014-08-29 11:09 Orekaria Relationship added depends on 0027506
2014-09-02 11:49 Orekaria Steps to Reproduce Updated View Revisions
2014-09-02 11:50 Orekaria File Deleted: eclipse.png
2014-09-02 13:05 Orekaria Relationship added related to 0027526
2014-09-02 20:07 Orekaria Steps to Reproduce Updated View Revisions
2014-10-08 14:28 adrianromero Note Added: 0070815
2014-11-11 18:15 Orekaria Relationship added related to 0027808
2015-06-10 17:33 Orekaria Target Version RR14Q3 =>
2015-06-10 17:33 Orekaria Assigned To Orekaria => Retail
2015-06-10 20:07 Orekaria Review Assigned To => Orekaria
2015-06-10 20:07 Orekaria Note Added: 0078198
2015-06-10 20:07 Orekaria Status new => closed
2015-06-10 20:07 Orekaria Note Added: 0078199
2015-06-10 20:07 Orekaria Resolution open => suspended
2015-06-10 20:07 Orekaria Fixed in Version => RR15Q3
2015-06-10 20:12 Orekaria Relationship added related to 0028428


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker