bzr revid: fp@tinyerp.com-a41cc1bd04ad5f08dd24cb0d5878b30f3904e356
This commit is contained in:
Fabien Pinckaers 2007-08-06 11:36:05 +00:00
parent 55a4ffc8e4
commit 647938e705
1 changed files with 3 additions and 3 deletions

View File

@ -75,9 +75,9 @@ class payment_order(osv.osv):
def _total(self, cr, uid, ids, name, args, context={}):
if not ids: return {}
cr.execute("""select o.id, coalesce(sum(amount),0)
from payment_order o left join payment_line l on (o.id = l.order)
where o.id in (%s) group by o.id"""% ','.join(map(str,ids)))
cr.execute("""select l.order, coalesce(sum(amount),0)
from payment_order_line l
where l.order in (%s) group by l.order"""% ','.join(map(str,ids)))
return dict(cr.fetchall())
def nb_line(self, cr, uid, ids, name, args, context={}):