Incorrect Product Supplier update and delete in some locales
------------------------------------------------------------ Key: OFBIZ-430 URL: http://issues.apache.org/jira/browse/OFBIZ-430 Project: OFBiz (The Open for Business Project) Issue Type: Bug Components: product Affects Versions: SVN trunk Reporter: Guido Amarilla Priority: Minor It is an issue with product suppliers. When trying to modify a supplier product by clicking in the "Update" button next to each row, it doesn´t get all the supplier´s product information, and Minimum Order Quantity is being multiplied by 10. * This happens in several languages, but not in english nor french. Another problem is that it isn't possible to delete a row, in any of the affected locales, giving the following error: *In remove-value a value was not found with the specified valueAcsr: sprod, not removing This was confirmed by Jacopo Cappellato who says that it is related to the way numbers are parsed according to the locale. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
[ http://issues.apache.org/jira/browse/OFBIZ-430?page=all ]
Jacopo Cappellato reassigned OFBIZ-430: --------------------------------------- Assignee: Jacopo Cappellato > Incorrect Product Supplier update and delete in some locales > ------------------------------------------------------------ > > Key: OFBIZ-430 > URL: http://issues.apache.org/jira/browse/OFBIZ-430 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Affects Versions: SVN trunk > Reporter: Guido Amarilla > Assigned To: Jacopo Cappellato > Priority: Minor > > It is an issue with product suppliers. > When trying to modify a supplier product by clicking in the "Update" > button next to each row, it doesn´t get all the supplier´s product > information, and Minimum Order Quantity is being multiplied by 10. > * This happens in several languages, but not in english nor french. > Another problem is that it isn't possible to delete a row, in any of the affected locales, giving the following error: > *In remove-value a value was not found with the specified valueAcsr: sprod, not removing > This was confirmed by Jacopo Cappellato who says that it is related to the way > numbers are parsed according to the locale. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-430?page=comments#action_12447475 ]
Si Chen commented on OFBIZ-430: ------------------------------- What version are you using? The "valueAscr" error was fixed a while ago as far as I can tell. Can you attach some screenshots showing exactly what values you're using and what locale as well? > Incorrect Product Supplier update and delete in some locales > ------------------------------------------------------------ > > Key: OFBIZ-430 > URL: http://issues.apache.org/jira/browse/OFBIZ-430 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Affects Versions: SVN trunk > Reporter: Guido Amarilla > Assigned To: Jacopo Cappellato > Priority: Minor > > It is an issue with product suppliers. > When trying to modify a supplier product by clicking in the "Update" > button next to each row, it doesn´t get all the supplier´s product > information, and Minimum Order Quantity is being multiplied by 10. > * This happens in several languages, but not in english nor french. > Another problem is that it isn't possible to delete a row, in any of the affected locales, giving the following error: > *In remove-value a value was not found with the specified valueAcsr: sprod, not removing > This was confirmed by Jacopo Cappellato who says that it is related to the way > numbers are parsed according to the locale. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-430?page=comments#action_12447486 ]
Guido Amarilla commented on OFBIZ-430: -------------------------------------- You can test it in now: https://demo.dejc.com:8443/catalog/control/EditProductSuppliers?productId=MAT_A_COST I created a supplier product with ID TEST_ID. Supplier: Demo Supplier From Date: 2006-11-01 10:49:47.79 Minimum Order Quantity: 5 Order Qty Increments: 1 Supplier Product Name : Test Name Supplier Product Id: TEST_ID If you change locale to Spanish(Argentina) and click in "Actualizar" button (Update), minimum order quantity is loaded as 50 instead of 5, and other form's fields aren´t loaded. Then try to delete it by clicking the "Eliminar" button (Delete) and you get an error. > Incorrect Product Supplier update and delete in some locales > ------------------------------------------------------------ > > Key: OFBIZ-430 > URL: http://issues.apache.org/jira/browse/OFBIZ-430 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Affects Versions: SVN trunk > Reporter: Guido Amarilla > Assigned To: Jacopo Cappellato > Priority: Minor > > It is an issue with product suppliers. > When trying to modify a supplier product by clicking in the "Update" > button next to each row, it doesn´t get all the supplier´s product > information, and Minimum Order Quantity is being multiplied by 10. > * This happens in several languages, but not in english nor french. > Another problem is that it isn't possible to delete a row, in any of the affected locales, giving the following error: > *In remove-value a value was not found with the specified valueAcsr: sprod, not removing > This was confirmed by Jacopo Cappellato who says that it is related to the way > numbers are parsed according to the locale. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-430?page=comments#action_12453641 ]
Jacques Le Roux commented on OFBIZ-430: --------------------------------------- I tried. I did no found any pb with minimum order quantity in any cases. But I agree that there is a pb when trying to delete a supplier with locale to Spanish(Argentina). It tried also with French(France) and it works, odd ! > Incorrect Product Supplier update and delete in some locales > ------------------------------------------------------------ > > Key: OFBIZ-430 > URL: http://issues.apache.org/jira/browse/OFBIZ-430 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Affects Versions: SVN trunk > Reporter: Guido Amarilla > Assigned To: Jacopo Cappellato > Priority: Minor > > It is an issue with product suppliers. > When trying to modify a supplier product by clicking in the "Update" > button next to each row, it doesn´t get all the supplier´s product > information, and Minimum Order Quantity is being multiplied by 10. > * This happens in several languages, but not in english nor french. > Another problem is that it isn't possible to delete a row, in any of the affected locales, giving the following error: > *In remove-value a value was not found with the specified valueAcsr: sprod, not removing > This was confirmed by Jacopo Cappellato who says that it is related to the way > numbers are parsed according to the locale. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-430?page=comments#action_12453833 ]
Jacopo Cappellato commented on OFBIZ-430: ----------------------------------------- Jacques, thanks for your help and this additional information that is very helpful. It is indeed an odd bug! I'll work on it as soon as I have a free moment. Jacopo > Incorrect Product Supplier update and delete in some locales > ------------------------------------------------------------ > > Key: OFBIZ-430 > URL: http://issues.apache.org/jira/browse/OFBIZ-430 > Project: OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Affects Versions: SVN trunk > Reporter: Guido Amarilla > Assigned To: Jacopo Cappellato > Priority: Minor > > It is an issue with product suppliers. > When trying to modify a supplier product by clicking in the "Update" > button next to each row, it doesn´t get all the supplier´s product > information, and Minimum Order Quantity is being multiplied by 10. > * This happens in several languages, but not in english nor french. > Another problem is that it isn't possible to delete a row, in any of the affected locales, giving the following error: > *In remove-value a value was not found with the specified valueAcsr: sprod, not removing > This was confirmed by Jacopo Cappellato who says that it is related to the way > numbers are parsed according to the locale. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12461698 ] Guido Amarilla commented on OFBIZ-430: -------------------------------------- Just to learn how to debug OFBiz I tried to find where this issue is originated. So I am posting what I found. Excuse me if I am not clear or if writing something very obvious. In ModelScreenAction$SetField.runAction(Map) line: 167 if (!this.fromField.isEmpty()) { newValue = this.fromField.get(context); Gets minimumOrderQuantity from context using current Locale. In case of Spanish a comma ( , ) is used as decimal separator symbol. This is an example Parameters section of context used for testing: ==>[parameters]:[currencyUomId=ARS, productId=R110_14_1, minimumOrderQuantity=10.0, partyId=10003, availableFromDate=2006-05-13 22:24:13.0,................ You can see that the decimal separator is a point ( . ) So newValue gets the string "10.0" later in ModelScreenAction$SetField.runAction(Map) line: 182 newValue = ObjectType.simpleTypeConvert(newValue, this.type, null, locale); newValue gets "100" because "10.0" is converted using the comma as decimal symbol and it is ignored. Then context is filled with these values: ============================== Start stack level 0 ==>[formStringRenderer]:org.ofbiz.widget.html.HtmlFormRenderer@7efdd5 ==>[null]:[null-field] ==>[titleProperty]:PageTitleEditSupplierProduct ==>[tabButtonItem]:EditSupplierProduct ==>[labelTitleProperty]:ProductSuppliers ==>[defaultCurrencyUomId]:ARS ==>[productId]:R110_14_1 ==>[minimumOrderQuantity]:100.0 <<<<<<<<<<<<----- ERROR! ============================== End stack level 0 : My question is if we change this line from ModelScreenAction$SetField.runAction: Locale locale = UtilMisc.ensureLocale(context.get("locale")); to "en-US" Locale Could it break other services? Stack: Thread [http-0.0.0.0-8443-Processor3] (Suspended) ModelScreenAction$SetField.runAction(Map) line: 169 ModelScreenAction.runSubActions(List, Map) line: 113 ModelScreenWidget$Section.renderWidgetString(Writer, Map, ScreenStringRenderer) line: 235 ModelScreen.renderScreenString(Writer, Map, ScreenStringRenderer) line: 131 ScreenRenderer.render(String, String) line: 102 ScreenRenderer.render(String) line: 87 ScreenWidgetViewHandler.render(String, String, String, String, String, HttpServletRequest, HttpServletResponse) line: 75 RequestHandler.renderView(String, boolean, HttpServletRequest, HttpServletResponse) line: 602 RequestHandler.doRequest(HttpServletRequest, HttpServletResponse, String, GenericValue, GenericDelegator) line: 387 ControlServlet.doGet(HttpServletRequest, HttpServletResponse) line: 178 ControlServlet(HttpServlet).service(HttpServletRequest, HttpServletResponse) line: 595 ControlServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 688 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 252 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 ContextFilter.doFilter(ServletRequest, ServletResponse, FilterChain) line: 245 ApplicationFilterChain.internalDoFilter(ServletRequest, ServletResponse) line: 202 ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 173 StandardWrapperValve.invoke(Request, Response) line: 213 StandardContextValve.invoke(Request, Response) line: 178 StandardHostValve.invoke(Request, Response) line: 126 ErrorReportValve.invoke(Request, Response) line: 105 StandardEngineValve.invoke(Request, Response) line: 107 AccessLogValve.invoke(Request, Response) line: 541 CoyoteAdapter.service(Request, Response) line: 148 Http11Processor.process(InputStream, OutputStream) line: 869 Http11Protocol$JmxHttp11ConnectionHandler(Http11BaseProtocol$Http11ConnectionHandler).processConnection(TcpConnection, Object[]) line: 664 PoolTcpEndpoint.processSocket(Socket, TcpConnection, Object[]) line: 527 LeaderFollowerWorkerThread.runIt(Object[]) line: 80 ThreadPool$ControlRunnable.run() line: 684 ThreadWithAttributes(Thread).run() line: 595 context Map: ============================== Start stack level 0 ==>[bshInterpreter]:bsh.Interpreter@a7d8b0 ============================== End stack level 0 ============================== Start stack level 1 ==>[screens]:org.ofbiz.widget.screen.ScreenRenderer@1f66272 ============================== End stack level 1 ============================== Start stack level 2 ==>[formStringRenderer]:org.ofbiz.widget.html.HtmlFormRenderer@b942f7 ==>[null]:[null-field] ==>[titleProperty]:PageTitleEditSupplierProduct ==>[tabButtonItem]:EditSupplierProduct ==>[labelTitleProperty]:ProductSuppliers ==>[defaultCurrencyUomId]:ARS ==>[productId]:R110_14_1 ==>[minimumOrderQuantity]:100.0 ==>[orderBy]:partyId ==>[product]:[GenericEntity:Product][amountUomTypeId,null()][autoCreateKeywords,null()][billOfMaterialLevel,0(java.lang.Long)][brandName,null()][chargeShipping,null()][comments,null()][createdByUserLogin,gamarilla(java.lang.String)][createdDate,2006-05-14 > Incorrect Product Supplier update and delete in some locales > ------------------------------------------------------------ > > Key: OFBIZ-430 > URL: http://issues.apache.org/jira/browse/OFBIZ-430 > Project: Apache OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Affects Versions: SVN trunk > Reporter: Guido Amarilla > Assigned To: Jacopo Cappellato > Priority: Minor > > It is an issue with product suppliers. > When trying to modify a supplier product by clicking in the "Update" > button next to each row, it doesn´t get all the supplier´s product > information, and Minimum Order Quantity is being multiplied by 10. > * This happens in several languages, but not in english nor french. > Another problem is that it isn't possible to delete a row, in any of the affected locales, giving the following error: > *In remove-value a value was not found with the specified valueAcsr: sprod, not removing > This was confirmed by Jacopo Cappellato who says that it is related to the way > numbers are parsed according to the locale. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12461711 ] Jacopo Cappellato commented on OFBIZ-430: ----------------------------------------- Guido, thanks for tracking this down. Could you please try to change line 182 of ModelScreenAction from newValue = ObjectType.simpleTypeConvert(newValue, this.type, null, locale); to newValue = ObjectType.simpleTypeConvert(newValue, this.type, null, null); ? Does it fix your issue? Please let me know. > Incorrect Product Supplier update and delete in some locales > ------------------------------------------------------------ > > Key: OFBIZ-430 > URL: http://issues.apache.org/jira/browse/OFBIZ-430 > Project: Apache OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Affects Versions: SVN trunk > Reporter: Guido Amarilla > Assigned To: Jacopo Cappellato > Priority: Minor > > It is an issue with product suppliers. > When trying to modify a supplier product by clicking in the "Update" > button next to each row, it doesn´t get all the supplier´s product > information, and Minimum Order Quantity is being multiplied by 10. > * This happens in several languages, but not in english nor french. > Another problem is that it isn't possible to delete a row, in any of the affected locales, giving the following error: > *In remove-value a value was not found with the specified valueAcsr: sprod, not removing > This was confirmed by Jacopo Cappellato who says that it is related to the way > numbers are parsed according to the locale. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12461763 ] Guido Amarilla commented on OFBIZ-430: -------------------------------------- Jacopo, I changed it and it works fine, it fixed the issue. I tested on Windows with Regional Settings set in Spanish and English. > Incorrect Product Supplier update and delete in some locales > ------------------------------------------------------------ > > Key: OFBIZ-430 > URL: http://issues.apache.org/jira/browse/OFBIZ-430 > Project: Apache OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Affects Versions: SVN trunk > Reporter: Guido Amarilla > Assigned To: Jacopo Cappellato > Priority: Minor > > It is an issue with product suppliers. > When trying to modify a supplier product by clicking in the "Update" > button next to each row, it doesn´t get all the supplier´s product > information, and Minimum Order Quantity is being multiplied by 10. > * This happens in several languages, but not in english nor french. > Another problem is that it isn't possible to delete a row, in any of the affected locales, giving the following error: > *In remove-value a value was not found with the specified valueAcsr: sprod, not removing > This was confirmed by Jacopo Cappellato who says that it is related to the way > numbers are parsed according to the locale. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux closed OFBIZ-430. --------------------------------- Resolution: Fixed Thanks for letting us know Guido > Incorrect Product Supplier update and delete in some locales > ------------------------------------------------------------ > > Key: OFBIZ-430 > URL: http://issues.apache.org/jira/browse/OFBIZ-430 > Project: Apache OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Affects Versions: SVN trunk > Reporter: Guido Amarilla > Assigned To: Jacopo Cappellato > Priority: Minor > > It is an issue with product suppliers. > When trying to modify a supplier product by clicking in the "Update" > button next to each row, it doesn´t get all the supplier´s product > information, and Minimum Order Quantity is being multiplied by 10. > * This happens in several languages, but not in english nor french. > Another problem is that it isn't possible to delete a row, in any of the affected locales, giving the following error: > *In remove-value a value was not found with the specified valueAcsr: sprod, not removing > This was confirmed by Jacopo Cappellato who says that it is related to the way > numbers are parsed according to the locale. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
In reply to this post by Nicolas Malin (Jira)
[ http://issues.apache.org/jira/browse/OFBIZ-430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12461776 ] Jacques Le Roux commented on OFBIZ-430: --------------------------------------- Jacopo, Guido, After a test with fr_FR locale, I committed the fix in revision 491871. Thanks to both of you > Incorrect Product Supplier update and delete in some locales > ------------------------------------------------------------ > > Key: OFBIZ-430 > URL: http://issues.apache.org/jira/browse/OFBIZ-430 > Project: Apache OFBiz (The Open for Business Project) > Issue Type: Bug > Components: product > Affects Versions: SVN trunk > Reporter: Guido Amarilla > Assigned To: Jacopo Cappellato > Priority: Minor > > It is an issue with product suppliers. > When trying to modify a supplier product by clicking in the "Update" > button next to each row, it doesn´t get all the supplier´s product > information, and Minimum Order Quantity is being multiplied by 10. > * This happens in several languages, but not in english nor french. > Another problem is that it isn't possible to delete a row, in any of the affected locales, giving the following error: > *In remove-value a value was not found with the specified valueAcsr: sprod, not removing > This was confirmed by Jacopo Cappellato who says that it is related to the way > numbers are parsed according to the locale. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
Free forum by Nabble | Edit this page |