[IMP] Change src dest main currency when creating accounting entries for stock

bzr revid: jco@openerp.com-20130530150441-fgr5aoi89v4gvra1
This commit is contained in:
Josse Colpaert
2013-05-30 17:04:41 +02:00
parent b0ee73993c
commit 619bbffa5f
+2 -2
View File
@@ -2423,8 +2423,8 @@ class stock_move(osv.osv):
# or if it's the same as that of the secondary amount being posted.
account_obj = self.pool.get('account.account')
src_acct, dest_acct = account_obj.browse(cr, uid, [src_account_id, dest_account_id], context=context)
src_main_currency_id = src_acct.currency_id and src_acct.currency_id.id or src_acct.company_id.currency_id.id
dest_main_currency_id = dest_acct.currency_id and dest_acct.currency_id.id or dest_acct.company_id.currency_id.id
src_main_currency_id = src_acct.company_id.currency_id.id
dest_main_currency_id = dest_acct.company_id.currency_id.id
cur_obj = self.pool.get('res.currency')
if reference_currency_id != src_main_currency_id:
# fix credit line: