svn commit: r1589869 - in /ofbiz/trunk/applications/manufacturing: config/ data/ script/org/ofbiz/manufacturing/jobshopmgt/ servicedef/ webapp/manufacturing/WEB-INF/ widget/manufacturing/

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

svn commit: r1589869 - in /ofbiz/trunk/applications/manufacturing: config/ data/ script/org/ofbiz/manufacturing/jobshopmgt/ servicedef/ webapp/manufacturing/WEB-INF/ widget/manufacturing/

jleroux@apache.org
Author: jleroux
Date: Thu Apr 24 20:23:44 2014
New Revision: 1589869

URL: http://svn.apache.org/r1589869
Log:
A patch from Pierre Smits for "Scrum component contains private email addresses" https://issues.apache.org/jira/browse/OFBIZ-5623

In current feature set of the manufacturing compoment it is possible to set 'create dependent production run(s). This function will create the dependent production runs and have these shown in the production run.

In other scenario's of managing production runs it is not possible to associate one production run to another in the component. Although it might be needed/required. In order to do this now the user must (at least):
# have direct access to the workflow component (with appropriate permissions)
# look for the correct workeffort
# go to the children tab of the workeffort
# set the association

The improvement will be that the user of the manufacturing component will be able to define (in said component) the association between production runs.

Modified:
    ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.xml
    ofbiz/trunk/applications/manufacturing/data/ManufacturingData.xml
    ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml
    ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml
    ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
    ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
    ofbiz/trunk/applications/manufacturing/widget/manufacturing/ManufacturingMenus.xml
    ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml

Modified: ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.xml?rev=1589869&r1=1589868&r2=1589869&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.xml (original)
+++ ofbiz/trunk/applications/manufacturing/config/ManufacturingUiLabels.xml Thu Apr 24 20:23:44 2014
@@ -2359,6 +2359,10 @@
         <value xml:lang="zh">初始化低级别代码</value>
         <value xml:lang="zh_TW">初始化低級別代碼</value>
     </property>
+    <property key="ManufacturingLinkProductionRun">
+        <value xml:lang="en">Link to Production Run</value>
+        <value xml:lang="nl">Aan productierun koppelen</value>
+    </property>
     <property key="ManufacturingListCalendarWeek">
         <value xml:lang="de">Kalenderwochen anzeigen</value>
         <value xml:lang="en">List of weeks</value>
@@ -2699,7 +2703,7 @@
     </property>
     <property key="ManufacturingMaterialsNotAvailable">
         <value xml:lang="de">Materialien nicht im Lager vorhanden ${productId}: ${parameters.quantityNotIssued}</value>
-        <value xml:lang="en">Materials Not Available in Warehouse ${productId}: ${parameters.quantityNotIssued}</value>
+        <value xml:lang="en">Materials Not Available in Warehouse: ID ${productId} -  ${internalName}: ${parameters.quantityNotIssued}</value>
         <value xml:lang="es">Materiales no disponibles en almacén ${productId}: ${parameters.quantityNotIssued}</value>
         <value xml:lang="fr">Matériaux non disponibles dans l'entrepôt ${productId}: ${parameters.quantityNotIssued}</value>
         <value xml:lang="it">Materiali non disponibili a magazzino ${productId}: ${parameters.quantityNotIssued}</value>
@@ -3666,6 +3670,7 @@
         <value xml:lang="fr">Réf. de l'ordre de fabrication</value>
         <value xml:lang="it">Ordine di produzione</value>
         <value xml:lang="ja">生産実行ID</value>
+        <value xml:lang="nl">ID Productierun</value>
         <value xml:lang="pt_BR">Id de execução de produção</value>
         <value xml:lang="ro">Cod Comanda de Productie</value>
         <value xml:lang="th">รหัสการผลิต</value>
@@ -5666,4 +5671,8 @@
         <value xml:lang="zh">查找虚拟产品</value>
         <value xml:lang="zh_TW">查找虛擬產品</value>
     </property>
+    <property key="PagetitleProductionRunLink">
+        <value xml:lang="en">Link Production Run</value>
+        <value xml:lang="nl">Productierun koppelen</value>
+    </property>
 </resource>

