[REF]
bzr revid: mra@mra-laptop-20100720062128-emsachz8w2wudqrb
This commit is contained in:
parent
2c19dd689d
commit
57e44d10e8
|
@ -46,11 +46,11 @@ class journal_print(report_sxw.rml_parse, common_report_header):
|
|||
'get_filter': self._get_filter,
|
||||
'get_start_date': self._get_start_date,
|
||||
'get_end_date': self._get_end_date,
|
||||
'sum_currency_amount_account': self._sum_currency_amount_account,
|
||||
'sum_currency_amount_account': self._sum_currency_amount_account,
|
||||
'get_fiscalyear': self._get_fiscalyear,
|
||||
'get_start_date':self._get_start_date,
|
||||
'get_end_date':self._get_end_date,
|
||||
|
||||
|
||||
})
|
||||
|
||||
def set_context(self, objects, data, ids, report_type=None): # Improve move to common default?
|
||||
|
@ -97,13 +97,12 @@ class journal_print(report_sxw.rml_parse, common_report_header):
|
|||
return return_field
|
||||
else:
|
||||
currency_total = self.tot_currency = 0.0
|
||||
return currency_total
|
||||
return currency_total
|
||||
|
||||
def _get_account(self, data):
|
||||
if data['model']=='account.journal.period':
|
||||
if data['model'] == 'account.journal.period':
|
||||
return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).company_id.name
|
||||
return super(journal_print ,self)._get_account(data)
|
||||
|
||||
return super(journal_print ,self)._get_account(data)
|
||||
|
||||
report_sxw.report_sxw('report.account.journal.period.print', 'account.journal.period', 'addons/account/report/account_journal.rml', parser=journal_print, header='internal')
|
||||
|
||||
|
|
|
@ -127,10 +127,10 @@ class common_report_header(object):
|
|||
return ''
|
||||
|
||||
def _get_journal(self, data):
|
||||
codes=[]
|
||||
codes = []
|
||||
if data.get('form', False) and data['form'].get('journal_ids', False):
|
||||
self.cr.execute('select code from account_journal where id IN %s',(tuple(data['form']['journal_ids']),))
|
||||
codes = [x for x, in self.cr.fetchall()]
|
||||
return codes
|
||||
return codes
|
||||
|
||||
#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
Loading…
Reference in New Issue