From b398194cf5c81978ff02c2ca51c43f109492edbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com> Date: Tue, 9 Jun 2009 12:58:06 +0000 Subject: [PATCH] - check that TradeCondition implements ITransformation - declare ITransformation for TradeCondition git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27471 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/TradeCondition.py | 6 +++++- product/ERP5/tests/testERP5Interfaces.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/product/ERP5/Document/TradeCondition.py b/product/ERP5/Document/TradeCondition.py index d596bb1137..63d4f63628 100644 --- a/product/ERP5/Document/TradeCondition.py +++ b/product/ERP5/Document/TradeCondition.py @@ -32,11 +32,13 @@ from AccessControl import ClassSecurityInfo -from Products.ERP5Type import Permissions, PropertySheet +from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5.Document.Transformation import Transformation from Products.ERP5.Document.Path import Path from Products.ERP5.AggregatedAmountList import AggregatedAmountList +import zope.interface + # XXX TODO : getTradeModelLineComposedList and findSpecialiseValueList should # probably move to Transformation (better names sould be used) @@ -72,6 +74,8 @@ class TradeCondition(Path, Transformation): , PropertySheet.Order ) + zope.interface.implements(interfaces.ITransformation) + security.declareProtected(Permissions.ModifyPortalContent, 'updateAggregatedAmountList') def updateAggregatedAmountList(self, context, **kw): diff --git a/product/ERP5/tests/testERP5Interfaces.py b/product/ERP5/tests/testERP5Interfaces.py index a5c5cf772a..58dd2e049b 100644 --- a/product/ERP5/tests/testERP5Interfaces.py +++ b/product/ERP5/tests/testERP5Interfaces.py @@ -36,6 +36,7 @@ implements_tuple_list = [ ('BusinessPath', 'IArrow'), ('BusinessPath', 'IBusinessPath'), ('BusinessPath', 'ICategoryAccessProvider'), + ('TradeCondition', 'ITransformation'), ('TradeModelCell', 'ITransformation'), ('TradeModelCell', 'IVariated'), ('TradeModelLine', 'ITransformation'), -- 2.30.9