Modified: ofbiz/trunk/applications/manufacturing/data/ManufacturingData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/data/ManufacturingData.xml?rev=1589869&r1=1589868&r2=1589869&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/data/ManufacturingData.xml (original)
+++ ofbiz/trunk/applications/manufacturing/data/ManufacturingData.xml Thu Apr 24 20:23:44 2014
@@ -46,5 +46,9 @@ under the License.
     <!-- Formulae -->
     <CustomMethodType customMethodTypeId="TASK_FORMULA" description="Formula for calculating time estimates for tasks"/>
     <CustomMethodType customMethodTypeId="BOM_FORMULA" description="Formula for calculating material estimates for boms"/>
+    
+    <!-- ProductionRun sequence type -->
+    <Enumeration description="Predecessor" enumCode="PREDECESSOR" enumId="WF_PREDECESSOR" enumTypeId="WORKFLOW" sequenceId="1"/>
+    <Enumeration description="Successor" enumCode="SUCCESSOR" enumId="WF_SUCCESSOR" enumTypeId="WORKFLOW" sequenceId="2"/>
 
 </entity-engine-xml>

Modified: ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml?rev=1589869&r1=1589868&r2=1589869&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml (original)
+++ ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml Thu Apr 24 20:23:44 2014
@@ -21,6 +21,21 @@ under the License.
 <simple-methods xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/simple-methods-v2.xsd">
 
+    <simple-method method-name="createProductionRunAssoc" short-description="Associate the production run to another production run">
+        
+        <if-compare field="parameters.workFlowSequenceTypeId" operator="equals" value="WF_PREDECESSOR">
+            <set field="ctx.workEffortIdFrom" from-field="parameters.productionRunIdTo"/>
+            <set field="ctx.workEffortIdTo" from-field="parameters.productionRunId"/>
+        </if-compare>
+        <if-compare field="parameters.workFlowSequenceTypeId" operator="equals" value="WF_SUCCESSOR">
+            <set field="ctx.workEffortIdFrom" from-field="parameters.productionRunId"/>
+            <set field="ctx.workEffortIdTo" from-field="parameters.productionRunIdTo"/>
+        </if-compare>
+        
+        <set field="ctx.workEffortAssocTypeId" value="WORK_EFF_PRECEDENCY"/>
+        <call-service service-name="createWorkEffortAssoc" in-map-name="ctx"/>
+    </simple-method>
+    
     <!-- Warehouse -->
     <simple-method method-name="issueProductionRunTask" short-description="Issues the Inventory for a Production Run Task" login-required="false">
         <entity-one entity-name="WorkEffort" value-field="workEffort"/>
@@ -159,7 +174,7 @@ under the License.
                 <if>
                     <condition>
                         <or>
-                            <if-empty field="parameters.failIfItemsAreNotOnHand"/>
+                            <if-compare field="parameters.failIfItemsAreNotAvailable" operator="equals" value="Y" type="String"/>
                             <if-compare field="parameters.failIfItemsAreNotOnHand" operator="equals" value="Y" type="String"/>
                         </or>
                     </condition>

Modified: ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml?rev=1589869&r1=1589868&r2=1589869&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml (original)
+++ ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml Thu Apr 24 20:23:44 2014
@@ -38,6 +38,15 @@ under the License.
         <attribute name="productionRunId" type="String" mode="OUT" optional="false"/>
         <attribute name="estimatedCompletionDate" type="java.sql.Timestamp" mode="OUT" optional="true"/>
     </service>
+    <service name="createProductionRunAssoc" engine="simple"
+                location="component://manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml" invoke="createProductionRunAssoc" auth="false">
+        <description>
+            Associate the production run to another production run
+        </description>
+        <attribute name="productionRunId" type="String" mode="IN" optional="false"/>
+        <attribute name="productionRunIdTo" type="String" mode="IN" optional="false"/>
+        <attribute name="workFlowSequenceTypeId" type="String" mode="IN" optional="false"/>
+    </service>
     <service name="createProductionRunsForProductBom" engine="java"
             location="org.ofbiz.manufacturing.jobshopmgt.ProductionRunServices" invoke="createProductionRunsForProductBom" auth="true">
         <description>Explodes a product id and creates all the needed production runs.</description>
