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
Commits
750f3404
Commit
750f3404
authored
1 year ago
by
Houzefa Abbasbhay
Browse files
Options
Downloads
Patches
Plain Diff
Fix selector in analytic structure table
parent
64a85d66
No related branches found
No related tags found
1 merge request
!23
Fix selector in analytic structure table
Pipeline
#61775
failed
1 year ago
Stage: build
Stage: test
Stage: doc
Stage: deploy
Changes
3
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
NEWS.rst
+5
-0
5 additions, 0 deletions
NEWS.rst
__manifest__.py
+1
-1
1 addition, 1 deletion
__manifest__.py
models/analytic_structure.py
+6
-15
6 additions, 15 deletions
models/analytic_structure.py
with
12 additions
and
16 deletions
NEWS.rst
+
5
−
0
View file @
750f3404
...
...
@@ -2,6 +2,11 @@
Changes
=======
16.0.1.0.10
-----------
Fix selector in analytic structure table.
16.0.1.0.9
----------
...
...
This diff is collapsed.
Click to expand it.
__manifest__.py
+
1
−
1
View file @
750f3404
...
...
@@ -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
"
,
...
...
This diff is collapsed.
Click to expand it.
models/analytic_structure.py
+
6
−
15
View file @
750f3404
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment