[gen] Added an index 'Modified' on every object (it represents the date of the last modification); removed obsolete workflow-related code; removed attributes Tool.showAllStatesInPhaseFor...; changed the way to display the object's current state in the UI.
This commit is contained in:
parent
f31cbc4d12
commit
21585df6a1
12 changed files with 69 additions and 123 deletions
|
@ -1547,9 +1547,15 @@ class Date(Type):
|
|||
|
||||
def getFormattedValue(self, obj, value):
|
||||
if self.isEmptyValue(value): return ''
|
||||
res = value.strftime('%d/%m/') + str(value.year())
|
||||
tool = obj.getTool().appy()
|
||||
# A problem may occur with some extreme year values. Replace the "year"
|
||||
# part "by hand".
|
||||
dateFormat = tool.dateFormat
|
||||
if '%Y' in dateFormat:
|
||||
dateFormat = dateFormat.replace('%Y', str(value.year()))
|
||||
res = value.strftime(dateFormat)
|
||||
if self.format == Date.WITH_HOUR:
|
||||
res += ' %s' % value.strftime('%H:%M')
|
||||
res += ' %s' % value.strftime(tool.hourFormat)
|
||||
return res
|
||||
|
||||
def getRequestValue(self, request, requestName=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue