openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #07896
[Bug 1359711] [NEW] [7.0] Bank statement wrong currency
Public bug reported:
Hi,
The bank statement currency is taking user company currency which is
wrong. Ideally it should take currency from journal.
Wrong code:
res_users_obj = self.pool.get('res.users')
default_currency = res_users_obj.browse(cursor, user,
user, context=context).company_id.currency_id
for statement in self.browse(cursor, user, ids, context=context):
currency = statement.journal_id.currency
if not currency:
currency = default_currency
Recommendation
currency = statement.journal_id.currency or statement.journal_id.company_id.currency_id
** Affects: ocb-addons
Importance: Undecided
Status: New
** Summary changed:
- [7.0] Bank statement currency is wrong
+ [7.0] Bank statement wrong currency
--
You received this bug notification because you are a member of OpenERP
Community Backports, which is subscribed to OpenERP Community Backports
(Addons).
https://bugs.launchpad.net/bugs/1359711
Title:
[7.0] Bank statement wrong currency
Status in OpenERP Community Backports (Addons):
New
Bug description:
Hi,
The bank statement currency is taking user company currency which is
wrong. Ideally it should take currency from journal.
Wrong code:
res_users_obj = self.pool.get('res.users')
default_currency = res_users_obj.browse(cursor, user,
user, context=context).company_id.currency_id
for statement in self.browse(cursor, user, ids, context=context):
currency = statement.journal_id.currency
if not currency:
currency = default_currency
Recommendation
currency = statement.journal_id.currency or statement.journal_id.company_id.currency_id
To manage notifications about this bug go to:
https://bugs.launchpad.net/ocb-addons/+bug/1359711/+subscriptions
Follow ups
References