Browse Source

Update readme.rst

pull/664/head
Janire Olagibel 7 years ago
committed by GitHub
parent
commit
1ed562ecbf
  1. 20
      web_pivot_hide_measure/README.rst

20
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

Loading…
Cancel
Save