79502181

Date: 2025-03-11 21:35:16
Score: 0.5
Natty:
Report link

thanks for the answer and feedback. on the other hand(which is in my case) if someone want to remove just specific suggested fields the code can be rewritten like this:

@api.model
    def fields_get(self, allfields=None, attributes=None):
        res = super().fields_get(allfields, attributes=attributes)
        fields_to_remove_from_custom_search = ['field_1','field_2']
        for field in fields_to_remove_from_custom_search:
            if res.get(field):
                res[field]['searchable'] = False
                res[field]['sortable'] = False
        return res
Reasons:
  • Blacklisted phrase (0.5): thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Fahim Foysal