From e25fe58d97f55bd4cbac30601fe1d945210ce842 Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Tue, 16 Aug 2005 14:13:41 +0000 Subject: [PATCH] _edit was defined twice. Merged them (thx Jerome). git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3592 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/DeliveryCell.py | 35 +++++++++++---------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/product/ERP5/Document/DeliveryCell.py b/product/ERP5/Document/DeliveryCell.py index 5607b1cdeb..160b4334e4 100755 --- a/product/ERP5/Document/DeliveryCell.py +++ b/product/ERP5/Document/DeliveryCell.py @@ -288,17 +288,26 @@ class DeliveryCell(MappedValue, Movement): new_predicate_value = map(lambda c: update_method(c, previous_category_url, new_category_url), predicate_value) self._setPredicateValueList(new_predicate_value) # No reindex needed since uid stable - security.declarePrivate( '_edit' ) - def _edit(self, REQUEST=None, force_update = 0, reindex_object = 0, **kw): + # XXX FIXME: option variation are today not well implemented + # This little hack is needed to make the matrixbox working + # in DeliveryLine_viewIndustrialPhase + # Generic form (DeliveryLine_viewOption) is required + security.declarePrivate('_edit') + def _edit(self, REQUEST=None, force_update=0, reindex_object=0, **kw): """ + Store variation_category_list, in order to store new value of + industrial_phase after. """ - MappedValue._edit(self, REQUEST=REQUEST, force_update = force_update, - reindex_object=reindex_object, **kw) + if kw.has_key('variation_category_list'): + self._setVariationCategoryList(kw['variation_category_list']) + kw.pop('variation_category_list') + MappedValue._edit(self, REQUEST=REQUEST, force_update=force_update, + reindex_object=reindex_object, **kw) # 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'] ) + self._setItemIdList(kw['item_id_list']) security.declareProtected(Permissions.ModifyPortalContent, 'updateSimulationDeliveryProperties') def updateSimulationDeliveryProperties(self, movement_list = None): @@ -311,19 +320,3 @@ class DeliveryCell(MappedValue, Movement): parent = parent.getParent() if parent is not None: parent.updateSimulationDeliveryProperties(movement_list, self) - - # XXX FIXME: option variation are today not well implemented - # This little hack is needed to make the matrixbox working - # in DeliveryLine_viewIndustrialPhase - # Generic form (DeliveryLine_viewOption) is required - security.declareProtected(Permissions.ModifyPortalContent, - '_edit') - def _edit(self, **kw): - """ - Store variation_category_list, in order to store new value of - industrial_phase after. - """ - if kw.has_key('variation_category_list'): - self._setVariationCategoryList(kw['variation_category_list']) - kw.pop('variation_category_list') - MappedValue._edit(self, **kw) -- 2.30.9