Wednesday 23 December 2015

How to set the Advanced filters in OpenERP

oddon.png


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.
  1. class IrFilters(Model):
  2. _inherit = 'ir.filters'
  3. _evaluate_before_negate = ['one2many', 'many2many']
  4. def _is_frozen_get(self, cr, uid, ids, field_name, args, context=None):
  5. '''determine if this is fixed list of ids'''
  6. result = {}
  7. for this in self.browse(cr, uid, ids, context=context):
  8. try:
  9. domain = safe_eval(this.domain)
  10. except:
  11. domain = [expression.FALSE_LEAF]
  12. result[this.id] = (len(domain) == 1 and
  13. expression.is_leaf(domain[0]) and
  14. domain[0][0] == 'id')
  15. return result
  16. def _domain_get(self, cr, uid, ids, field_name, args, context=None):
  17. ...........
Read full blog at our highly specific C, android,iphone, Javascript,HTML, PHP developer forum about the topic described above How to set the Advanced filters in OpenERP. You can also learn much more about different programming technologies and can enhance your tech skills.

No comments:

Post a Comment