~jgrandguillaume-c2c/openobject-addons/multi-company-cost-price

« back to all changes in this revision

Viewing changes to account/report/general_ledger.py

  • Committer: Joël Grand-Guillaume
  • Date: 2010-04-08 09:00:10 UTC
  • mfrom: (2533.3.664)
  • Revision ID: joel.grandguillaume@camptocamp.com-20100408090010-c0pqjan341s18bxs
[MRG] Merge from last trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
26
26
 
27
27
import time
28
 
from mx.DateTime import *
29
28
from report import report_sxw
30
29
import xml
31
30
import rml_parse
258
257
        else:
259
258
            sorttag = 'j.code'
260
259
        sql = """
261
 
            SELECT l.id, l.date, j.code,c.code AS currency_code,l.amount_currency,l.ref, l.name , l.debit, l.credit, l.period_id
 
260
            SELECT l.id, l.date, j.code,c.code AS currency_code,l.amount_currency,l.ref, l.name , COALESCE(l.debit,0) as debit, COALESCE(l.credit,0) as credit, l.period_id
262
261
                    FROM account_move_line as l
263
262
                       LEFT JOIN res_currency c on (l.currency_id=c.id)
264
263
                          JOIN account_journal j on (l.journal_id=j.id)