Skip to content
Snippets Groups Projects
Commit 750f3404 authored by Houzefa Abbasbhay's avatar Houzefa Abbasbhay :slight_smile:
Browse files

Fix selector in analytic structure table

parent 64a85d66
No related branches found
No related tags found
1 merge request!23Fix selector in analytic structure table
Pipeline #61775 failed
......@@ -2,6 +2,11 @@
Changes
=======
16.0.1.0.10
-----------
Fix selector in analytic structure table.
16.0.1.0.9
----------
......
......@@ -21,7 +21,7 @@
{
"name": "Analytic Structure",
"license": "AGPL-3",
"version": "16.0.1.0.9",
"version": "16.0.1.0.10",
"author": "XCG Consulting",
"category": "Dependency",
"website": "https://orbeet.io",
......
......@@ -65,21 +65,12 @@
@tools.ormcache()
def _get_model_name(self):
"""Looks up the list of model names"""
model_names = set()
for model in self._get_models_with_analytic():
analytic = model._analytic
if analytic is True:
model_names.add((model._name.replace(".", "_"), model._name))
elif isinstance(analytic, str):
model_names.add((analytic, model._name))
else:
# Expecting analytic to be a dict
model_names.update(
(value, "%s (%s)" % (model._name, value))
for value in analytic.values()
)
return list(model_names)
return [
(analytic_name, analytic_name)
for analytic_name in sorted(
set(model._analytic_name for model in self._get_models_with_analytic())
)
]
model_name = fields.Selection(
selection="_get_model_name", string="Object", required=True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment