Skip to Content
Menu
This question has been flagged
2 Replies
1172 Views

Hello everyone, 

I have an issue and i couldn't find any thing about it.

I inherited the fields_get methode to hide a field from the filters list in sale.order as recommended in multiple posts

def fields_get(self, fields=None):
hide = ['tag_ids_forced']
res = super(SaleOrder, self).fields_get()
for field in hide:
res[field]['searchable'] = False
return res

The field was seccussfully removed from the filter's list but i noticed that every time i open a sale order , a new log note is addes with the values  for fields" write_date" and "__last_update" changing to the current date.

The field that i'm trying to hide is not tracked in odoo, but i don't understand why odoo behavious in such way.

Any ideas please ? 

Thanks




Avatar
Discard
Author Best Answer

Hi  Abhinav Vaidya, 

Thank you for your response, 

In fact i want to hide the field from the custom filters list that contains all the fields of the model, i don't know if this is possible via xml inheriting the search view.

if it was a filter defined in xml search view that would be simple, but in my case i want to hide the field from the list of suggested fields when i i click on custom filters.

Thanks

Avatar
Discard

Hi Amal,
Hope you have already checked this helpful link : https://www.odoo.com/forum/help-1/hide-filter-name-from-add-custom-filter-drop-down-147813 especially the comment from OdooMates

Best Answer

Hi There,
That is some suspicious code I guess. My question is why you went to fields_get solution and not with simply inheriting the search view and delete the filter from there?

Avatar
Discard