diff --git a/product/ERP5/Document/Alarm.py b/product/ERP5/Document/Alarm.py index 2a480c9f5f8447bd5dc94ccf7bb9e700fb0debd1..f2c8a45f29050dff0999a0897d4e03fa61256751 100644 --- a/product/ERP5/Document/Alarm.py +++ b/product/ERP5/Document/Alarm.py @@ -34,7 +34,6 @@ from Products.ERP5.Document.Periodicity import Periodicity from Products.CMFCore.WorkflowCore import WorkflowMethod from Acquisition import aq_base, aq_parent, aq_inner, aq_acquire from Products.CMFCore.utils import getToolByName -from Products.PageTemplates.Expressions import getEngine from DateTime import DateTime from zLOG import LOG @@ -82,17 +81,6 @@ class Alarm(Periodicity, XMLObject): """ return self.hasActivity() - def callActiveSenseMethod(self, tales_expression): - """ - This resolves the active_sense_method, and calls it - """ - context = { 'here' : self.aq_parent, - 'context' : self.aq_parent, - 'request' : None } - - compiled_tales = getEngine().compile(tales_expression) - return getEngine().getContext(context).evaluate(compiled_tales) - security.declareProtected(Permissions.ModifyPortalContent, 'activeSense') def activeSense(self): """ @@ -111,10 +99,8 @@ class Alarm(Periodicity, XMLObject): self.reindexObject() method_id = self.getActiveSenseMethodId() if method_id is not None: - return self.activate().callActiveSenseMethod(method_id) -# method = getattr(self.activate(),method_id) -# return method() - s + method = getattr(self.activate(),method_id) + return method() security.declareProtected(Permissions.ModifyPortalContent, 'sense') def sense(self): diff --git a/product/ERP5/Document/Amount.py b/product/ERP5/Document/Amount.py index f47ce32024caa21677ae0181cf452fe2ffdb2648..5519648524cbd4e4ff57eec221635f144b398ec1 100644 --- a/product/ERP5/Document/Amount.py +++ b/product/ERP5/Document/Amount.py @@ -306,12 +306,7 @@ class Amount(Base, Variated): raise KeyError, "Can not set the property variation '%s'" % \ property_id else: - try: - self.setProperty(property_id, property_value) - except KeyError: - LOG("Amount", 200, "Can not set %s with value %s on %s" % \ - (property_id, property_value, self.getRelativeUrl())) - raise + self.setProperty(property_id, property_value) security.declareProtected(Permissions.AccessContentsInformation, 'getQuantityUnitRangeItemList') diff --git a/product/ERP5/Document/SimulationMovement.py b/product/ERP5/Document/SimulationMovement.py index ccec9c76829445c12077149bb7da09e1397b8865..21bd1edb951ba023888fda48f810eab4f6f077fd 100644 --- a/product/ERP5/Document/SimulationMovement.py +++ b/product/ERP5/Document/SimulationMovement.py @@ -454,8 +454,6 @@ class SimulationMovement(Movement): self.getResource() != delivery.getResource() or \ self.getVariationCategoryList() != delivery.getVariationCategoryList()\ or \ - #self.getAggregateValueList() != delivery.getAggregateValueList()\ - or \ self.getAggregateList() != delivery.getAggregateList() or \ self.getStartDate() != delivery.getStartDate() or \ self.getStopDate() != delivery.getStopDate(): diff --git a/product/ERP5/Document/TransformedResource.py b/product/ERP5/Document/TransformedResource.py index 6a2d656fe104f99d9a388896dad9a2c16a92c584..ba039db6e9a5acf98ccf4605f0849a99d7306969 100644 --- a/product/ERP5/Document/TransformedResource.py +++ b/product/ERP5/Document/TransformedResource.py @@ -329,8 +329,6 @@ class TransformedResource(Predicate, XMLObject, XMLMatrix, Amount): ) tmp_amount.setVariationCategoryList(variation_category_list) # Variation property dict - - prop_dict = self.getVariationPropertyDict() - tmp_amount.setVariationPropertyDict(prop_dict) + tmp_amount.setVariationPropertyDict(self.getVariationPropertyDict()) aggregated_amount_list.append(tmp_amount) return aggregated_amount_list diff --git a/product/ERP5/PropertySheet/Person.py b/product/ERP5/PropertySheet/Person.py index 969a088dfa3e58fccec62d7af48b1095f9a44551..fb89dd3107c6cff33668da3e541da9123ea6b7fd 100644 --- a/product/ERP5/PropertySheet/Person.py +++ b/product/ERP5/PropertySheet/Person.py @@ -182,7 +182,7 @@ class Person: , 'storage_id' : 'default_career' , 'description' : 'The default career hold some properties of a Person.' , 'type' : 'content' - , 'portal_type' : 'Career' + , 'portal_type' : ( 'Career', ) , 'acquired_property_id': ( 'start_date', 'stop_date', 'title', 'description' , 'subordination', 'subordination_title', 'subordination_value' , 'subordination_uid_list', 'subordination_uid' @@ -193,6 +193,7 @@ class Person: , 'role', 'role_id', 'role_title', 'role_value' , 'function', 'function_id', 'function_title', 'function_value' ) + , 'deprecated' : 1 , 'mode' : 'w' }, ) diff --git a/product/ERP5/Tool/CategoryTool.py b/product/ERP5/Tool/CategoryTool.py index f1ff6e8faa327b590f5972125b289c24d023c8a1..7cb849f5e5e3b3c79cb10c253ccefc8837624b00 100644 --- a/product/ERP5/Tool/CategoryTool.py +++ b/product/ERP5/Tool/CategoryTool.py @@ -103,8 +103,8 @@ class CategoryTool(CopyContainer, CMFCategoryTool, BaseTool): my_base_category = base_category bo = getattr(self, my_base_category, None) if bo is not None: - bo_uid = bo.getUid() - uid_dict[(o.getUid(), bo_uid, 1)] = 1 # Strict membership + bo_uid = int(bo.getUid()) + uid_dict[(int(o.uid), bo_uid, 1)] = 1 # Strict membership if o.meta_type == 'ERP5 Category' or o.meta_type == 'ERP5 Base Category' or \ o.meta_type == 'CMF Category' or o.meta_type == 'CMF Base Category': # This goes up in the category tree @@ -113,7 +113,7 @@ class CategoryTool(CopyContainer, CMFCategoryTool, BaseTool): if not strict: while o.meta_type == 'ERP5 Category' or o.meta_type == 'CMF Category': o = o.aq_parent - uid_dict[(o.getUid(), bo_uid, 0)] = 1 # Non strict + uid_dict[(int(o.uid), bo_uid, 0)] = 1 # Non strict except (TypeError, KeyError): LOG('WARNING: CategoriesTool',0, 'Unable to find uid for %s' % path) return uid_dict.keys()