Step-1 Install the web_advanced_filters module. Step-2 After that custmozie .py(Python file) file in web_advanced_filters module: In below example, I have custmozied .py file. You can directly copy the below python code in your .py file.
- class IrFilters(Model):
- _inherit = 'ir.filters'
- _evaluate_before_negate = ['one2many', 'many2many']
- def _is_frozen_get(self, cr, uid, ids, field_name, args, context=None):
- '''determine if this is fixed list of ids'''
- result = {}
- for this in self.browse(cr, uid, ids, context=context):
- try:
- domain = safe_eval(this.domain)
- except:
- domain = [expression.FALSE_LEAF]
- result[this.id] = (len(domain) == 1 and
- expression.is_leaf(domain[0]) and
- domain[0][0] == 'id')
- return result
- def _domain_get(self, cr, uid, ids, field_name, args, context=None):
- ...........
No comments:
Post a Comment