Divyesh Makwana(OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-922621-mdi into 
lp:openobject-addons.

Requested reviews:
  OpenERP Core Team (openerp)
Related bugs:
  Bug #922621 in OpenERP Addons: "[trunk] foreign_balance should not be 
computed for account with no secondary currency"
  https://bugs.launchpad.net/openobject-addons/+bug/922621

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-922621-mdi/+merge/91206

Hello Sir,

I have fix the issue: https://bugs.launchpad.net/openobject-addons/+bug/922621 
"foreign_balance should not be computed for account with no secondary currency".

Thanks and Regards,

Divyesh Makwana(MDI)
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-922621-mdi/+merge/91206
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-922621-mdi.
=== modified file 'account/account.py'
--- account/account.py	2012-01-31 13:36:57 +0000
+++ account/account.py	2012-02-02 06:22:21 +0000
@@ -278,7 +278,7 @@
                        "- COALESCE(SUM(l.credit), 0) as balance",
             'debit': "COALESCE(SUM(l.debit), 0) as debit",
             'credit': "COALESCE(SUM(l.credit), 0) as credit",
-            'foreign_balance': "COALESCE(SUM(l.amount_currency), 0) as foreign_balance",
+            'foreign_balance': "(SELECT CASE WHEN currency_id IS NULL THEN 0 ELSE COALESCE(SUM(l.amount_currency), 0) END FROM account_account WHERE id IN (l.account_id)) as foreign_balance ",
         }
         #get all the necessary accounts
         children_and_consolidated = self._get_children_and_consol(cr, uid, ids, context=context)

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to