From 1ed562ecbf6bad4efec6e4123505784028059a34 Mon Sep 17 00:00:00 2001 From: Janire Olagibel Date: Wed, 5 Jul 2017 10:34:38 +0200 Subject: [PATCH] Update readme.rst --- web_pivot_hide_measure/README.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/web_pivot_hide_measure/README.rst b/web_pivot_hide_measure/README.rst index a4a9b767..34191dbf 100644 --- a/web_pivot_hide_measure/README.rst +++ b/web_pivot_hide_measure/README.rst @@ -24,17 +24,17 @@ Add this method in the res model of the pivot view, where the list named 'fields id a comma separated list of the measures to hide ```python - @api.model - def fields_get(self, fields=None, attributes=None): - fields_to_hide = [ - 'field1', 'field2', 'field3' - ] - res = super(ModelName, self).fields_get( - fields, attributes) - for field in fields_to_hide: - res[field]['selectable'] = False - return res +@api.model +def fields_get(self, fields=None, attributes=None): + fields_to_hide = [ + 'field1', 'field2', 'field3' + ] + res = super(ModelName, self).fields_get( + fields, attributes) + for field in fields_to_hide: + res[field]['selectable'] = False + return res ``` Known issues