I want to remove filters which are in advance search in odoo tree views. Its easy to remove filters and group by which display in top of tree view. But in advance search all filters are displaying, and i want some of them, and other ones want to remove, is there any solution to remove advance filters in odoo?
Asked
Active
Viewed 2,328 times
2 Answers
2
As far as i can see here models.Model
fields_get()
is called to get the advanced search field list. You should either work around the javascript code or override the fields_get()
.

CZoellner
- 13,553
- 3
- 25
- 38
-
it means that it will be done by javascript, not by python or xml, am i right? – Tayyab Javed Aug 12 '16 at 13:37
-
No it means you have 2 possibilities. You could try to override the js part or find a way to override `fields_get()` on the odoo model you're trying to reduce the options. – CZoellner Aug 12 '16 at 13:38
1
It is too late to answer this question but this is how I did in Odoo 8. Hiding all these fields from "res.partner" model
class res_partner(models.Model):
_inherit = 'res.partner'
def fields_get(self, cr, uid, fields=None, context=None, write_access=True):
fields_to_hide = ['city', 'birthdate', 'fax_extension', 'display_name', 'partner_sequence', 'pabx',
'phone_ids_readonly', 'country_ids', 'email_ids_readonly', 'lang_ids', 'phonecall_count',
'state_ids', 'self', 'has_image']
res = super(res_partner, self).fields_get(cr, uid, fields, context)
for field in fields_to_hide:
if field in res.keys():
res[field]['selectable'] = False
return res

StackUP
- 1,233
- 12
- 22