Merge lp:~openerp-dev/openobject-addons/trunk-bug-1136373-priyanka into lp:openobject-addons

Proposed by Priyanka Jani(OpenERP Trainee)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1136373-priyanka
Merge into: lp:openobject-addons
Diff against target: 14 lines (+1/-3)
1 file modified
account/account_bank_statement.py (+1/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1136373-priyanka
Reviewer Review Type Date Requested Status
Amit Parik (community) Approve
OpenERP Core Team Pending
Review via email: mp+152344@code.launchpad.net

This proposal supersedes a proposal from 2013-03-08.

Description of the change

Hello,

I have changed the code as per your suggetion.

Thanks,
priyanka

To post a comment you must log in.
Revision history for this message
Amit Parik (amit-parik) wrote : Posted in a previous version of this proposal

Its not proper.

You have to use like this.
currency = statement.journal_id.currency or statement.journal_id.company_id.currency_id

this is the better.

review: Needs Fixing
Revision history for this message
Amit Parik (amit-parik) wrote :

Now its fine.

review: Approve
8601. By Priyanka Jani(OpenERP Trainee)

[MERGE] with trunk

Unmerged revisions

8601. By Priyanka Jani(OpenERP Trainee)

[MERGE] with trunk

8600. By Priyanka Jani(OpenERP Trainee)

[IMP]:add currency of journal_id

8599. By Priyanka Jani(OpenERP Trainee)

[FIX]:addons:Wrong currency on bank statement in multi company setup

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/account_bank_statement.py'
2--- account/account_bank_statement.py 2012-12-20 11:54:56 +0000
3+++ account/account_bank_statement.py 2013-03-13 10:20:27 +0000
4@@ -73,9 +73,7 @@
5 default_currency = res_users_obj.browse(cursor, user,
6 user, context=context).company_id.currency_id
7 for statement in self.browse(cursor, user, ids, context=context):
8- currency = statement.journal_id.currency
9- if not currency:
10- currency = default_currency
11+ currency = statement.journal_id.currency or statement.journal_id.company_id.currency_id
12 res[statement.id] = currency.id
13 currency_names = {}
14 for currency_id, currency_name in res_currency_obj.name_get(cursor,

Subscribers

People subscribed via source and target branches

to all changes: