You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2008/12/16 11:28:18 UTC

svn commit: r727009 - in /ofbiz/trunk/applications/manufacturing: config/ webapp/manufacturing/WEB-INF/ webapp/manufacturing/bom/ webapp/manufacturing/includes/ widget/manufacturing/

Author: hansbak
Date: Tue Dec 16 02:28:17 2008
New Revision: 727009

URL: http://svn.apache.org/viewvc?rev=727009&view=rev
Log:
add find/list screens for BOM's

Modified:
    ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.xml
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/BomForms.xml
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/includes/appheader.ftl
    ofbiz/trunk/applications/manufacturing/widget/manufacturing/BomScreens.xml
    ofbiz/trunk/applications/manufacturing/widget/manufacturing/Menus.xml

Modified: ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.xml?rev=727009&r1=727008&r2=727009&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.xml (original)
+++ ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.xml Tue Dec 16 02:28:17 2008
@@ -1080,6 +1080,10 @@
         <value xml:lang="th">ราคา</value>
         <value xml:lang="zh">费用</value>
     </property>
+    <property key="ManufacturingCreateBom">
+        <value xml:lang="en">Create Bom</value>
+        <value xml:lang="th">สร้างรายการสินค้า</value>
+    </property>
     <property key="ManufacturingCreateCalendar">
         <value xml:lang="de">Kalender erstellen</value>
         <value xml:lang="en">Create calendar</value>
@@ -1121,6 +1125,10 @@
         </value>
         <value xml:lang="zh">安全错误:要执行这个操作,你必须有MANUFACTURING_CREATE或MANUFACTURING_ADMIN权限</value>
     </property>
+    <property key="ManufacturingCreateProductBom">
+        <value xml:lang="en">Create Bill Of Material</value>
+        <value xml:lang="th">สร้างรายการสินค้า</value>
+    </property>
     <property key="ManufacturingCreateProductionRun">
         <value xml:lang="de">Produktionsauftrag erstellen</value>
         <value xml:lang="en">Create a Production Run</value>
@@ -3402,6 +3410,10 @@
         <value xml:lang="th">การค้นหา</value>
         <value xml:lang="zh">查找域</value>
     </property>
+    <property key="PageTitleFindBom">
+        <value xml:lang="en">Find Bill Of Materials</value>
+        <value xml:lang="th">ค้นหารายการสินค้า</value>
+    </property>
     <property key="PageTitleFindCalendar">
         <value xml:lang="de">Kalender suchen</value>
         <value xml:lang="en">Find Calendar</value>

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml?rev=727009&r1=727008&r2=727009&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml Tue Dec 16 02:28:17 2008
@@ -388,6 +388,20 @@
         <response name="success" type="view" value="EditProductBom"/>
         <response name="error" type="view" value="EditProductBom"/>
     </request-map>
+    <request-map uri="FindBom">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="FindBom"/>
+    </request-map>
+    <request-map uri="CreateProductBom">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="CreateProductBom"/>
+    </request-map>
+    <request-map uri="createProductBom">
+        <security https="true" auth="true"/>
+        <event type="simple" path="org/ofbiz/manufacturing/bom/BomSimpleMethods.xml" invoke="createBOMAssoc"/>
+        <response name="success" type="view" value="EditProductBom"/>
+        <response name="error" type="view" value="CreateProductBom"/>
+    </request-map>
 
     <request-map uri="EditProductManufacturingRules">
         <security https="true" auth="true"/>
@@ -760,7 +774,9 @@
     <view-map name="EditProductBom" page="component://manufacturing/widget/manufacturing/BomScreens.xml#EditProductBom" type="screen"/>
     <view-map name="EditProductManufacturingRules" page="component://manufacturing/widget/manufacturing/BomScreens.xml#EditProductManufacturingRules" type="screen"/>
     <view-map name="BomSimulation" page="component://manufacturing/widget/manufacturing/BomScreens.xml#BomSimulation" type="screen"/>
-
+    <view-map name="FindBom" page="component://manufacturing/widget/manufacturing/BomScreens.xml#FindBom" type="screen"/>
+    <view-map name="CreateProductBom" page="component://manufacturing/widget/manufacturing/BomScreens.xml#CreateProductBom" type="screen"/>
+    
     <!-- Costs view mappings -->
     <view-map name="EditCostCalcs" page="component://manufacturing/widget/manufacturing/CostScreens.xml#EditCostCalcs" type="screen"/>
 

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/BomForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/BomForms.xml?rev=727009&r1=727008&r2=727009&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/BomForms.xml (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/bom/BomForms.xml Tue Dec 16 02:28:17 2008
@@ -123,4 +123,53 @@
             <submit button-type="button"/>
         </field>
     </form>
+    <form name="findBom" type="single" target="FindBom" title="">
+        <field name="productId"><lookup target-form-name="LookupProduct"/></field>
+        <field name="productIdTo"><lookup target-form-name="LookupProduct"/></field>
+        <field name="productAssocTypeId"  title="${uiLabelMap.ManufacturingBomType}">
+            <drop-down allow-empty="true">
+                <option key="MANUF_COMPONENT" description="Manufacturing Bill of Materials"/>
+                <option key="ENGINEER_COMPONENT" description="Engineering Bill of Materials"/>
+            </drop-down>
+        </field>
+        <field name="fromDate"><date-find/></field>
+        <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't there then with all fields empty no query will be done --></field>
+        <field name="submit" title="${uiLabelMap.CommonFind}"><submit/></field>
+    </form>
+    <form name="ListBom"  type="list" list-name="listIt" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"  paginate-target="FindBom">
+        <actions>
+            <service service-name="performFind" result-map-name="result" result-map-list-name="listIt">
+                <field-map field-name="inputFields" env-name="parameters"/>
+                <field-map field-name="entityName" value="ProductAssoc"/>
+                <field-map field-name="orderBy" value="productId"/>
+            </service>
+        </actions>
+        <field name="productId" title="${uiLabelMap.ProductProductId}">
+            <hyperlink target="EditProductBom?productId=${productId}&amp;productAssocTypeId=${productAssocTypeId}" description="${productId}"/>
+        </field>
+        <field name="productIdTo" title="${uiLabelMap.ProductProductIdTo}">
+            <hyperlink target="EditProductBom?productId=${productIdTo}&amp;productAssocTypeId=${productAssocTypeId}" description="${productIdTo}"/>            
+        </field>
+        <field name="productAssocTypeId" title="${uiLabelMap.ManufacturingBomType}">
+            <display-entity entity-name="ProductAssocType" key-field-name="productAssocTypeId" description="${description}"/>
+        </field>
+        <field name="quantity" title="${uiLabelMap.CommonQuantity}"><display/></field>
+        <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><display type="date"/></field>
+    </form>
+    <form name="CreateProductBom" target="createProductBom" title="" type="single"
+        header-row-style="header-row" default-table-style="basic-table">
+        <field name="productId" title="${uiLabelMap.ProductProductId}"><lookup target-form-name="LookupProduct" size="16"/></field>
+        <field name="productIdTo" title="${uiLabelMap.ProductProductIdTo}"><lookup target-form-name="LookupProduct" size="16"/></field>
+        <field name="productAssocTypeId" title="${uiLabelMap.ManufacturingBomType}">
+            <drop-down>
+                <option key="MANUF_COMPONENT" description="Manufacturing Bill of Materials"/>
+                <option key="ENGINEER_COMPONENT" description="Engineering Bill of Materials"/>
+            </drop-down>
+        </field>
+        <field name="quantity" title="${uiLabelMap.ManufacturingQuantity}"><text size="6"/></field>
+        <field name="fromDate" title="${uiLabelMap.CommonFromDate}"><date-time/></field>
+        <field name="submitButton" title="${uiLabelMap.CommonSubmit}">
+            <submit button-type="button"/>
+        </field>
+    </form>
 </forms>
\ No newline at end of file

Modified: ofbiz/trunk/applications/manufacturing/webapp/manufacturing/includes/appheader.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/webapp/manufacturing/includes/appheader.ftl?rev=727009&r1=727008&r2=727009&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/includes/appheader.ftl (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/includes/appheader.ftl Tue Dec 16 02:28:17 2008
@@ -28,7 +28,7 @@
       <li<#if selected = "routingTask"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.ManufacturingRoutingTask}</a></li>
       <li<#if selected = "calendar"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.ManufacturingCalendar}</a></li>
       <li<#if selected = "costs"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.ManufacturingCostCalcs}</a></li>
-      <li<#if selected = "bom"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.ManufacturingBillOfMaterials}</a></li>
+      <li<#if selected = "bom"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.ManufacturingBillOfMaterials}</a></li>
       <li<#if selected = "mrp"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.ManufacturingMrp}</a></li>
       <li<#if selected = "ShipmentPlans"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.ManufacturingShipmentPlans}</a></li>
       <li<#if selected = "ManufacturingReports"> class="selected"</#if>><a href="<@o...@ofbizUrl>">${uiLabelMap.ManufacturingReports}</a></li>

Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/BomScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/BomScreens.xml?rev=727009&r1=727008&r2=727009&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/widget/manufacturing/BomScreens.xml (original)
+++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/BomScreens.xml Tue Dec 16 02:28:17 2008
@@ -54,7 +54,6 @@
                 <set field="tabButtonItem" value="EditProductBom"/>
                 <!--<set field="labelTitleProperty" value="ProductProductBom"/>-->
                 <set field="headerItem" value="bom"/>
-    
                 <set field="productId" from-field="parameters.productId"/>
                 <entity-one entity-name="Product" value-name="product"/>
                 <script location="component://manufacturing/webapp/manufacturing/WEB-INF/actions/bom/EditProductBom.groovy"/>
@@ -101,7 +100,7 @@
         <section>
             <actions>
                 <set field="titleProperty" value="ManufacturingBomSimulation"/>
-                <set field="tabButtonItem" value="findBom"/>
+                <set field="tabButtonItem" value="bomSimulation"/>
                 <set field="headerItem" value="bom"/>
 
                 <set field="bomType" from-field="parameters.bomType"/>
@@ -145,4 +144,55 @@
             </widgets>
         </section>
     </screen>
+    <screen name="FindBom">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleFindProductBom"/>
+                <set field="tabButtonItem" value="findBom"/>
+                <set field="labelTitleProperty" value="findBom"/>
+                <set field="headerItem" value="bom"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonBomDecorator">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.PageTitleFindBom}">
+                            <link target="CreateProductBom" text="${uiLabelMap.ManufacturingCreateBom}" style="buttontext"/>
+                            <include-form name="findBom" location="component://manufacturing/webapp/manufacturing/bom/BomForms.xml"/>
+                        </screenlet>
+                        <screenlet title="${uiLabelMap.PageTitleFindBom}">
+                            <include-form name="ListBom" location="component://manufacturing/webapp/manufacturing/bom/BomForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="CreateProductBom">
+        <section>
+            <actions>
+                <set field="titleProperty" value="ManufacturingCreateProductBom"/>
+                <set field="headerItem" value="bom"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <container style="screenlet">
+                            <container style="screenlet-title-bar">
+                                <container style="h3">
+                                    <label text="${uiLabelMap.ManufacturingCreateProductBom}"/>
+                                </container>
+                            </container>
+                            <container style="screenlet-body">
+                                <section>
+                                    <widgets>                                        
+                                        <include-form name="CreateProductBom" location="component://manufacturing/webapp/manufacturing/bom/BomForms.xml"/>
+                                    </widgets>
+                                </section>
+                            </container>
+                        </container>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
 </screens>

Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/Menus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/Menus.xml?rev=727009&r1=727008&r2=727009&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/widget/manufacturing/Menus.xml (original)
+++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/Menus.xml Tue Dec 16 02:28:17 2008
@@ -22,9 +22,12 @@
  xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd">
     
     <menu name="BomTabBar" extends="CommonTabBarMenu" extends-resource="component://common/widget/CommonMenus.xml">
-        <menu-item name="findBom" title="${uiLabelMap.ManufacturingBomSimulation}">
+        <menu-item name="findBom" title="${uiLabelMap.CommonFind}">
+            <link target="FindBom"/>
+        </menu-item>
+        <menu-item name="bomSimulation" title="${uiLabelMap.ManufacturingBomSimulation}">
             <link target="BomSimulation"/>
-        </menu-item>        
+        </menu-item> 
         <menu-item name="EditProductBom" title="${uiLabelMap.ManufacturingEditProductBom}">
             <link target="EditProductBom"/>
         </menu-item>