2011-08-11 11:08:47 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
##############################################################################
|
|
|
|
#
|
|
|
|
# OpenERP, Open Source Management Solution
|
|
|
|
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Affero General Public License as
|
|
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
|
|
# License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Affero General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
from osv import fields, osv
|
|
|
|
|
2011-08-12 11:23:21 +00:00
|
|
|
class accounting_report(osv.osv_memory):
|
|
|
|
_name = "accounting.report"
|
2011-08-11 11:08:47 +00:00
|
|
|
_inherit = "account.common.report"
|
|
|
|
_description = "Account Report"
|
|
|
|
|
|
|
|
_columns = {
|
2011-08-19 05:40:14 +00:00
|
|
|
'comparison': fields.boolean('Enable Comparison'),
|
|
|
|
'account_details': fields.boolean('Details by Account'),
|
2011-08-19 07:00:07 +00:00
|
|
|
'account_report_id': fields.many2one('account.report', 'Account Reports', required=True),
|
2011-08-17 12:02:19 +00:00
|
|
|
}
|
2011-08-12 11:23:21 +00:00
|
|
|
def _print_report(self, cr, uid, ids, data, context=None):
|
2011-08-19 05:40:14 +00:00
|
|
|
data['form'].update(self.read(cr, uid, ids, ['account_report_id', 'comparison', 'account_details'], context=context)[0])
|
2011-08-12 11:23:21 +00:00
|
|
|
return {
|
|
|
|
'type': 'ir.actions.report.xml',
|
|
|
|
'report_name': 'account.common',
|
|
|
|
'datas': data,
|
|
|
|
}
|
|
|
|
|
|
|
|
accounting_report()
|
2011-08-11 11:08:47 +00:00
|
|
|
|
2011-08-18 05:40:26 +00:00
|
|
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|