|
|
@ -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 |
|
|
|