Browse Source

publish muk_web_searchpanel - 12.0

12.0
MuK IT GmbH 5 years ago
parent
commit
702eab721c
  1. 2
      muk_web_searchpanel/__manifest__.py
  2. 9
      muk_web_searchpanel/models/base.py

2
muk_web_searchpanel/__manifest__.py

@ -23,7 +23,7 @@
{
'name': 'MuK Search Panel',
'summary': 'Kanban Search Panel',
'version': '12.0.2.0.0',
'version': '12.0.2.0.1',
'category': 'Extra Tools',
'license': 'LGPL-3',
'author': 'MuK IT',

9
muk_web_searchpanel/models/base.py

@ -62,9 +62,16 @@ class Base(models.AbstractModel):
parent_name = Comodel._parent_name if Comodel._parent_name in Comodel._fields else False
if parent_name:
fields.append(parent_name)
model_domain = expression.AND([
kwargs.get('search_domain', []),
kwargs.get('category_domain', []),
kwargs.get('filter_domain', []),
])
return {
'parent_field': parent_name,
'values': Comodel.with_context(hierarchical_naming=False).search_read([], fields),
'values': Comodel.with_context(hierarchical_naming=False).search_read(model_domain, fields),
}
@api.model

Loading…
Cancel
Save