@@ -233,6 +242,7 @@ under the License.
         <attribute name="quantityUomId" type="String" mode="IN" optional="true"/>
         <attribute name="inventoryItemTypeId" type="String" mode="IN" optional="true"/>
         <attribute name="lotId" type="String" mode="IN" optional="true"/>
+        <attribute name="locationSeqId" type="String" mode="IN" optional="true"/>
         <attribute name="createLotIfNeeded" type="Boolean" mode="IN" optional="true"/>
         <attribute name="autoCreateLot" type="Boolean" mode="IN" optional="true"/>
     </service>
@@ -246,6 +256,7 @@ under the License.
         <attribute name="quantity" type="BigDecimal" mode="INOUT" optional="false"/>
         <attribute name="quantityUomId" type="String" mode="IN" optional="true"/>
         <attribute name="inventoryItemTypeId" type="String" mode="IN" optional="true"/>
+        <attribute name="locationSeqId" type="String" mode="IN" optional="true"/>
         <attribute name="lotId" type="String" mode="IN" optional="true"/>
         <attribute name="createLotIfNeeded" type="Boolean" mode="IN" optional="true"/>
         <attribute name="autoCreateLot" type="Boolean" mode="IN" optional="true"/>
@@ -260,6 +271,7 @@ under the License.
         <attribute name="productId" type="String" mode="IN" optional="false"/>
         <attribute name="quantity" type="BigDecimal" mode="IN" optional="false"/>
         <attribute name="facilityId" type="String" mode="IN" optional="true"/>
+        <attribute name="locationSeqId" type="String" mode="IN" optional="true"/>
         <attribute name="unitCost" type="BigDecimal" mode="IN" optional="true"/>
         <attribute name="currencyUomId" type="String" mode="IN" optional="true"/>
         <attribute name="inventoryItemTypeId" type="String" mode="IN" optional="true"/>

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=1589869&r1=1589868&r2=1589869&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml Thu Apr 24 20:23:44 2014
@@ -432,7 +432,7 @@ under the License.
     </request-map>
     <request-map uri="createProductionRun">
         <security https="true" auth="true"/>
-        <event type="simple" path="component://manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml" invoke="createProductionRun"/>        
+        <event type="simple" path="component://manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunSimpleEvents.xml" invoke="createProductionRun"/>
         <response name="createProductionRunsForProductBom" type="request" value="createProductionRunsForProductBom"/>
         <response name="createProductionRunSingle" type="request" value="createProductionRunSingle"/>
     </request-map>
@@ -463,6 +463,15 @@ under the License.
         <security https="true" auth="true"/>
         <response name="success" type="view" value="PrintProductionRun"/>
     </request-map>
+    <request-map uri="LinkProductionRun">
+        <security https="true" auth="true"/>
+        <response name="success" type="view" value="LinkProductionRun"/>
+    </request-map>
+    <request-map uri="createProductionRunAssoc">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createProductionRunAssoc"/>
+        <response name="success" type="view" value="ProductionRunAssocs"/>
+    </request-map>
     <request-map uri="ManufacturingReports">
         <security https="true" auth="true"/>
         <response name="success" type="view" value="ManufacturingReports"/>
@@ -800,6 +809,7 @@ under the License.
     <view-map name="CreateProductionRun" page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#CreateProductionRun" type="screen"/>
     <view-map name="FindProductionRun" page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#FindProductionRun" type="screen"/>
     <view-map name="EditProductionRun" page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#EditProductionRun" type="screen"/>
+    <view-map name="LinkProductionRun" page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#LinkProductionRun" type="screen"/>
     <view-map name="PrintProductionRun" type="screenfop" page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#ProductionRunPdf" content-type="application/pdf" encoding="none"/>
     <view-map name="ProductionRunDeclaration" page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#ProductionRunDeclaration" type="screen"/>
     <view-map name="ProductionRunCosts" page="component://manufacturing/widget/manufacturing/JobshopScreens.xml#ProductionRunCosts" type="screen"/>

Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml?rev=1589869&r1=1589868&r2=1589869&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml (original)
+++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/JobshopScreens.xml Thu Apr 24 20:23:44 2014
@@ -156,7 +156,6 @@ under the License.
             <actions>
                 <set field="titleProperty" value="ManufacturingProductionRunDeclaration"/>
                 <set field="tabButtonItem" value="declaration"/>
