Author: deepak
Date: Wed Jun 1 10:55:17 2016
New Revision: 1746422
URL:
http://svn.apache.org/viewvc?rev=1746422&view=revLog:
(OFBIZ-7079) Added condition on EditProduct form, now inventoryItemTypeId will be enable only for createProduct, and on EditProduct screen it will be displayed as readonly instead of editable dropdown. Also fixed fk-name for inventoryItemTypeId relation.
Modified:
ofbiz/trunk/applications/datamodel/entitydef/product-entitymodel.xml
ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml
Modified: ofbiz/trunk/applications/datamodel/entitydef/product-entitymodel.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/datamodel/entitydef/product-entitymodel.xml?rev=1746422&r1=1746421&r2=1746422&view=diff==============================================================================
--- ofbiz/trunk/applications/datamodel/entitydef/product-entitymodel.xml (original)
+++ ofbiz/trunk/applications/datamodel/entitydef/product-entitymodel.xml Wed Jun 1 10:55:17 2016
@@ -2832,7 +2832,7 @@ under the License.
<relation type="one" fk-name="PROD_SHBX_TYPE" title="Default" rel-entity-name="ShipmentBoxType">
<key-map field-name="defaultShipmentBoxTypeId" rel-field-name="shipmentBoxTypeId"/>
</relation>
- <relation type="one" fk-name="INV_ITEM_TYPE" rel-entity-name="InventoryItemType">
+ <relation type="one" fk-name="PROD_INV_ITEM_TYPE" rel-entity-name="InventoryItemType">
<key-map field-name="inventoryItemTypeId" rel-field-name="inventoryItemTypeId"/>
</relation>
Modified: ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml?rev=1746422&r1=1746421&r2=1746422&view=diff==============================================================================
--- ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml (original)
+++ ofbiz/trunk/applications/product/widget/catalog/ProductForms.xml Wed Jun 1 10:55:17 2016
@@ -122,11 +122,16 @@ under the License.
<drop-down allow-empty="true"><option key="Y" description="${uiLabelMap.CommonY}"/><option key="N" description="${uiLabelMap.CommonN}"/></drop-down>
</field>
<field name="inventoryMessage" title="${uiLabelMap.ProductInventoryMessage}"><text size="20" maxlength="255"/></field>
- <field name="inventoryItemTypeId" title="${uiLabelMap.ProductInventoryItemTypeId}">
- <drop-down allow-empty="true">
- <entity-options entity-name="InventoryItemType" key-field-name="inventoryItemTypeId"/>
+ <field name="inventoryItemTypeId" title="${uiLabelMap.ProductInventoryItemTypeId}" use-when="product==null">
+ <drop-down allow-empty="false" >
+ <entity-options entity-name="InventoryItemType" key-field-name="inventoryItemTypeId">
+ <entity-order-by field-name="description"/>
+ </entity-options>
</drop-down>
</field>
+ <field name="inventoryItemTypeId" title="${uiLabelMap.ProductInventoryItemTypeId}" use-when="product!=null">
+ <display-entity entity-name="InventoryItemType"/>
+ </field>
<field name="lotIdFilledIn" title="${uiLabelMap.ProductLotId}">
<drop-down allow-empty="false">