[gen] field.history can now be a method. This way, historization can be enabled/disabled, field by field, according to any custom condition.

This commit is contained in:
Gaetan Delannay 2013-01-10 10:56:22 +01:00
parent f091b25c98
commit c863b47db5
2 changed files with 24 additions and 10 deletions

View file

@ -1215,6 +1215,9 @@ class String(Type):
return {'view': 'l-f', 'edit': 'lrv-d-f'}
elif self.format == String.XHTML:
if self.historized:
# self.historized can be a method or a boolean. If it is a
# method, it means that under some condition, historization will
# be enabled. So we come here also in this case.
view = 'lc-f'
else:
view = 'l-f'