[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:
parent
f091b25c98
commit
c863b47db5
2 changed files with 24 additions and 10 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue