Openbravo Issue Tracking System - Retail Modules
View Issue Details
0045277Retail ModulesCopy Retail Storepublic2020-10-22 11:242020-11-23 13:08
jcbourgeois 
prakashmurugesan88 
normalmajoralways
closedfixed 
5
RR19Q3 
 
No
0045277: Copy store with File: Scan value is rejected
When using Copy Store with an Excel file, Scan value in Default tab column (In Terminals tab) is rejected with the followin error :

2020-10-22 09:17:17,802 [http-4] ERROR org.openbravo.retail.copystore.process.CopyStoreProcess - defaultwebpostab: Property OBPOS_Applications.defaultwebpostab, value (CRMScan) is not allowed, it should be one of the following values: [catalog, scan, searchCharacteristic] but it is value CRMScan
org.openbravo.base.validation.ValidationException: defaultwebpostab: Property OBPOS_Applications.defaultwebpostab, value (CRMScan) is not allowed, it should be one of the following values: [catalog, scan, searchCharacteristic] but it is value CRMScan
    at org.openbravo.base.model.domaintype.BaseEnumerateDomainType.checkIsValidValue(BaseEnumerateDomainType.java:64) ~[classes/:?]
    at org.openbravo.base.model.Property.checkIsValidValue(Property.java:823) ~[classes/:?]
    at org.openbravo.base.structure.BaseOBObject.set(BaseOBObject.java:271) ~[classes/:?]
    at org.openbravo.retail.posterminal.OBPOSApplications.setDefaultwebpostab(OBPOSApplications.java:321) ~[classes/:?]
    at org.openbravo.retail.copystore.process.POSTerminalsProcess$DefaultTab.processColumn(POSTerminalsProcess.java:179) ~[classes/:?]
    at org.openbravo.retail.copystore.process.POSTerminalsProcess$DefaultTab.processColumn(POSTerminalsProcess.java:172) ~[classes/:?]
    at org.openbravo.retail.copystore.process.POSTerminalsProcess$DefaultTab$Proxy$_$$_WeldClientProxy.processColumn(Unknown Source) ~[classes/:?]
    at org.openbravo.retail.copystore.process.TabHandler.processField(TabHandler.java:394) ~[classes/:?]
    at org.openbravo.retail.copystore.process.TabHandler.processRecord(TabHandler.java:284) ~[classes/:?]
    at org.openbravo.retail.copystore.process.TabHandler.executeRecord(TabHandler.java:220) ~[classes/:?]
    at org.openbravo.retail.copystore.process.TabHandler.processSection(TabHandler.java:92) ~[classes/:?]
    at org.openbravo.retail.copystore.process.CopyStoreProcess.processSection(CopyStoreProcess.java:855) ~[classes/:?]
    at org.openbravo.retail.copystore.process.CopyStoreProcess.copyFromFile(CopyStoreProcess.java:830) [classes/:?]
    at org.openbravo.retail.copystore.process.CopyStoreProcess.execute(CopyStoreProcess.java:317) [classes/:?]
    at org.openbravo.retail.copystore.process.CopyActionHandler.executeProcess(CopyActionHandler.java:25) [classes/:?]
    at org.openbravo.retail.copystore.process.CopyBaseActionHandler.doExecute(CopyBaseActionHandler.java:124) [classes/:?]
    at org.openbravo.client.application.process.BaseProcessActionHandler.execute(BaseProcessActionHandler.java:150) [classes/:?]
    at org.openbravo.retail.copystore.process.CopyBaseActionHandler.execute(CopyBaseActionHandler.java:62) [classes/:?]
    at org.openbravo.client.kernel.KernelServlet.processActionRequest(KernelServlet.java:317) [classes/:?]
    at org.openbravo.client.kernel.KernelServlet.doGet(KernelServlet.java:207) [classes/:?]
    at org.openbravo.client.kernel.KernelServlet.doPost(KernelServlet.java:289) [classes/:?]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) [tomcat8-servlet-api-8.5.39.jar:?]
    at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:200) [openbravo-core.jar:?]
    at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:459) [classes/:?]
    at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:89) [classes/:?]
    at org.openbravo.client.kernel.BaseKernelServlet.service(BaseKernelServlet.java:60) [classes/:?]
    at org.openbravo.client.kernel.KernelServlet.service(KernelServlet.java:169) [classes/:?]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) [tomcat8-servlet-api-8.5.39.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat8-websocket-8.5.39.jar:8.5.39]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:69) [openbravo-core.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:38) [openbravo-core.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.openbravo.client.kernel.KernelFilter$1.doAction(KernelFilter.java:65) [classes/:?]
    at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:47) [classes/:?]
    at org.openbravo.client.kernel.KernelFilter.doFilter(KernelFilter.java:74) [classes/:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:86) [classes/:?]
    at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:47) [classes/:?]
    at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:108) [classes/:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71) [log4j-web-2.11.1.jar:2.11.1]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat8-catalina-8.5.39.jar:8.5.39]
    at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:476) [tomcat8-coyote-8.5.39.jar:8.5.39]
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat8-coyote-8.5.39.jar:8.5.39]
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806) [tomcat8-coyote-8.5.39.jar:8.5.39]
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498) [tomcat8-coyote-8.5.39.jar:8.5.39]
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat8-coyote-8.5.39.jar:8.5.39]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat8-util-8.5.39.jar:8.5.39]
    at java.lang.Thread.run(Thread.java:834) [?:?]


