Commit b5f467e6 authored by Fabien Morin's avatar Fabien Morin

- add security declaration

- typo


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27468 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ca85c850
......@@ -64,5 +64,7 @@ class PaySheetCell(InvoiceCell):
, PropertySheet.MappedValue
)
security.declareProtected(Permissions.AccessContentsInformation,
'isAccountable')
def isAccountable(self):
return 1
......@@ -74,7 +74,7 @@ class PaySheetLine(InvoiceLine):
self.invokeFactory(type_name="Pay Sheet Cell",id=id)
return self.get(id)
security.declareProtected(Permissions.AccessContentsInformationi,
security.declareProtected(Permissions.AccessContentsInformation,
'isAccountable')
def isAccountable(self):
return 1
......@@ -69,7 +69,7 @@ class PaySheetModelLine(TradeModelLine):
, PropertySheet.Reference
)
security.declareProtected( Permissions.ModifyPortalContent,
security.declareProtected(Permissions.ModifyPortalContent,
'newCellContent' )
def newCellContent(self, id, portal_type='Pay Sheet Model Cell', **kw):
"""
......
......@@ -133,6 +133,8 @@ class PaySheetTransaction(Invoice):
return [self.getAnnotationLineFromReference(reference) \
for reference in reference_list]
security.declareProtected(Permissions.AccessContentsInformation,
'getInheritedObjectValueList')
def getInheritedObjectValueList(self, portal_type_list, property_list=()):
'''Return a list of all subobjects of the herited model (incuding the
dependencies).
......@@ -152,6 +154,8 @@ class PaySheetTransaction(Invoice):
sub_object_list.extend([model._getOb(x) for x in id_list])
return sub_object_list
security.declareProtected(Permissions.ModifyPortalContent,
'applyTransformation')
def applyTransformation(self):
'''use a delivery builder to create all the paysheet lines using
movements return by updateAggregatedAmountList
......
......@@ -72,6 +72,8 @@ class TradeCondition(Path, Transformation):
, PropertySheet.Order
)
security.declareProtected(Permissions.ModifyPortalContent,
'updateAggregatedAmountList')
def updateAggregatedAmountList(self, context, **kw):
'''
updates exisiting movement and returns new if any
......@@ -142,6 +144,8 @@ class TradeCondition(Path, Transformation):
visited_trade_condition_list=visited_trade_condition_list))
return specialise_value_list
security.declareProtected(Permissions.AccessContentsInformation,
'getTradeModelLineComposedList')
def getTradeModelLineComposedList(self, context=None, portal_type_list=None):
"""
Returns list of Trade Model Lines using composition
......@@ -178,6 +182,8 @@ class TradeCondition(Path, Transformation):
cmp=lambda x,y: set(x.getBaseContributionList()).
intersection(set(y.getBaseApplicationList())) and -1 or 1)
security.declareProtected(Permissions.AccessContentsInformation,
'getAggregatedAmountList')
def getAggregatedAmountList(self, context, movement_list=None, **kw):
result = AggregatedAmountList()
......
......@@ -63,12 +63,16 @@ class TradeModelLine(Predicate, XMLMatrix, Amount):
, PropertySheet.Predicate
)
security.declareProtected(Permissions.AccessContentsInformation,
'getPrice')
def getPrice(self):
return self._baseGetPrice()
def updateAggregatedAmountList(self, context, **kw):
raise NotImplementedError('TODO')
security.declareProtected(Permissions.AccessContentsInformation,
'getAggregatedAmountList')
def getAggregatedAmountList(self, context, movement_list = None,
current_aggregated_amount_list = None, base_id='movement', **kw):
from Products.ERP5Type.Document import newTempSimulationMovement
......
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