[FIX] fields: add group_operator to be availble in get_description.

Web client use fields_get (which one call get_description) to know if
a group operator exists. But until now, group_operator are never returned.

Without it, the web client cannot display the sub-total except for sum
(the fallback in the web client).

This commit closes #13713

Todo: do the same on Class Monetary in next branch
This commit is contained in:
Jeremy Kersten 2016-10-10 17:21:50 +02:00
parent a1d6c2d631
commit 4ca06e0255
1 changed files with 3 additions and 1 deletions

View File

@ -1041,6 +1041,7 @@ class Integer(Field):
}
_related_group_operator = property(attrgetter('group_operator'))
_description_group_operator = property(attrgetter('group_operator'))
_column_group_operator = property(attrgetter('group_operator'))
def convert_to_cache(self, value, record, validate=True):
@ -1101,6 +1102,7 @@ class Float(Field):
_related_group_operator = property(attrgetter('group_operator'))
_description_digits = property(attrgetter('digits'))
_description_group_operator = property(attrgetter('group_operator'))
_column_digits = property(lambda self: not callable(self._digits) and self._digits)
_column_digits_compute = property(lambda self: callable(self._digits) and self._digits)
@ -1129,7 +1131,7 @@ class _String(Field):
_column_translate = property(attrgetter('translate'))
_related_translate = property(attrgetter('translate'))
_description_translate = property(attrgetter('translate'))
class Char(_String):
""" Basic string field, can be length-limited, usually displayed as a