Author: jacopoc
Date: Mon Oct 16 10:13:37 2006 New Revision: 464572 URL: http://svn.apache.org/viewvc?view=rev&rev=464572 Log: Applied patch from Ricardo Chavez (OFBIZ-343) to move some WorkEffort generic services from the manufacturing to the workeffort component. Modified: incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/techdata/RoutingSimpleServices.xml incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_routing.xml incubator/ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.properties incubator/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml incubator/ofbiz/trunk/applications/workeffort/servicedef/services.xml Modified: incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml?view=diff&rev=464572&r1=464571&r2=464572 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml (original) +++ incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml Mon Oct 16 10:13:37 2006 @@ -294,56 +294,6 @@ </else> </if> </simple-method> - <simple-method method-name="createWorkEffortFixedAssetAssign" - short-description="Create a WorkEffort FixedAsset Assign"> - <check-permission permission="MANUFACTURING" action="_CREATE"> - <fail-property resource="ManufacturingUiLabels" property="ManufacturingCreatePermissionError"/> - </check-permission> - <check-errors /> - <entity-one entity-name="WorkEffortFixedAssetAssign" value-name="lookedUpValue" /> - <if-not-empty field-name="lookedUpValue"> - <add-error> - <fail-property resource="ManufacturingUiLabels" - property="ManufacturingWorkEffortFixedAssetAsgAlreadyExist"/> - </add-error> - <else> - <make-value entity-name="WorkEffortFixedAssetAssign" value-name="newWEFixedAssetAssign" /> - <set-pk-fields map-name="parameters" value-name="newWEFixedAssetAssign" /> - <set-nonpk-fields map-name="parameters" value-name="newWEFixedAssetAssign" /> - <!-- if the user hasn't specified a fromDate, set it from the actual start date of the task - if there is no actual start date, default to now (to the current date and time) --> - <if-empty map-name="parameters" field-name="fromDate"> - <entity-one entity-name="WorkEffort" value-name="prodRunTask" /> - <if-not-empty map-name="prodRunTask" field-name="actualStartDate"> - <set field="newWEFixedAssetAssign.fromDate" from-field="prodRunTask.actualStartDate" /> - <else> - <now-timestamp-to-env env-name="newWEFixedAssetAssign.fromDate"/> - </else> - </if-not-empty> - </if-empty> - <create-value value-name="newWEFixedAssetAssign" /> - </else> - </if-not-empty> - </simple-method> - <simple-method method-name="updateWorkEffortFixedAssetAssign" - short-description="Update an existing WorkEffort FixedAsset Assign"> - <check-permission permission="MANUFACTURING" action="_UPDATE"> - <fail-property resource="ManufacturingUiLabels" property="ManufacturingUpdatePermissionError"/> - </check-permission> - <check-errors /> - <entity-one entity-name="WorkEffortFixedAssetAssign" value-name="lookedUpValue" /> - <set-nonpk-fields map-name="parameters" value-name="lookedUpValue" /> - <store-value value-name="lookedUpValue" /> - </simple-method> - <simple-method method-name="removeWorkEffortFixedAssetAssign" - short-description="Remove a WorkEffort FixedAsset Assign"> - <check-permission permission="MANUFACTURING" action="_DELETE"> - <fail-property resource="ManufacturingUiLabels" property="ManufacturingDeletePermissionError"/> - </check-permission> - <check-errors /> - <entity-one entity-name="WorkEffortFixedAssetAssign" value-name="lookedUpValue" /> - <remove-value value-name="lookedUpValue" /> - </simple-method> </simple-methods> Modified: incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/techdata/RoutingSimpleServices.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/techdata/RoutingSimpleServices.xml?view=diff&rev=464572&r1=464571&r2=464572 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/techdata/RoutingSimpleServices.xml (original) +++ incubator/ofbiz/trunk/applications/manufacturing/script/org/ofbiz/manufacturing/techdata/RoutingSimpleServices.xml Mon Oct 16 10:13:37 2006 @@ -225,45 +225,4 @@ </if-not-empty> </simple-method> - <simple-method method-name="createWorkEffortFixedAssetStd" - short-description="Create a WorkEffort FixedAsset Standard"> - <check-permission permission="MANUFACTURING" action="_CREATE"> - <fail-property resource="ManufacturingUiLabels" property="ManufacturingCreatePermissionError"/> - </check-permission> - <check-errors /> - <entity-one entity-name="WorkEffortFixedAssetStd" value-name="lookedUpValue" /> - <if-not-empty field-name="lookedUpValue"> - <add-error> - <fail-property resource="ManufacturingUiLabels" - property="ManufacturingWorkEffortFixedAssetAlreadyExist"/> - </add-error> - <check-errors /> - <else> - <make-value entity-name="WorkEffortFixedAssetStd" value-name="newWEFixedAssetStd" /> - <set-pk-fields map-name="parameters" value-name="newWEFixedAssetStd" /> - <set-nonpk-fields map-name="parameters" value-name="newWEFixedAssetStd" /> - <create-value value-name="newWEFixedAssetStd" /> - </else> - </if-not-empty> - </simple-method> - <simple-method method-name="updateWorkEffortFixedAssetStd" - short-description="Update an existing WorkEffort FixedAsset Standard"> - <check-permission permission="MANUFACTURING" action="_UPDATE"> - <fail-property resource="ManufacturingUiLabels" property="ManufacturingUpdatePermissionERror"/> - </check-permission> - <check-errors /> - <entity-one entity-name="WorkEffortFixedAssetStd" value-name="lookedUpValue" /> - <set-nonpk-fields map-name="parameters" value-name="lookedUpValue" /> - <store-value value-name="lookedUpValue" /> - </simple-method> - <simple-method method-name="removeWorkEffortFixedAssetStd" - short-description="Delete a WorkEffort FixedAsset Standard"> - <check-permission permission="MANUFACTURING" action="_DELETE"> - <fail-property resource="ManufacturingUiLabels" property="ManufacturingDeletePermissionError"/> - </check-permission> - <check-errors /> - <entity-one entity-name="WorkEffortFixedAssetStd" value-name="lookedUpValue" /> - <remove-value value-name="lookedUpValue" /> - </simple-method> - </simple-methods> Modified: incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml?view=diff&rev=464572&r1=464571&r2=464572 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml (original) +++ incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_production_run.xml Mon Oct 16 10:13:37 2006 @@ -300,30 +300,4 @@ <attribute mode="IN" name="workEffortId" optional="false" type="String"/> <attribute mode="OUT" name="totalCost" optional="false" type="BigDecimal"/> </service> - <service name="createWorkEffortFixedAssetAssign" engine="simple" auth="true" - default-entity-name="WorkEffortFixedAssetAssign" - location="org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml" - invoke="createWorkEffortFixedAssetAssign"> - <description>Create a WorkEffortFixedAssetAssign entry to associate a fixed asset - with a production run task</description> - <auto-attributes include="pk" mode="IN" optional="false" /> - <auto-attributes include="nonpk" mode="IN" optional="true" /> - <override name="fromDate" optional="true" /> - </service> - <service name="updateWorkEffortFixedAssetAssign" engine="simple" auth="true" - default-entity-name="WorkEffortFixedAssetAssign" - location="org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml" - invoke="updateWorkEffortFixedAssetAssign"> - <description>Update an existing WorkEffortFixedAssetAssign entry</description> - <auto-attributes include="pk" mode="IN" optional="false" /> - <auto-attributes include="nonpk" mode="IN" optional="true" /> - </service> - <service name="removeWorkEffortFixedAssetAssign" engine="simple" auth="true" - default-entity-name="WorkEffortFixedAssetAssign" - location="org/ofbiz/manufacturing/jobshopmgt/ProductionRunServices.xml" - invoke="removeWorkEffortFixedAssetAssign"> - <description>Remove a WorkEffortFixedAssign entry, which removes the association between a fixed asset - and a production run task</description> - <auto-attributes include="pk" mode="IN" optional="false" /> - </service> </services> Modified: incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_routing.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_routing.xml?view=diff&rev=464572&r1=464571&r2=464572 ============================================================================== --- incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_routing.xml (original) +++ incubator/ofbiz/trunk/applications/manufacturing/servicedef/services_routing.xml Mon Oct 16 10:13:37 2006 @@ -60,29 +60,4 @@ <attribute mode="OUT" name="setupTime" type="Double" optional="true"/> <attribute mode="OUT" name="taskUnitTime" type="Double" optional="true"/> </service> - <service name="createWorkEffortFixedAssetStd" engine="simple" auth="true" - default-entity-name="WorkEffortFixedAssetStd" - location="org/ofbiz/manufacturing/techdata/RoutingSimpleServices.xml" - invoke="createWorkEffortFixedAssetStd"> - <description>Creates a WorkEffortFixedAssetStd entry to associate a routing task - with a fixed asset (type)</description> - <auto-attributes include="pk" mode="IN" optional="false"/> - <auto-attributes include="nonpk" mode="IN" optional="true"/> - </service> - <service name="updateWorkEffortFixedAssetStd" engine="simple" auth="true" - default-entity-name="WorkEffortFixedAssetStd" - location="org/ofbiz/manufacturing/techdata/RoutingSimpleServices.xml" - invoke="updateWorkEffortFixedAssetStd"> - <description>Updates an existing WorkEffortFixedAssetStd entry</description> - <auto-attributes include="pk" mode="IN" optional="false"/> - <auto-attributes include="nonpk" mode="IN" optional="true"/> - </service> - <service name="removeWorkEffortFixedAssetStd" engine="simple" auth="true" - default-entity-name="WorkEffortFixedAssetStd" - location="org/ofbiz/manufacturing/techdata/RoutingSimpleServices.xml" - invoke="removeWorkEffortFixedAssetStd"> - <description>Removes a WorkEffortFixedAssetStd, thus removing the association between a routing task - and a fixed asset (type)</description> - <auto-attributes include="pk" mode="IN" optional="false" /> - </service> </services> Modified: incubator/ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.properties URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.properties?view=diff&rev=464572&r1=464571&r2=464572 ============================================================================== --- incubator/ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.properties (original) +++ incubator/ofbiz/trunk/applications/workeffort/config/WorkEffortUiLabels.properties Mon Oct 16 10:13:37 2006 @@ -327,6 +327,10 @@ WorkEffortNotes = Notes +WorkEffortCreatePermissionError=Security Error: to run this operation you must have the WORKEFFORTMGR_CREATE or WORKEFFORTMGR_ADMIN permission +WorkEffortUpdatePermissionError=Security Error: to run this operation you must have the WORKEFFORTMGR_UPDATE or WORKEFFORTMGR_ADMIN permission +WorkEffortDeletePermissionError=Security Error: to run this operation you must have the WORKEFFORTMGR_DELETE or WORKEFFORTMGR_ADMIN permission + FormFieldTitle_workEffortId=Work Effort Id FormFieldTitle_priority=Priority FormFieldTitle_scopeEnumId=Scope Modified: incubator/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml?view=diff&rev=464572&r1=464571&r2=464572 ============================================================================== --- incubator/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml (original) +++ incubator/ofbiz/trunk/applications/workeffort/script/org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml Mon Oct 16 10:13:37 2006 @@ -798,4 +798,94 @@ <set from-field="workEffort.estimatedCompletionDate" field="newEntity.thruDate"/> <create-value value-name="newEntity"/> </simple-method> + + <!-- WorkEffort-FixedAsset --> + <simple-method method-name="createWorkEffortFixedAssetStd" + short-description="Create a WorkEffort FixedAsset Standard"> + <check-permission permission="WORKEFFORTMGR" action="_CREATE"> + <fail-property resource="WorkEffortUiLabels" property="WorkEffortCreatePermissionError"/> + </check-permission> + <check-errors /> + <entity-one entity-name="WorkEffortFixedAssetStd" value-name="lookedUpValue" /> + <if-not-empty field-name="lookedUpValue"> + <add-error> + <fail-property resource="WorkEffortUiLabels" property="WorkEffortWorkEffortFixedAssetAlreadyExist"/> + </add-error> + <check-errors /> + <else> + <make-value entity-name="WorkEffortFixedAssetStd" value-name="newWEFixedAssetStd" /> + <set-pk-fields map-name="parameters" value-name="newWEFixedAssetStd" /> + <set-nonpk-fields map-name="parameters" value-name="newWEFixedAssetStd" /> + <create-value value-name="newWEFixedAssetStd" /> + </else> + </if-not-empty> + </simple-method> + <simple-method method-name="updateWorkEffortFixedAssetStd" + short-description="Update an existing WorkEffort FixedAsset Standard"> + <check-permission permission="WORKEFFORTMGR" action="_UPDATE"> + <fail-property resource="WorkEffortUiLabels" property="WorkEffortUpdatePermissionERror"/> + </check-permission> + <check-errors /> + <entity-one entity-name="WorkEffortFixedAssetStd" value-name="lookedUpValue" /> + <set-nonpk-fields map-name="parameters" value-name="lookedUpValue" /> + <store-value value-name="lookedUpValue" /> + </simple-method> + <simple-method method-name="removeWorkEffortFixedAssetStd" + short-description="Delete a WorkEffort FixedAsset Standard"> + <check-permission permission="WORKEFFORTMGR" action="_DELETE"> + <fail-property resource="WorkEffortUiLabels" property="WorkEffortDeletePermissionError"/> + </check-permission> + <check-errors /> + <entity-one entity-name="WorkEffortFixedAssetStd" value-name="lookedUpValue" /> + <remove-value value-name="lookedUpValue" /> + </simple-method> + <simple-method method-name="createWorkEffortFixedAssetAssign" + short-description="Create a WorkEffort FixedAsset Assign"> + <check-permission permission="WORKEFFORTMGR" action="_CREATE"> + <fail-property resource="WorkEffortUiLabels" property="WorkEffortCreatePermissionError"/> + </check-permission> + <check-errors /> + <entity-one entity-name="WorkEffortFixedAssetAssign" value-name="lookedUpValue" /> + <if-not-empty field-name="lookedUpValue"> + <add-error> + <fail-property resource="WorkEffortUiLabels" property="WorkEffortWorkEffortFixedAssetAsgAlreadyExist"/> + </add-error> + <else> + <make-value entity-name="WorkEffortFixedAssetAssign" value-name="newWEFixedAssetAssign" /> + <set-pk-fields map-name="parameters" value-name="newWEFixedAssetAssign" /> + <set-nonpk-fields map-name="parameters" value-name="newWEFixedAssetAssign" /> + <!-- if the user hasn't specified a fromDate, set it from the actual start date of the task + if there is no actual start date, default to now (to the current date and time) --> + <if-empty map-name="parameters" field-name="fromDate"> + <entity-one entity-name="WorkEffort" value-name="prodRunTask" /> + <if-not-empty map-name="prodRunTask" field-name="actualStartDate"> + <set field="newWEFixedAssetAssign.fromDate" from-field="prodRunTask.actualStartDate" /> + <else> + <now-timestamp-to-env env-name="newWEFixedAssetAssign.fromDate"/> + </else> + </if-not-empty> + </if-empty> + <create-value value-name="newWEFixedAssetAssign" /> + </else> + </if-not-empty> + </simple-method> + <simple-method method-name="updateWorkEffortFixedAssetAssign" + short-description="Update an existing WorkEffort FixedAsset Assign"> + <check-permission permission="WORKEFFORTMGR" action="_UPDATE"> + <fail-property resource="WorkEffortUiLabels" property="WorkEffortUpdatePermissionError"/> + </check-permission> + <check-errors /> + <entity-one entity-name="WorkEffortFixedAssetAssign" value-name="lookedUpValue" /> + <set-nonpk-fields map-name="parameters" value-name="lookedUpValue" /> + <store-value value-name="lookedUpValue" /> + </simple-method> + <simple-method method-name="removeWorkEffortFixedAssetAssign" + short-description="Remove a WorkEffort FixedAsset Assign"> + <check-permission permission="WORKEFFORTMGR" action="_DELETE"> + <fail-property resource="WorkEffortUiLabels" property="WorkEffortDeletePermissionError"/> + </check-permission> + <check-errors /> + <entity-one entity-name="WorkEffortFixedAssetAssign" value-name="lookedUpValue" /> + <remove-value value-name="lookedUpValue" /> + </simple-method> </simple-methods> Modified: incubator/ofbiz/trunk/applications/workeffort/servicedef/services.xml URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/workeffort/servicedef/services.xml?view=diff&rev=464572&r1=464571&r2=464572 ============================================================================== --- incubator/ofbiz/trunk/applications/workeffort/servicedef/services.xml (original) +++ incubator/ofbiz/trunk/applications/workeffort/servicedef/services.xml Mon Oct 16 10:13:37 2006 @@ -356,4 +356,56 @@ <description>Based on task's estimate dates, write assign entries for the fixed asset the task is assigned to</description> <attribute mode="IN" name="workEffortId" optional="false" type="String"/> </service> + <!-- WorkEffort-FixedAsset management services --> + <service name="createWorkEffortFixedAssetStd" engine="simple" auth="true" + default-entity-name="WorkEffortFixedAssetStd" + location="org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml" + invoke="createWorkEffortFixedAssetStd"> + <description>Creates a WorkEffortFixedAssetStd entry to associate a routing task + with a fixed asset (type)</description> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + </service> + <service name="updateWorkEffortFixedAssetStd" engine="simple" auth="true" + default-entity-name="WorkEffortFixedAssetStd" + location="org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml" + invoke="updateWorkEffortFixedAssetStd"> + <description>Updates an existing WorkEffortFixedAssetStd entry</description> + <auto-attributes include="pk" mode="IN" optional="false"/> + <auto-attributes include="nonpk" mode="IN" optional="true"/> + </service> + <service name="removeWorkEffortFixedAssetStd" engine="simple" auth="true" + default-entity-name="WorkEffortFixedAssetStd" + location="org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml" + invoke="removeWorkEffortFixedAssetStd"> + <description>Removes a WorkEffortFixedAssetStd, thus removing the association between a routing task + and a fixed asset (type)</description> + <auto-attributes include="pk" mode="IN" optional="false" /> + </service> + <service name="createWorkEffortFixedAssetAssign" engine="simple" auth="true" + default-entity-name="WorkEffortFixedAssetAssign" + location="org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml" + invoke="createWorkEffortFixedAssetAssign"> + <description>Create a WorkEffortFixedAssetAssign entry to associate a fixed asset + with a work effort (e.g. a production run task)</description> + <auto-attributes include="pk" mode="IN" optional="false" /> + <auto-attributes include="nonpk" mode="IN" optional="true" /> + <override name="fromDate" optional="true" /> + </service> + <service name="updateWorkEffortFixedAssetAssign" engine="simple" auth="true" + default-entity-name="WorkEffortFixedAssetAssign" + location="org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml" + invoke="updateWorkEffortFixedAssetAssign"> + <description>Update an existing WorkEffortFixedAssetAssign entry</description> + <auto-attributes include="pk" mode="IN" optional="false" /> + <auto-attributes include="nonpk" mode="IN" optional="true" /> + </service> + <service name="removeWorkEffortFixedAssetAssign" engine="simple" auth="true" + default-entity-name="WorkEffortFixedAssetAssign" + location="org/ofbiz/workeffort/workeffort/WorkEffortSimpleServices.xml" + invoke="removeWorkEffortFixedAssetAssign"> + <description>Remove a WorkEffortFixedAssign entry, which removes the association between a fixed asset + and a work effort (e.g. a production run task)</description> + <auto-attributes include="pk" mode="IN" optional="false" /> + </service> </services> |
Free forum by Nabble | Edit this page |