Skip to content

Commit

Permalink
Merge 1edf6d0 into b1b4340
Browse files Browse the repository at this point in the history
  • Loading branch information
florian-dacosta committed Dec 12, 2018
2 parents b1b4340 + 1edf6d0 commit 959ddb2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions connector_search_engine/models/se_index.py
Expand Up @@ -24,14 +24,13 @@ class SeIndex(models.Model):

@api.model
def _get_model_domain(self):
models = self.env['ir.model'].search([('transient', '=', False)])
se_model_ids = []
for model in models:
if model.model == 'se.binding':
se_model_names = []
for model in self.env:
if self.env[model]._abstract or self.env[model]._transient:
continue
if hasattr(self.env[model.model], '_se_model'):
se_model_ids.append(model.id)
return [('id', 'in', se_model_ids)]
if hasattr(self.env[model], '_se_model'):
se_model_names.append(model)
return [('model', 'in', se_model_names)]

name = fields.Char(compute='_compute_name', store=True)
backend_id = fields.Many2one(
Expand Down

0 comments on commit 959ddb2

Please sign in to comment.