Commit 50035c17 authored by Sebastien Robin's avatar Sebastien Robin

check if object simulated before propagate resource to sim


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1813 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b99dca0f
......@@ -391,7 +391,8 @@ Une ligne tarifaire."""
"""
SetMappedValue._edit(self, REQUEST=REQUEST, force_update = force_update,
reindex_object=reindex_object, **kw)
self.getRootDeliveryValue().activate().propagateResourceToSimulation()
if self.isSimulated():
self.getRootDeliveryValue().activate().propagateResourceToSimulation()
# This one must be the last
if kw.has_key('item_id_list'):
self._setItemIdList( kw['item_id_list'] )
......
......@@ -147,9 +147,10 @@ Une ligne tarifaire."""
# This one must be the last
if kw.has_key('item_id_list'):
self._setItemIdList( kw['item_id_list'] )
self.getRootDeliveryValue().edit() # So that we make sure that automatic workflow transitions
# will be activated on the delivery
self.getRootDeliveryValue().activate().propagateResourceToSimulation()
if self.isSimulated():
self.getRootDeliveryValue().edit() # So that we make sure that automatic workflow transitions
# will be activated on the delivery
self.getRootDeliveryValue().activate().propagateResourceToSimulation()
# We must check if the user has changed the resource of particular line
security.declareProtected( Permissions.ModifyPortalContent, 'edit' )
......
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