You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
927 B
23 lines
927 B
# -*- coding: utf-8 -*-
|
|
# © 2016 Serpent Consulting Services Pvt. Ltd. (support@serpentcs.com)
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
|
|
from openerp import api, models
|
|
|
|
|
|
class IrModelFields(models.Model):
|
|
_inherit = 'ir.model.fields'
|
|
|
|
@api.model
|
|
def search(self, args, offset=0, limit=0, order=None, count=False):
|
|
model_domain = []
|
|
for domain in args:
|
|
if (len(domain) > 2 and domain[0] == 'model_id' and
|
|
isinstance(domain[2], basestring)):
|
|
model_domain += [('model_id', 'in',
|
|
map(int, domain[2][1:-1].split(',')))]
|
|
else:
|
|
model_domain.append(domain)
|
|
return super(IrModelFields, self).search(model_domain, offset=offset,
|
|
limit=limit, order=order,
|
|
count=count)
|