[jira] [Updated] (OFBIZ-4769) Editing of product suppliers is not working for the Germany locale

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Updated] (OFBIZ-4769) Editing of product suppliers is not working for the Germany locale

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-4769?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux updated OFBIZ-4769:
-----------------------------------
    Description:
Please, open any product and add to it a supplier (SupplierProduct), than try to edit it (..../catalog/control/EditProductSuppliers?productId=xxx).
 It works for English locale, but it does not work for German, I have the following error:


 =-=-=-=-=-=-=-=-= Database type warning GenericEntity.set =-=-=-=-=-=-=-=-= In entity field [SupplierProduct.minimumOrderQuantity] set the value passed in [java.lang.String] is not compatible with the Java type of the field [java.math.BigDecimal]
 Exception: java.lang.Exception
 Message: Location of database type warning
 ---- stack trace ---------------------------------------------------------------
 java.lang.Exception: Location of database type warning
 org.ofbiz.entity.GenericEntity.set(GenericEntity.java:426)
 org.ofbiz.entity.GenericEntity.set(GenericEntity.java:372)
 org.ofbiz.entity.GenericEntity.setAllFields(GenericEntity.java:887)
 ................

---- exception report ----------------------------------------------------------
 =-=-=-=-=-=-=-=-= Database type warning GenericEntity.set =-=-=-=-=-=-=-=-= In entity field [SupplierProduct.availableFromDate] set the value passed in [java.lang.String] is not compatible with the Java type of the field [java.sql.Timestamp]
 Exception: java.lang.Exception
 Message: Location of database type warning
 ---- stack trace ---------------------------------------------------------------
 java.lang.Exception: Location of database type warning
 org.ofbiz.entity.GenericEntity.set(GenericEntity.java:426)
 org.ofbiz.entity.GenericEntity.set(GenericEntity.java:372)
 org.ofbiz.entity.GenericEntity.setAllFields(GenericEntity.java:887)
 org.ofbiz.entity.finder.PrimaryKeyFinder.runFind(PrimaryKeyFinder.java:106)
 ..................

the investigation says me the following:
{code:xml}
   <screen name="EditSupplierProduct">
        <section>
            <actions>
                <set field="titleProperty" value="PageTitleEditSupplierProduct"/>
                <set field="tabButtonItem" value="EditSupplierProduct"/>
                <set field="labelTitleProperty" value="ProductSuppliers"/>

                <!-- default currency in framework/common/config/general.properties -->
                <property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>

                <set field="productId" from-field="parameters.productId"/>
                <set field="orderBy" from-field="parameters.orderBy" default-value="partyId"/>
                <entity-and entity-name="SupplierProduct" list="productSuppliers">
                    <field-map field-name="productId"/>
                    <order-by field-name="${orderBy}"/>
                </entity-and>
                <entity-one entity-name="SupplierProduct" value-field="supplierProduct" auto-field-map="true"/>
            </actions
{code}
...............

where <entity-one entity-name="SupplierProduct" value-field="supplierProduct" auto-field-map="true"/> can not be done.
 I suppose that the problem depends on the German locale, where BigDecimal and Date has another format than we have in the parameters via URL.

  was:
Please, open any product and add to it a supplier (SupplierProduct), than try to edit it (..../catalog/control/EditProductSuppliers?productId=xxx).
It works for English locale, but it does not work for German, I have the following error:
=-=-=-=-=-=-=-=-= Database type warning GenericEntity.set =-=-=-=-=-=-=-=-= In entity field [SupplierProduct.minimumOrderQuantity] set the value passed in [java.lang.String] is not compatible with the Java type of the field [java.math.BigDecimal]
Exception: java.lang.Exception
Message: Location of database type warning
---- stack trace ---------------------------------------------------------------
java.lang.Exception: Location of database type warning
org.ofbiz.entity.GenericEntity.set(GenericEntity.java:426)
org.ofbiz.entity.GenericEntity.set(GenericEntity.java:372)
org.ofbiz.entity.GenericEntity.setAllFields(GenericEntity.java:887)
................


---- exception report ----------------------------------------------------------
=-=-=-=-=-=-=-=-= Database type warning GenericEntity.set =-=-=-=-=-=-=-=-= In entity field [SupplierProduct.availableFromDate] set the value passed in [java.lang.String] is not compatible with the Java type of the field [java.sql.Timestamp]
Exception: java.lang.Exception
Message: Location of database type warning
---- stack trace ---------------------------------------------------------------
java.lang.Exception: Location of database type warning
org.ofbiz.entity.GenericEntity.set(GenericEntity.java:426)
org.ofbiz.entity.GenericEntity.set(GenericEntity.java:372)
org.ofbiz.entity.GenericEntity.setAllFields(GenericEntity.java:887)
org.ofbiz.entity.finder.PrimaryKeyFinder.runFind(PrimaryKeyFinder.java:106)
..................



