Openbravo Issue Tracking System - Retail Modules | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0038440 | Retail Modules | Web POS | public | 2018-04-25 02:02 | 2019-01-14 16:01 |
Reporter | rbianchini | ||||
Assigned To | rqueralta | ||||
Priority | high | Severity | major | Reproducibility | random |
Status | closed | Resolution | fixed | ||
Platform | OS | 5 | OS Version | ||
Product Version | |||||
Target Version | Fixed in Version | RR18Q3 | |||
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. | ||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | ![]() https://issues.openbravo.com/file_download.php?file_id=11765&type=bug | ||||
Issue History | |||||
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 | bug_revision_view_page.php?bugnote_id=0108903#r18107 | ||
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 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|