Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Accounting Reports
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
Package Registry
Model registry
Operate
Terraform modules
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
Accounting Reports
Commits
fe4a5869
Commit
fe4a5869
authored
4 years ago
by
Houzefa Abbasbhay
Browse files
Options
Downloads
Patches
Plain Diff
Fix buttons (name_get with multiple records)
parent
b8a3ae8d
No related branches found
No related tags found
No related merge requests found
Pipeline
#5733
failed
4 years ago
Stage: build
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wizards/account_consultation.py
+10
-6
10 additions, 6 deletions
wizards/account_consultation.py
with
10 additions
and
6 deletions
wizards/account_consultation.py
+
10
−
6
View file @
fe4a5869
...
...
@@ -192,4 +192,8 @@
self
.
_refresh_ref_preview
()
def
name_get
(
self
):
"""
Override to name this record as we display it inline.
"""
ret
=
[]
for
record
in
self
:
...
...
@@ -195,6 +199,4 @@
for
record
in
self
:
"""
Override to name this record as we display it inline.
"""
account
=
record
.
account_id
# 0 & 1 below: name_get returns a list of (ID, name) tuples.
...
...
@@ -198,6 +200,5 @@
account
=
record
.
account_id
# 0 & 1 below: name_get returns a list of (ID, name) tuples.
return
(
record
.
id
,
ret
.
append
(
(
...
...
@@ -203,6 +204,7 @@
(
record
.
id
,
_
(
"
Account consultation - %s
"
)
%
(
account
.
name_get
()[
0
][
1
]
if
account
else
record
.
partner_id
.
name_get
()[
0
][
1
]
...
...
@@ -204,9 +206,9 @@
_
(
"
Account consultation - %s
"
)
%
(
account
.
name_get
()[
0
][
1
]
if
account
else
record
.
partner_id
.
name_get
()[
0
][
1
]
)
)
,
)
,
)
)
...
...
@@ -211,5 +213,7 @@
)
return
ret
def
get_partner_account_fields
(
self
):
"""
Provide partner fields that reference accounts. This method is here
to allow overrides.
...
...
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