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
You need to sign in or sign up before continuing.
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
Compare
branch/16.0
branch/16.0 (base)
and
latest version
latest version
750f3404
1 commit,
1 year ago
3 files
+
12
−
16
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
models/analytic_structure.py
+
6
−
15
Options
@@ -65,21 +65,12 @@ class AnalyticStructure(models.Model):
@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
Loading