Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0038440 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] Web POS | major | random | 2018-04-25 02:02 | 2019-01-14 16:01 | |||
Reporter | rbianchini | View Status | public | |||||
Assigned To | rqueralta | |||||||
Priority | high | Resolution | fixed | Fixed in Version | RR18Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 12edc8567ccd | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | marvintm | |||||||
OBNetwork customer | OBPS | |||||||
Support ticket | 1292 | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0038440: Error when POS select bp location. | |||||||
Description | When a business partner is selected in POS and he have locations of different organizations, the selected organization may be a no valid for this order, invoice or good shipment that the POS will be try generate. It is because, the query use to select the business partner location take the first record using c_bpartner_id and order this using c_bpartner_location_id but the first record maybe is a location of other organization. | |||||||
Steps To Reproduce | In livebuilds: 1) Create a new business partner using the * organization. 2) Create two Location/Adress using Vall Blanca Store and Central Mountains Store organizations in organiztion field (maybe you need set to visible=yes on this field before). 3) Set the POS Terminal VBS-1 to using this Business Partner created and Vall Blanca Store address as default values for POS. 4) Open the POS VBS-1, select the button to change the business partner and select again the default business partner, if all is ok maybe (depends of id asigned to these locations) the current location is change to use Central Mountains Store adress of this business partner, then when you try sell a product and syncronice this order the backend shows this error in Errors While Importing POS Data window: org.openbravo.base.exception.OBException: Error in OrderLoader: Entity VBS1000009 - 24-04-2018 - 150.50 (Invoice) with organization Vall Blanca Store references an entity ., Central Montain Store Adress through its property partnerAddress but this referenced entity belongs to an organization Central Mountains Store which is not part of the natural tree of Vall Blanca Store at org.openbravo.retail.posterminal.OrderLoader.saveRecord(OrderLoader.java:529) at org.openbravo.mobile.core.process.DataSynchronizationProcess.saveRecord(DataSynchronizationProcess.java:200) at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:154) at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:86) at org.openbravo.mobile.core.process.MobileImportEntryProcessorRunnable.processEntry(MobileImportEntryProcessorRunnable.java:53) at org.openbravo.retail.posterminal.importprocess.OrderImportEntryProcessor$OrderLoaderRunnable.processEntry(OrderImportEntryProcessor.java:59) at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.doRunCycle(ImportEntryProcessor.java:365) at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.run(ImportEntryProcessor.java:287) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622) at java.lang.Thread.run(Thread.java:748) Caused by: org.openbravo.base.exception.OBSecurityException: Entity VBS1000009 - 24-04-2018 - 150.50 (Invoice) with organization Vall Blanca Store references an entity ., Central Montain Store Adress through its property partnerAddress but this referenced entity belongs to an organization Central Mountains Store which is not part of the natural tree of Vall Blanca Store at org.openbravo.dal.core.OBInterceptor.checkReferencedOrganizations(OBInterceptor.java:310) at org.openbravo.dal.core.OBInterceptor.onFlushDirty(OBInterceptor.java:189) at org.hibernate.event.def.DefaultFlushEntityEventListener.invokeInterceptor(DefaultFlushEntityEventListener.java:372) at org.hibernate.event.def.DefaultFlushEntityEventListener.handleInterception(DefaultFlushEntityEventListener.java:349) at org.hibernate.event.def.DefaultFlushEntityEventListener.scheduleUpdate(DefaultFlushEntityEventListener.java:287) at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:155) at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:219) at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:99) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216) at org.openbravo.dal.service.OBDal.flush(OBDal.java:260) at org.openbravo.retail.posterminal.OrderLoader.saveRecord(OrderLoader.java:520) ... 12 more | |||||||
Proposed Solution | If you check the function: loadBPLocations: function(shipping, billing, callback, bpId) { var criteria = { bpartner: { operator: OB.Dal.EQ, value: bpId || this.get('id') }, '_orderByClause': 'c_bpartner_location_id desc' }; if (OB.MobileApp.model.hasPermission('OBPOS_remote.customer', true)) { var filterBpartnerId = { columns: ['bpartner'], operator: OB.Dal.EQ, value: this.get('id'), isId: true }; criteria.remoteFilters = [filterBpartnerId]; } OB.Dal.find(OB.Model.BPLocation, criteria, function(collection) { if (!billing) { billing = _.find(collection.models, function(loc) { return loc.get('isBillTo'); }); } if (!shipping) { shipping = _.find(collection.models, function(loc) { return loc.get('isShipTo'); }); } if (!shipping && !billing) { OB.UTIL.showError(OB.I18N.getLabel('OBPOS_BPartnerNoShippingAddress', [bpId])); return; } callback(shipping, billing, collection.models); }); }, in the file: org.openbravo.retail.posterminal/web/org.openbravo.retail.posterminal/js/model/businesspartner.js Maybe you need add in the criterial the organization used in Terminal. | |||||||
Tags | No tags attached. | |||||||
Attached Files | ![]() | |||||||
![]() |
|
![]() |
|
(0104299) hgbot (developer) 2018-05-04 23:27 |
Repository: erp/pmods/org.openbravo.retail.posterminal Changeset: 12edc8567ccd909338ccd5ec0984386841966e4f Author: Rafael Queralta Pozo <rqueralta <at> nauta.cu> Date: Thu May 03 17:05:58 2018 -0400 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/12edc8567ccd909338ccd5ec0984386841966e4f [^] Fixed issue 38440: Error when POS select bp location --- M src/org/openbravo/retail/posterminal/master/BPLocation.java --- |
(0105376) hgbot (developer) 2018-06-25 23:51 |
Repository: tools/automation/pi-mobile Changeset: f9e2d214e0bc47bc0a9c0ce4848ba2e4d54d6639 Author: Alejandro <alekosmp86 <at> gmail.com> Date: Sun Jun 24 21:57:09 2018 -0400 URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/f9e2d214e0bc47bc0a9c0ce4848ba2e4d54d6639 [^] Related to issue 38440: added automated test --- A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/customer/I38440_VerifyCustomerLocationWhenSelectedInPOS.java --- |
(0108903) alekosmp86 (viewer) 2019-01-10 15:26 edited on: 2019-01-10 15:26 |
Test have been refactored due it no longer creates its own sampledata. https://code.openbravo.com/tools/automation/pi-mobile/rev/ebf1b4a2b382 [^] https://code.openbravo.com/erp/pmods/org.openbravo.retail.sampledata/rev/6b8c099953fb [^] |
(0108947) hgbot (developer) 2019-01-14 16:01 |
Repository: tools/automation/pi-mobile Changeset: d245d32c66c17971473920d47ba50460e445e4e6 Author: Alejandro <alekosmp86 <at> gmail.com> Date: Mon Jan 14 09:44:17 2019 -0500 URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/d245d32c66c17971473920d47ba50460e445e4e6 [^] Related to issue 38440: test has been refactored due to changes in sampledata --- M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/customer/I38440_VerifyCustomerLocationWhenSelectedInPOS.java --- |
(0108949) hgbot (developer) 2019-01-14 16:01 |
Repository: erp/pmods/org.openbravo.retail.sampledata Changeset: dca3ef5238bfd9e8e3aebd4fdec3f76ead388a4d Author: Alejandro <alekosmp86 <at> gmail.com> Date: Mon Jan 14 09:50:13 2019 -0500 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sampledata/rev/dca3ef5238bfd9e8e3aebd4fdec3f76ead388a4d [^] Related to issue 38440: changed active status of business partner used in test due it was making other tests fail. --- M referencedata/sampledata/The_White_Valley_Group/C_BPARTNER.xml --- |
![]() |
|||
Date Modified | Username | Field | Change |
2018-04-25 02:02 | rbianchini | New Issue | |
2018-04-25 02:02 | rbianchini | Assigned To | => Retail |
2018-04-25 02:02 | rbianchini | File Added: captures.tar.gz | |
2018-04-25 02:02 | rbianchini | OBNetwork customer | => Yes |
2018-04-25 02:02 | rbianchini | Support ticket | => 1292 |
2018-04-25 02:02 | rbianchini | Resolution time | => 1494990000 |
2018-04-25 02:02 | rbianchini | Triggers an Emergency Pack | => No |
2018-04-25 02:12 | rbianchini | Issue Monitored: szapata | |
2018-04-27 13:40 | marvintm | Resolution time | 1494990000 => 1526508000 |
2018-05-02 16:55 | rqueralta | Assigned To | Retail => rqueralta |
2018-05-02 16:56 | rqueralta | Status | new => scheduled |
2018-05-04 23:27 | hgbot | Checkin | |
2018-05-04 23:27 | hgbot | Note Added: 0104299 | |
2018-05-04 23:27 | hgbot | Status | scheduled => resolved |
2018-05-04 23:27 | hgbot | Resolution | open => fixed |
2018-05-04 23:27 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/12edc8567ccd909338ccd5ec0984386841966e4f [^] |
2018-05-18 15:03 | marvintm | Review Assigned To | => marvintm |
2018-05-18 15:03 | marvintm | Status | resolved => closed |
2018-05-18 15:03 | marvintm | Fixed in Version | => RR18Q3 |
2018-06-25 23:51 | hgbot | Checkin | |
2018-06-25 23:51 | hgbot | Note Added: 0105376 | |
2019-01-10 15:26 | alekosmp86 | Note Added: 0108903 | |
2019-01-10 15:26 | alekosmp86 | Note Edited: 0108903 | View Revisions |
2019-01-14 16:01 | hgbot | Checkin | |
2019-01-14 16:01 | hgbot | Note Added: 0108947 | |
2019-01-14 16:01 | hgbot | Checkin | |
2019-01-14 16:01 | hgbot | Note Added: 0108949 |
Copyright © 2000 - 2009 MantisBT Group |