Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Coopdevs OCB mirror
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Coopdevs
Odoo
Coopdevs OCB mirror
Commits
8ccbcb81
Commit
8ccbcb81
authored
12 years ago
by
Cédric Snauwaert
Browse files
Options
Downloads
Patches
Plain Diff
[FIX]gave an error if data['currency_id'] exists but has value false
bzr revid: csn@openerp.com-20121123103657-jgewk23zrz3xo5ty
parent
2c0b28c2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
addons/account/account_bank.py
+1
-1
1 addition, 1 deletion
addons/account/account_bank.py
with
1 addition
and
1 deletion
addons/account/account_bank.py
+
1
−
1
View file @
8ccbcb81
...
...
@@ -45,7 +45,7 @@ class bank(osv.osv):
def
_prepare_name_get
(
self
,
cr
,
uid
,
bank_dicts
,
context
=
None
):
"""
Add ability to have %(currency_name)s in the format_layout of res.partner.bank.type
"""
currency_ids
=
list
(
set
(
data
[
'
currency_id
'
][
0
]
for
data
in
bank_dicts
if
'
currency_id
'
in
data
))
currency_ids
=
list
(
set
(
data
[
'
currency_id
'
][
0
]
for
data
in
bank_dicts
if
data
.
get
(
'
currency_id
'
)
))
currencies
=
self
.
pool
.
get
(
'
res.currency
'
).
browse
(
cr
,
uid
,
currency_ids
,
context
=
context
)
currency_name
=
dict
((
currency
.
id
,
currency
.
name
)
for
currency
in
currencies
)
...
...
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