[REF] Account: cleaning
bzr revid: mra@mra-laptop-20101005042518-1uyc69u55bpyenmi
This commit is contained in:
parent
2e3de2d694
commit
1bb8ea02bf
|
@ -2859,5 +2859,4 @@ class account_bank_accounts_wizard(osv.osv_memory):
|
||||||
|
|
||||||
account_bank_accounts_wizard()
|
account_bank_accounts_wizard()
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- encoding: utf-8 -*-
|
# -*- encoding: utf-8 -*-
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
# OpenERP, Open Source Management Solution
|
# OpenERP, Open Source Management Solution
|
||||||
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||||
# $Id$
|
# $Id$
|
||||||
#
|
#
|
||||||
|
@ -21,22 +21,22 @@
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from report import report_sxw
|
from report import report_sxw
|
||||||
from tools import amount_to_text_en
|
from tools import amount_to_text_en
|
||||||
|
|
||||||
class report_voucher_move(report_sxw.rml_parse):
|
class report_voucher_move(report_sxw.rml_parse):
|
||||||
def __init__(self, cr, uid, name, context):
|
def __init__(self, cr, uid, name, context=None):
|
||||||
super(report_voucher_move, self).__init__(cr, uid, name, context)
|
super(report_voucher_move, self).__init__(cr, uid, name, context=context)
|
||||||
self.localcontext.update({
|
self.localcontext.update({
|
||||||
'time': time,
|
'time': time,
|
||||||
'convert':self.convert,
|
'convert':self.convert,
|
||||||
'get_title': self.get_title,
|
'get_title': self.get_title,
|
||||||
'debit':self.debit,
|
'debit':self.debit,
|
||||||
'credit':self.credit,
|
'credit':self.credit,
|
||||||
#'get_ref' : self._get_ref
|
|
||||||
})
|
})
|
||||||
self.user=uid
|
self.user=uid
|
||||||
|
|
||||||
def convert(self, amount):
|
def convert(self, amount):
|
||||||
user_id = self.pool.get('res.users').browse(self.cr, self.user, [self.user])[0]
|
user_id = self.pool.get('res.users').browse(self.cr, self.user, [self.user])[0]
|
||||||
cur = user_id.company_id.currency_id.name
|
cur = user_id.company_id.currency_id.name
|
||||||
|
@ -49,22 +49,24 @@ class report_voucher_move(report_sxw.rml_parse):
|
||||||
type = voucher.journal_id.type
|
type = voucher.journal_id.type
|
||||||
title = type[0].swapcase() + type[1:] + " Voucher"
|
title = type[0].swapcase() + type[1:] + " Voucher"
|
||||||
return title
|
return title
|
||||||
|
|
||||||
def debit(self, move_ids):
|
def debit(self, move_ids):
|
||||||
debit = 0.0
|
debit = 0.0
|
||||||
for move in move_ids:
|
for move in move_ids:
|
||||||
debit +=move.debit
|
debit +=move.debit
|
||||||
return debit
|
return debit
|
||||||
|
|
||||||
def credit(self, move_ids):
|
def credit(self, move_ids):
|
||||||
credit = 0.0
|
credit = 0.0
|
||||||
for move in move_ids:
|
for move in move_ids:
|
||||||
credit +=move.credit
|
credit +=move.credit
|
||||||
return credit
|
return credit
|
||||||
|
|
||||||
report_sxw.report_sxw(
|
report_sxw.report_sxw(
|
||||||
'report.account.move.voucher',
|
'report.account.move.voucher',
|
||||||
'account.move',
|
'account.move',
|
||||||
'addons/account/report/voucher_print.rml',
|
'addons/account/report/voucher_print.rml',
|
||||||
parser=report_voucher_move,header="external"
|
parser=report_voucher_move,header="external"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
Loading…
Reference in New Issue