Other values are accepted.
1) Prepare an Excel file and set Scan in Default tab column
2) Lauch copy store process => it fails with the above error
Accept all possible values
CopyRetailStore
patch I45277_DKTFR.patch (1,628) 2020-11-23 13:08
https://issues.openbravo.com/file_download.php?file_id=15107&type=bug
Issue History
2020-10-22 11:24jcbourgeoisNew Issue
2020-10-22 11:24jcbourgeoisAssigned To => Retail
2020-10-22 11:24jcbourgeoisTriggers an Emergency Pack => No
2020-10-22 11:24jcbourgeoisTag Attached: CopyRetailStore
2020-10-26 13:16rafarodaNote Added: 0123937
2020-10-26 13:16rafarodaStatusnew => feedback
2020-10-26 17:05jcbourgeoisNote Added: 0123948
2020-10-27 09:04jcbourgeoisNote Added: 0123955
2020-11-02 09:02rafarodaStatusfeedback => new
2020-11-23 10:08prakashmurugesan88Assigned ToRetail => prakashmurugesan88
2020-11-23 10:34prakashmurugesan88Statusnew => scheduled
2020-11-23 12:02hgbotNote Added: 0124567
2020-11-23 12:13hgbotResolutionopen => fixed
2020-11-23 12:13hgbotStatusscheduled => closed
2020-11-23 12:13hgbotNote Added: 0124568
2020-11-23 12:13hgbotNote Added: 0124569
2020-11-23 13:08prakashmurugesan88File Added: I45277_DKTFR.patch

Notes
(0123937)
rafaroda   
2020-10-26 13:16   
"Scan" value works for me.
(0123948)
jcbourgeois   
2020-10-26 17:05   
OK so it seems to happen only on DKT env => I will open a "custom issue" for DKT
(0123955)
jcbourgeois   
2020-10-27 09:04   
Feedback from Guillermo Gil :

I've done some testing...
It is a bug from Retail, they are doing this query to fetch the value:
  
private static String defaultWebPOSTabQuery(String defaultTabValue) {
    StringBuilder hql = new StringBuilder();
    hql.append(" where " + org.openbravo.model.ad.domain.List.PROPERTY_NAME);
    hql.append(" = :defaultTabValue");
    OBQuery<org.openbravo.model.ad.domain.List> idQry = OBDal.getInstance()
        .createQuery(org.openbravo.model.ad.domain.List.class, hql.toString());
    idQry.setNamedParameter("defaultTabValue", defaultTabValue);
    idQry.setSelectClause(org.openbravo.model.ad.domain.List.PROPERTY_SEARCHKEY + " ");
    idQry.setMaxResult(1);
    return (String) idQry.uniqueResultObject();

That returns the first record that matches with the name you provided not needed to be even of the same list. it just fetch the first value that matches with "Scan" in this case a custom one.

They need to add the filter by the AD_Reference_id
(0124567)
hgbot   
2020-11-23 12:02   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.copystore/-/merge_requests/14 [^]
(0124568)
hgbot   
2020-11-23 12:13   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.copystore [^]
Changeset: 48abc112235a72f2f8de63bf1bc882d9d60dae83
Author: Prakash M <prakash@qualiantech.com>
Date: 2020-11-23T16:29:29+05:30
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.copystore/-/commit/48abc112235a72f2f8de63bf1bc882d9d60dae83 [^]

Fixed BUG-45277: Fixed defaultWebPOSTab Query
* Included referenceId filter

---
M src/org/openbravo/retail/copystore/process/POSTerminalsProcess.java
---
(0124569)
hgbot   
2020-11-23 12:13   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.copystore/-/merge_requests/14 [^]