Commit aab8c38d authored by Tatuya Kamada's avatar Tatuya Kamada

2010-09-28 tatuya

* Stop overwriting a value by movement_resource_interaraction_workflow when the categories are already set a valid value as the new resource.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38742 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a5e9295b
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -57,7 +54,12 @@ ...@@ -57,7 +54,12 @@
\n \n
resource = movement.getResourceValue()\n resource = movement.getResourceValue()\n
if resource is not None:\n if resource is not None:\n
movement.setBaseContributionList(resource.getBaseContributionList())\n # if the movement already have a base contribution which is valid for this resource, don\'t change it\n
movement_base_contribution = movement.getBaseContribution()\n
if movement_base_contribution and movement_base_contribution in resource.getBaseContributionList():\n
return\n
# otherwise initialise to the default base contribution\n
movement.setBaseContribution(resource.getDefaultBaseContribution())\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -108,6 +110,7 @@ if resource is not None:\n ...@@ -108,6 +110,7 @@ if resource is not None:\n
<string>_getattr_</string> <string>_getattr_</string>
<string>resource</string> <string>resource</string>
<string>None</string> <string>None</string>
<string>movement_base_contribution</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -57,6 +54,11 @@ ...@@ -57,6 +54,11 @@
\n \n
resource = movement.getResourceValue()\n resource = movement.getResourceValue()\n
if resource is not None:\n if resource is not None:\n
# if the movement already have a quantity unit which is valid for this resource, don\'t change it\n
movement_quantity_unit = movement.getQuantityUnit()\n
if movement_quantity_unit and movement_quantity_unit in resource.getQuantityUnitList():\n
return\n
# otherwise initialise to the default quantity unit\n
movement.setQuantityUnit(resource.getDefaultQuantityUnit())\n movement.setQuantityUnit(resource.getDefaultQuantityUnit())\n
</string> </value> </string> </value>
</item> </item>
...@@ -108,6 +110,7 @@ if resource is not None:\n ...@@ -108,6 +110,7 @@ if resource is not None:\n
<string>_getattr_</string> <string>_getattr_</string>
<string>resource</string> <string>resource</string>
<string>None</string> <string>None</string>
<string>movement_quantity_unit</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -57,6 +54,11 @@ ...@@ -57,6 +54,11 @@
\n \n
resource = movement.getResourceValue()\n resource = movement.getResourceValue()\n
if resource is not None:\n if resource is not None:\n
# if the movement already have a use which is valid for this resource, don\'t change it\n
movement_use = movement.getUse()\n
if movement_use and movement_use in resource.getUseList():\n
return\n
# otherwise initialise to the default use\n
movement.setUse(resource.getDefaultUse())\n movement.setUse(resource.getDefaultUse())\n
</string> </value> </string> </value>
</item> </item>
...@@ -108,6 +110,7 @@ if resource is not None:\n ...@@ -108,6 +110,7 @@ if resource is not None:\n
<string>_getattr_</string> <string>_getattr_</string>
<string>resource</string> <string>resource</string>
<string>None</string> <string>None</string>
<string>movement_use</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
2010-09-28 tatuya
* Stop overwriting a value by movement_resource_interaraction_workflow when the categories are already set a valid value as the new resource.
2010-09-28 tatuya 2010-09-28 tatuya
* Previous commits(r38692,38707) were not solved the issue that movement_resource_interaction_workflow prevents the delivery buliding. So, revert them. * Previous commits(r38692,38707) were not solved the issue that movement_resource_interaction_workflow prevents the delivery buliding. So, revert them.
......
866 867
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment