Commit 8a6fac3c authored by Yoshinori Okuji's avatar Yoshinori Okuji

return None for getDefaultCareerStart(Stop)Date


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@627 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f5a65620
...@@ -137,7 +137,7 @@ class Entity: ...@@ -137,7 +137,7 @@ class Entity:
try: try:
return self.getDefaultCareerValue().getStartDate() return self.getDefaultCareerValue().getStartDate()
except: except:
return '' return None
security.declareProtected(Permissions.View, 'getDefaultCareerStopDate') security.declareProtected(Permissions.View, 'getDefaultCareerStopDate')
def getDefaultCareerStopDate(self): def getDefaultCareerStopDate(self):
...@@ -147,7 +147,7 @@ class Entity: ...@@ -147,7 +147,7 @@ class Entity:
try: try:
return self.getDefaultCareerValue().getStopDate() return self.getDefaultCareerValue().getStopDate()
except: except:
return '' return None
security.declareProtected(Permissions.View, 'getDefaultCareerDescription') security.declareProtected(Permissions.View, 'getDefaultCareerDescription')
def getDefaultCareerDescription(self): def getDefaultCareerDescription(self):
...@@ -159,6 +159,26 @@ class Entity: ...@@ -159,6 +159,26 @@ class Entity:
except: except:
return '' return ''
security.declareProtected(Permissions.View, 'getDefaultCareerSalaryLevel')
def getDefaultCareerSalaryLevel(self):
"""
Returns the default address city as a text string
"""
try:
return self.getDefaultCareerValue().getSalaryLevel()
except:
return ''
security.declareProtected(Permissions.View, 'getDefaultCareerSalaryCoefficient')
def getDefaultCareerSalaryCoefficient(self):
"""
Returns the default address city as a text string
"""
try:
return self.getDefaultCareerValue().getSalaryCoefficient()
except:
return ''
security.declareProtected(Permissions.View, 'getDefaultAddressRegion') security.declareProtected(Permissions.View, 'getDefaultAddressRegion')
def getDefaultAddressRegion(self): def getDefaultAddressRegion(self):
""" """
...@@ -273,6 +293,22 @@ class Entity: ...@@ -273,6 +293,22 @@ class Entity:
self._setDefaultCareerStopDate(coordinate) self._setDefaultCareerStopDate(coordinate)
self.reindexObject() self.reindexObject()
security.declareProtected(Permissions.ModifyPortalContent, 'setDefaultCareerSalaryLevel')
def setDefaultCareerSalaryLevel(self, coordinate):
"""
Updates the default address from a standard text string
"""
self._setDefaultCareerSalaryLevel(coordinate)
self.reindexObject()
security.declareProtected(Permissions.ModifyPortalContent, 'setDefaultCareerSalaryCoefficient')
def setDefaultCareerSalaryCoefficient(self, coordinate):
"""
Updates the default address from a standard text string
"""
self._setDefaultCareerSalaryCoefficient(coordinate)
self.reindexObject()
security.declareProtected(Permissions.ModifyPortalContent, 'setDefaultAddressText') security.declareProtected(Permissions.ModifyPortalContent, 'setDefaultAddressText')
def setDefaultAddressText(self, coordinate): def setDefaultAddressText(self, coordinate):
""" """
...@@ -455,6 +491,24 @@ class Entity: ...@@ -455,6 +491,24 @@ class Entity:
) )
self.default_career.setStopDate(coordinate) self.default_career.setStopDate(coordinate)
security.declarePrivate('_setDefaultCareerSalaryLevel')
def _setDefaultCareerSalaryLevel(self, coordinate):
assertAttributePortalType(self, 'default_career', 'Career')
if not hasattr(self,'default_career'):
self.invokeFactory( type_name='Career'
, id='default_career'
)
self.default_career.setSalaryLevel(coordinate)
security.declarePrivate('_setDefaultCareerSalaryCoefficient')
def _setDefaultCareerSalaryCoefficient(self, coordinate):
assertAttributePortalType(self, 'default_career', 'Career')
if not hasattr(self,'default_career'):
self.invokeFactory( type_name='Career'
, id='default_career'
)
self.default_career.setSalaryCoefficient(coordinate)
security.declarePrivate('_setDefaultTelephoneText') security.declarePrivate('_setDefaultTelephoneText')
def _setDefaultTelephoneText(self, coordinate): def _setDefaultTelephoneText(self, coordinate):
assertAttributePortalType(self, 'default_telephone', 'Telephone') assertAttributePortalType(self, 'default_telephone', 'Telephone')
......
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