← Back to team overview

clearcorp team mailing list archive

[Merge] lp:~rr.clearcorp/openobject-addons/6.1-ccorp-account into lp:~clearcorp-drivers/openobject-addons/6.1-ccorp

 

Ronald Rubi has proposed merging lp:~rr.clearcorp/openobject-addons/6.1-ccorp-account into lp:~clearcorp-drivers/openobject-addons/6.1-ccorp.

Requested reviews:
  CLEARCORP drivers (clearcorp-drivers)

For more details, see:
https://code.launchpad.net/~rr.clearcorp/openobject-addons/6.1-ccorp-account/+merge/145696

Merge patch support openerp. Fix Generate Opening Entries where amount_currency in account_move_line is NULL
-- 
https://code.launchpad.net/~rr.clearcorp/openobject-addons/6.1-ccorp-account/+merge/145696
Your team CLEARCORP development team is subscribed to branch lp:~clearcorp-drivers/openobject-addons/6.1-ccorp.
=== modified file 'account/account.py'
--- account/account.py	2012-10-10 20:56:39 +0000
+++ account/account.py	2013-01-30 19:15:29 +0000
@@ -1519,7 +1519,7 @@
         cr.execute('update account_move_line set '+mode2+'=%s where id=%s', (result, line_id))
 
         #adjust also the amount in currency if needed
-        cr.execute("select currency_id, sum(amount_currency) as amount_currency from account_move_line where move_id = %s and currency_id is not null group by currency_id", (move.id,))
+        cr.execute("select currency_id, COALESCE(sum(amount_currency),0.0) as amount_currency from account_move_line where move_id = %s and currency_id is not null group by currency_id", (move.id,))
         for row in cr.dictfetchall():
             currency_id = currency_obj.browse(cr, uid, row['currency_id'], context=context)
             if not currency_obj.is_zero(cr, uid, currency_id, row['amount_currency']):


Follow ups