Commit a5e9295b authored by Tatuya Kamada's avatar Tatuya Kamada

Revert r38738, 38737, 38736.

For fix the bug, we do not care the backward compatibility because movement_resource_interaction_workflow created for fix an existed bug and introduced a new feature. This means that movement_resource_interaction_workflow has not fixed the bug completly. So, we can think another better way.(which no need to do hardcoding).


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38741 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 817c83b3
......@@ -75,7 +75,6 @@ class DeliveryLine(Movement, XMLObject, XMLMatrix, Variated,
# Multiple inheritance definition
updateRelatedContent = XMLMatrix.updateRelatedContent
# Force in _edit to modify variation_base_category_list first
security.declarePrivate( '_edit' )
def _edit(self, REQUEST=None, force_update = 0, **kw):
......@@ -86,33 +85,8 @@ class DeliveryLine(Movement, XMLObject, XMLMatrix, Variated,
# If variations and resources are set at the same time, resource must be
# set before any variation.
# Also, resource must be set before the categories: use, quantity_unit, base_contribution.
# Because we use the resource to set the *default* category values in
# movement_resource_interaction_worfklow, and we want to set the *proper*
# category values when they are existed in the **kw parameter.
# Thereby we set the resource first, then, set the rest.
if kw.has_key('resource_value_list'):
self._setResourceValueList( kw['resource_value_list'] )
elif kw.has_key('resource_value_set'):
self._setResourceValueSet( kw['resource_value_set'] )
elif kw.has_key('resouce_value'):
if kw.has_key('resource_value'):
self._setResourceValue( kw['resource_value'] )
# We also take care the resource, as well as resource_value. For example in builders,
# we usually set resource instead of resource_value.
if kw.has_key('resource_list'):
self._setResourceList( kw['resource_list'] )
elif kw.has_key('resource_set'):
self._setResourceSet( kw['resource_set'])
elif kw.has_key('resource'):
self._setResource( kw['resource'] )
# also resource_uid
if kw.has_key('resource_uid_list'):
self._setResourceUidList( kw['resource_uid_list'] )
elif kw.has_key('resource_uid_set'):
self._setResourceUidSet( kw['resource_uid_set'])
elif kw.has_key('resource_uid'):
self._setResourceUid( kw['resource_uid'] )
# We must first prepare the variation_base_category_list before we do the edit of the rest
#LOG('in edit', 0, str(kw))
if kw.has_key('variation_base_category_list'):
......
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