Commit d32ac0a0 authored by Kevin Deldycke's avatar Kevin Deldycke

Add default career grade and role setter


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2697 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c16d7d58
...@@ -315,6 +315,22 @@ etc.).""" ...@@ -315,6 +315,22 @@ etc.)."""
self._setDefaultCareerSalaryCoefficient(value) self._setDefaultCareerSalaryCoefficient(value)
self.reindexObject() self.reindexObject()
security.declareProtected(Permissions.ModifyPortalContent, 'setDefaultCareerGrade')
def setDefaultCareerGrade(self, value):
"""
Updates the default career grade
"""
self._setDefaultCareerGrade(value)
self.reindexObject()
security.declareProtected(Permissions.ModifyPortalContent, 'setDefaultCareerRole')
def setDefaultCareerRole(self, value):
"""
Updates the default career role
"""
self._setDefaultCareerRole(value)
self.reindexObject()
### Private methods - no reindexing ### Private methods - no reindexing
...@@ -380,3 +396,21 @@ etc.).""" ...@@ -380,3 +396,21 @@ etc.)."""
, id='default_career' , id='default_career'
) )
self.default_career.setSalaryCoefficient(coordinate) self.default_career.setSalaryCoefficient(coordinate)
security.declarePrivate('_setDefaultCareerGrade')
def _setDefaultCareerGrade(self, coordinate):
assertAttributePortalType(self, 'default_career', 'Career')
if not hasattr(self,'default_career'):
self.invokeFactory( type_name='Career'
, id='default_career'
)
self.default_career.setGrade(coordinate)
security.declarePrivate('_setDefaultCareerRole')
def _setDefaultCareerRole(self, coordinate):
assertAttributePortalType(self, 'default_career', 'Career')
if not hasattr(self,'default_career'):
self.invokeFactory( type_name='Career'
, id='default_career'
)
self.default_career.setRole(coordinate)
\ No newline at end of file
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