the investigation says me the following:
{code:xml}
   <screen name="EditSupplierProduct">
        <section>
            <actions>
                <set field="titleProperty" value="PageTitleEditSupplierProduct"/>
                <set field="tabButtonItem" value="EditSupplierProduct"/>
                <set field="labelTitleProperty" value="ProductSuppliers"/>

                <!-- default currency in framework/common/config/general.properties -->
                <property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>

                <set field="productId" from-field="parameters.productId"/>
                <set field="orderBy" from-field="parameters.orderBy" default-value="partyId"/>
                <entity-and entity-name="SupplierProduct" list="productSuppliers">
                    <field-map field-name="productId"/>
                    <order-by field-name="${orderBy}"/>
                </entity-and>
                <entity-one entity-name="SupplierProduct" value-field="supplierProduct" auto-field-map="true"/>
            </actions
{code:xml}
...............

where <entity-one entity-name="SupplierProduct" value-field="supplierProduct" auto-field-map="true"/>  can not be done.
I suppose that the problem depends on the German locale, where BigDecimal and Date has another format than we have in the parameters via URL.


> Editing of product suppliers is not working for the Germany locale
> ------------------------------------------------------------------
>
>                 Key: OFBIZ-4769
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4769
>             Project: OFBiz
>          Issue Type: Bug
>          Components: product
>    Affects Versions: Release 10.04, Release Branch 11.04, Trunk
>            Reporter: Sergei Biletnikov
>            Assignee: Jacques Le Roux
>            Priority: Major
>         Attachments: JIRA-4769-EditProductSuppliers-20121213.diff, JIRA-4769EditProductSuppliers-20121222.patch, JIRA-4769EditProductSuppliers-20121222.patch, JIRA-4769EditProductSuppliers-20121222.patch, OFBIZ-4769-20121227.patch, OFBIZ-4769-Updated.patch, OFBIZ-4769-WidgetWorker-Including-DeleteProductSupplier.patch, OFBIZ-4769.patch, WidgetWorker.patch, WidgetWorker.patch
>
>
> Please, open any product and add to it a supplier (SupplierProduct), than try to edit it (..../catalog/control/EditProductSuppliers?productId=xxx).
>  It works for English locale, but it does not work for German, I have the following error:
>  =-=-=-=-=-=-=-=-= Database type warning GenericEntity.set =-=-=-=-=-=-=-=-= In entity field [SupplierProduct.minimumOrderQuantity] set the value passed in [java.lang.String] is not compatible with the Java type of the field [java.math.BigDecimal]
>  Exception: java.lang.Exception
>  Message: Location of database type warning
>  ---- stack trace ---------------------------------------------------------------
>  java.lang.Exception: Location of database type warning
>  org.ofbiz.entity.GenericEntity.set(GenericEntity.java:426)
>  org.ofbiz.entity.GenericEntity.set(GenericEntity.java:372)
>  org.ofbiz.entity.GenericEntity.setAllFields(GenericEntity.java:887)
>  ................
> ---- exception report ----------------------------------------------------------
>  =-=-=-=-=-=-=-=-= Database type warning GenericEntity.set =-=-=-=-=-=-=-=-= In entity field [SupplierProduct.availableFromDate] set the value passed in [java.lang.String] is not compatible with the Java type of the field [java.sql.Timestamp]
>  Exception: java.lang.Exception
>  Message: Location of database type warning
>  ---- stack trace ---------------------------------------------------------------
>  java.lang.Exception: Location of database type warning
>  org.ofbiz.entity.GenericEntity.set(GenericEntity.java:426)
>  org.ofbiz.entity.GenericEntity.set(GenericEntity.java:372)
>  org.ofbiz.entity.GenericEntity.setAllFields(GenericEntity.java:887)
>  org.ofbiz.entity.finder.PrimaryKeyFinder.runFind(PrimaryKeyFinder.java:106)
>  ..................
> the investigation says me the following:
> {code:xml}
>    <screen name="EditSupplierProduct">
>         <section>
>             <actions>
>                 <set field="titleProperty" value="PageTitleEditSupplierProduct"/>
>                 <set field="tabButtonItem" value="EditSupplierProduct"/>
>                 <set field="labelTitleProperty" value="ProductSuppliers"/>
>                 <!-- default currency in framework/common/config/general.properties -->
>                 <property-to-field field="defaultCurrencyUomId" resource="general" property="currency.uom.id.default" default="USD"/>
>                 <set field="productId" from-field="parameters.productId"/>
>                 <set field="orderBy" from-field="parameters.orderBy" default-value="partyId"/>
>                 <entity-and entity-name="SupplierProduct" list="productSuppliers">
>                     <field-map field-name="productId"/>
>                     <order-by field-name="${orderBy}"/>
>                 </entity-and>
>                 <entity-one entity-name="SupplierProduct" value-field="supplierProduct" auto-field-map="true"/>
>             </actions
> {code}
> ...............
> where <entity-one entity-name="SupplierProduct" value-field="supplierProduct" auto-field-map="true"/> can not be done.
>  I suppose that the problem depends on the German locale, where BigDecimal and Date has another format than we have in the parameters via URL.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)