[gen] While <obj>.<fieldName> allows to get the 'DB' value of some field, <obj>.getValue allows to get a variant of it, ie, the formatted version (via an internal call to field.getFormattedValue).

This commit is contained in:
Gaetan Delannay 2014-09-08 15:13:18 +02:00
parent 8aed007623
commit 71bc58a8b0
9 changed files with 67 additions and 36 deletions

View file

@ -79,7 +79,7 @@ class Computed(Field):
# self.method is a method that will return the field value
return self.callMethod(obj, self.method, cache=False)
def getFormattedValue(self, obj, value, showChanges=False):
def getFormattedValue(self, obj, value, showChanges=False, language=None):
if not isinstance(value, basestring): return str(value)
return value
# ------------------------------------------------------------------------------