-                <!--<set field="labelTitleProperty" value="ProductProductBom"/>-->
                 <set field="headerItem" value="jobshop"/>
                 <set field="viewIndex" from-field="parameters.VIEW_INDEX" type="Integer"/>
                 <property-to-field resource="widget" property="widget.form.defaultViewSize" field="viewSizeDefaultValue"/>
@@ -527,6 +526,28 @@ under the License.
             </widgets>
         </section>
     </screen>
+    <screen name="LinkProductionRun">
+        <section>
+            <actions>
+                <set field="titleProperty" value="PageTitleProductionRunLink"/>
+                <set field="tabButtonItem" value="assocs"/>
+                <set field="headerItem" value="jobshop"/>
+                <set field="productionRunId" from-field="parameters.productionRunId"/>
+                <entity-one entity-name="WorkEffort" value-field="productionRun">
+                    <field-map field-name="workEffortId" from-field="productionRunId"/>
+                </entity-one>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonJobshopDecorator" location="${parameters.commonJobshopDecorator}">
+                    <decorator-section name="body">
+                        <screenlet title="${uiLabelMap.PageTitleProductionRunLink}">
+                            <include-form name="linkProductionRun" location="component://manufacturing/widget/manufacturing/ProductionRunForms.xml"/>
+                        </screenlet>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
     <screen name="FindProductionRun">
         <section>
             <actions>

Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/ManufacturingMenus.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/ManufacturingMenus.xml?rev=1589869&r1=1589868&r2=1589869&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/widget/manufacturing/ManufacturingMenus.xml (original)
+++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/ManufacturingMenus.xml Thu Apr 24 20:23:44 2014
@@ -274,6 +274,11 @@ under the License.
                 <parameter param-name="statusId" value="PRUN_SCHEDULED"/>
             </link>
         </menu-item>
+        <menu-item name="link" title="${uiLabelMap.ManufacturingLinkProductionRun}">
+            <link target="LinkProductionRun">
+                <parameter param-name="productionRunId"/>
+            </link>
+        </menu-item>
         <menu-item name="print" title="${uiLabelMap.CommonPrint}">
             <link target="PrintProductionRun" target-window="_BLANK">
                 <parameter param-name="productionRunId"/>

Modified: ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml?rev=1589869&r1=1589868&r2=1589869&view=diff
==============================================================================
--- ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml (original)
+++ ofbiz/trunk/applications/manufacturing/widget/manufacturing/ProductionRunForms.xml Thu Apr 24 20:23:44 2014
@@ -829,7 +829,7 @@ under the License.
         header-row-style="header-row" default-table-style="basic-table">
         <field name="productionRunId"><hidden/></field>
         <field name="workEffortAssocTypeId"><hidden value="WORK_EFF_PRECEDENCY"/></field>
-        <field name="productionRunIdTo">
+        <field name="productionRunIdTo"  title="${uiLabelMap.ManufacturingProductionRunId}">
             <drop-down allow-empty="false">
                 <entity-options entity-name="WorkEffort" key-field-name="workEffortId" description="[ID: ${workEffortId}] - ${workEffortName}">
                     <entity-constraint name="workEffortPurposeTypeId" value="WEPT_PRODUCTION_RUN"/>
@@ -837,12 +837,7 @@ under the License.
                 </entity-options>
             </drop-down>
         </field>
-        <!--
-        <field name="productionRunLookup">
-            <lookup target-form-name="LookupProductRun"/>
-        </field>
-         -->
-        <field name="workFlowSequenceTypeId">
+        <field name="workFlowSequenceTypeId"  title="${uiLabelMap.CommonType}">
             <drop-down allow-empty="false">
                 <entity-options entity-name="Enumeration" key-field-name="enumId" description="${description}">
                     <entity-constraint name="enumTypeId" value="WORKFLOW"/>