|
@ -85,7 +85,11 @@ class IrModel(models.Model): |
|
|
for field in fields: |
|
|
for field in fields: |
|
|
for table_alias in model_table_map[field.model_id.id]: |
|
|
for table_alias in model_table_map[field.model_id.id]: |
|
|
model_list.append( |
|
|
model_list.append( |
|
|
dict(dict_for_field(field), table_alias=table_alias, join_node=-1,) |
|
|
|
|
|
|
|
|
dict( |
|
|
|
|
|
dict_for_field(field), |
|
|
|
|
|
table_alias=table_alias, |
|
|
|
|
|
join_node=-1, |
|
|
|
|
|
) |
|
|
) |
|
|
) |
|
|
return model_list |
|
|
return model_list |
|
|
|
|
|
|
|
@ -133,8 +137,7 @@ class IrModel(models.Model): |
|
|
|
|
|
|
|
|
@api.model |
|
|
@api.model |
|
|
def get_models(self, table_model_map=None): |
|
|
def get_models(self, table_model_map=None): |
|
|
""" Return list of model dicts for all available models. |
|
|
|
|
|
""" |
|
|
|
|
|
|
|
|
"""Return list of model dicts for all available models.""" |
|
|
self = self.with_context(lang=self.env.user.lang) |
|
|
self = self.with_context(lang=self.env.user.lang) |
|
|
model_table_map = defaultdict(list) |
|
|
model_table_map = defaultdict(list) |
|
|
for k, v in (table_model_map or {}).items(): |
|
|
for k, v in (table_model_map or {}).items(): |
|
|