From 27a0a2c059e3cf5cbca02700b9f4ffb8c30150d0 Mon Sep 17 00:00:00 2001 From: "Ujjvala Collins (OpenERP)" Date: Thu, 11 Aug 2011 16:38:47 +0530 Subject: [PATCH] [ADD] account: Added new object account.report for printing reports. bzr revid: uco@tinyerp.com-20110811110847-telg63rtz0bshdry --- addons/account/__openerp__.py | 1 + addons/account/wizard/__init__.py | 1 + addons/account/wizard/account_report.py | 45 +++++++++++++++ addons/account/wizard/account_report_view.xml | 56 +++++++++++++++++++ 4 files changed, 103 insertions(+) create mode 100644 addons/account/wizard/account_report.py create mode 100644 addons/account/wizard/account_report_view.xml diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index 23846183ddf..93270889657 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -98,6 +98,7 @@ module named account_voucher. 'wizard/account_reconcile_view.xml', 'wizard/account_reconcile_partner_process_view.xml', 'wizard/account_automatic_reconcile_view.xml', + 'wizard/account_report_view.xml', 'project/wizard/project_account_analytic_line_view.xml', 'account_end_fy.xml', 'account_invoice_view.xml', diff --git a/addons/account/wizard/__init__.py b/addons/account/wizard/__init__.py index caed6fc3977..f6090539b73 100644 --- a/addons/account/wizard/__init__.py +++ b/addons/account/wizard/__init__.py @@ -47,6 +47,7 @@ import account_open_closed_fiscalyear import account_invoice_state import account_chart import account_tax_chart +import account_report #TODO: remove this file no moe used # also remove related view fiel diff --git a/addons/account/wizard/account_report.py b/addons/account/wizard/account_report.py new file mode 100644 index 00000000000..3cd3b06be44 --- /dev/null +++ b/addons/account/wizard/account_report.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# 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 . +# +############################################################################## + +from osv import fields, osv + +class account_report(osv.osv_memory): + _name = "account.report" + _inherit = "account.common.report" + _description = "Account Report" + + _columns = { + 'parent_id': fields.many2one('account.report', 'Report'), + 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of invoice tax."), + 'type': fields.selection([ + ('sum','Sum'), + ('accounts','Accounts'), + ('account_report','Account Report'), + ],'Type'), + 'account_ids': fields.many2many('account.account', 'account_account_report', 'report_line_id', 'account_id', 'Accounts'), + 'note': fields.text('Notes'), + 'account_report_id': fields.many2one('account.report', 'Account Reports'), + 'enable_comparison': fields.boolean('Enable Comparison'), + } + +account_report() + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/wizard/account_report_view.xml b/addons/account/wizard/account_report_view.xml new file mode 100644 index 00000000000..0b326626ee2 --- /dev/null +++ b/addons/account/wizard/account_report_view.xml @@ -0,0 +1,56 @@ + + + + + + Account Report + account.report + form + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Mail Report + account.report + ir.actions.act_window + form + form + + new + + + + + +