Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Analytic Structure
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo modules
Analytic Structure
Merge requests
!23
Fix selector in analytic structure table
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Fix selector in analytic structure table
topic/16.0/zouzou
into
branch/16.0
Overview
0
Commits
1
Pipelines
1
Changes
3
Merged
Houzefa Abbasbhay
requested to merge
topic/16.0/zouzou
into
branch/16.0
1 year ago
Overview
0
Commits
1
Pipelines
1
Changes
3
Expand
--HG-- branch : 16.0
0
0
Merge request reports
Viewing commit
750f3404
Show latest version
3 files
+
12
−
16
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
750f3404
Fix selector in analytic structure table
· 750f3404
Houzefa Abbasbhay
authored
1 year ago
models/analytic_structure.py
+
6
−
15
Options
@@ -65,21 +65,12 @@
@@ -65,21 +65,12 @@
@tools.ormcache
()
@tools.ormcache
()
def
_get_model_name
(
self
):
def
_get_model_name
(
self
):
"""
Looks up the list of model names
"""
"""
Looks up the list of model names
"""
model_names
=
set
()
return
[
for
model
in
self
.
_get_models_with_analytic
():
(
analytic_name
,
analytic_name
)
analytic
=
model
.
_analytic
for
analytic_name
in
sorted
(
if
analytic
is
True
:
set
(
model
.
_analytic_name
for
model
in
self
.
_get_models_with_analytic
())
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
)
model_name
=
fields
.
Selection
(
model_name
=
fields
.
Selection
(
selection
=
"
_get_model_name
"
,
string
=
"
Object
"
,
required
=
True
selection
=
"
_get_model_name
"
,
string
=
"
Object
"
,
required
=
True
Loading