~openerp-chinese-team/openerp-china/openerp-china

« back to all changes in this revision

Viewing changes to oecn_account_print/report/oecn_account_print_report.py

  • Committer: JoshuaJan
  • Date: 2012-08-29 09:37:27 UTC
  • Revision ID: popkar77@gmail.com-20120829093727-14mxsq818t2kcvzo
1.凭证变成一页打印2张2.科目名字输出全名3.方向由余额决定

Show diffs side-by-side

added added

removed removed

Lines of Context:
136
136
        res['product'] = ""
137
137
        res['partner'] = ""
138
138
        res['report_name'] = u'三栏式明细账'
139
 
        if data.get('product', False):
 
139
        account_obj = self.pool.get('account.account')
 
140
        if data.get('account_code', False):
 
141
            #add '00' for the old version l10n_cn
 
142
            accuont_ids = account_obj.search(self.cr, self.uid, ['|',('code', '=', data['account_code']),('code', '=', data['account_code']+'00')])
 
143
            account = account_obj.browse(self.cr, self.uid, accuont_ids[0])
 
144
            res['report_name'] = account.name + u'日记账'                                       
 
145
        elif data.get('product', False):
140
146
            res['report_name'] = u'产品'
141
147
            res['product'] =data['product'][1]
142
 
        if data.get('partner', False):
 
148
        elif data.get('partner', False):
143
149
            res['report_name'] = u'往来明细账'
144
150
            res['partner'] = data['partner'][1]
145
151
        return res
254
260
#注册报表类
255
261
 
256
262
#总帐
257
 
report_sxw.report_sxw('report.account.general_ledger', 'account.account', 'addons/oecn_account_print/report/general_ledger.rml', parser=detail_ledger_parser, header=False)
 
263
report_sxw.report_sxw('report.account.general_ledger', 'account.account', 'addons/oecn_account_print/report/general_ledger.odt', parser=detail_ledger_parser, header=False)
258
264
 
259
265
#现金日记帐
260
266
report_sxw.report_sxw('report.account.cash_journal', 'account.account', 'addons/oecn_account_print/report/cash_journal.rml', parser=detail_ledger_parser, header=False)