From 624856cd4a0ca5d348c0a5b68e712075e9089d29 Mon Sep 17 00:00:00 2001 From: Marc Cassuto Date: Wed, 30 Jul 2014 14:29:28 -0400 Subject: [PATCH] account_chart_report: PEP8 complience + update description --- account_chart_report/__init__.py | 24 ------- account_chart_report/__openerp__.py | 47 -------------- account_chart_report/account_report.xml | 15 ----- account_chart_report/report/__init__.py | 23 ------- .../report/chart_of_accounts.py | 60 ----------------- .../report/chart_of_accounts.rml | 64 ------------------- account_chart_report/wizard/__init__.py | 23 ------- .../wizard/account_report_chart_of_account.py | 47 -------------- .../account_report_chart_of_account.xml | 41 ------------ 9 files changed, 344 deletions(-) delete mode 100644 account_chart_report/__init__.py delete mode 100644 account_chart_report/__openerp__.py delete mode 100644 account_chart_report/account_report.xml delete mode 100644 account_chart_report/report/__init__.py delete mode 100644 account_chart_report/report/chart_of_accounts.py delete mode 100644 account_chart_report/report/chart_of_accounts.rml delete mode 100644 account_chart_report/wizard/__init__.py delete mode 100644 account_chart_report/wizard/account_report_chart_of_account.py delete mode 100644 account_chart_report/wizard/account_report_chart_of_account.xml diff --git a/account_chart_report/__init__.py b/account_chart_report/__init__.py deleted file mode 100644 index ebe217eb..00000000 --- a/account_chart_report/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- - -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2014 Savoir-faire Linux (). -# -# 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 . import report -from . import wizard diff --git a/account_chart_report/__openerp__.py b/account_chart_report/__openerp__.py deleted file mode 100644 index 8ec0640d..00000000 --- a/account_chart_report/__openerp__.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################### -# -# OpenERP, Open Source Management Solution -# This module copyright (C) 2014 Savoir-faire Linux -# (). -# -# 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 . -# -############################################################################### - - -{ - 'name': 'Print chart of accounts', - 'version': '1.0', - 'category': 'Reports/pdf', - 'description': """Print chart of accounts. - -Contributors ------------- -* Mathieu Benoit (mathieu.benoit@savoirfairelinux.com) - - """, - 'author': 'Savoir-faire Linux', - 'website': 'http://www.savoirfairelinux.com', - 'depends': [ - 'base', - 'account', - ], - 'data': [ - 'account_report.xml', - 'wizard/account_report_chart_of_account.xml', - ], - 'installable': True, - 'auto_install': False, -} diff --git a/account_chart_report/account_report.xml b/account_chart_report/account_report.xml deleted file mode 100644 index 4d511857..00000000 --- a/account_chart_report/account_report.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - diff --git a/account_chart_report/report/__init__.py b/account_chart_report/report/__init__.py deleted file mode 100644 index 75edec50..00000000 --- a/account_chart_report/report/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- - -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2014 Savoir-faire Linux (). -# -# 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 . import chart_of_accounts diff --git a/account_chart_report/report/chart_of_accounts.py b/account_chart_report/report/chart_of_accounts.py deleted file mode 100644 index 19d8f6a6..00000000 --- a/account_chart_report/report/chart_of_accounts.py +++ /dev/null @@ -1,60 +0,0 @@ -# -*- coding: utf-8 -*- - -# ############################################################################# -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2014 Savoir-faire Linux (). -# -# 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 openerp.report import report_sxw - - -class account_char(report_sxw.rml_parse): - _name = 'report.account.print.chart' - - def __init__(self, cr, uid, name, context=None): - super(account_char, self).__init__(cr, uid, name, context=context) - self.localcontext.update({ - "get_lst_account": self._get_lst_account, - "cr": cr, - "uid": uid, - "actual_context": context, - }) - - def _get_lst_account(self, cr, uid, account_id, context): - account_obj = self.pool.get("account.account") - actual_account = account_obj.browse(cr, uid, account_id, - context=context) - lst_account = [] - self._fill_list_account_with_child(lst_account, actual_account) - return lst_account - - def _fill_list_account_with_child(self, lst_account, account): - # no more child - lst_account.append(account) - if not account.child_id: - return - for child in account.child_id: - self._fill_list_account_with_child(lst_account, child) - - -report_sxw.report_sxw( - 'report.account.print.chart', - 'account.account', - 'account_chart_report/report/chart_of_accounts.rml', - parser=account_char, -) diff --git a/account_chart_report/report/chart_of_accounts.rml b/account_chart_report/report/chart_of_accounts.rml deleted file mode 100644 index da8ac8bd..00000000 --- a/account_chart_report/report/chart_of_accounts.rml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Chart of accounts - - - - - - - - - - - - - - - - - - Code - Account - - - [[ repeatIn(get_lst_account(cr, uid, data["form"]["id_account"], actual_context), 'a') ]][[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ a['code'] or removeParentNode('tr') ]] - [[ (a['type']<>'view' and setTag('para','para',{'fontName':"Helvetica"})) or removeParentNode('font') ]][[ '..'*(a['level']-1) ]][[ a['name'] ]] - - - - - - - diff --git a/account_chart_report/wizard/__init__.py b/account_chart_report/wizard/__init__.py deleted file mode 100644 index 4b7dba05..00000000 --- a/account_chart_report/wizard/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- - -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2014 Savoir-faire Linux (). -# -# 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 . import account_report_chart_of_account diff --git a/account_chart_report/wizard/account_report_chart_of_account.py b/account_chart_report/wizard/account_report_chart_of_account.py deleted file mode 100644 index 7782ebec..00000000 --- a/account_chart_report/wizard/account_report_chart_of_account.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- coding: utf-8 -*- - -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2014 Savoir-faire Linux (). -# -# 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 openerp.osv import fields, orm - - -class chart_of_account_report(orm.TransientModel): - _name = 'account.print.chart.accounts.report' - _description = 'Chart of accounts Report' - - domain_char_account = [('parent_id', '=', False)] - _columns = { - 'chart_account_id': fields.many2one('account.account', - 'Chart of Account', - help='Select Charts of Accounts', - required=True, - domain=domain_char_account), - } - - def print_report(self, cr, uid, ids, data, context=None): - res = self.read(cr, uid, ids, context=context)[0] - account_id = res["chart_account_id"][0] - data["form"] = {"id_account": account_id} - return { - 'type': 'ir.actions.report.xml', - 'report_name': 'account.print.chart', - 'datas': data - } diff --git a/account_chart_report/wizard/account_report_chart_of_account.xml b/account_chart_report/wizard/account_report_chart_of_account.xml deleted file mode 100644 index af53cf83..00000000 --- a/account_chart_report/wizard/account_report_chart_of_account.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - Print chart of accounts - account.print.chart.accounts.report - -
- - - -
-
-
-
-
- - - Print chart of accounts - ir.actions.act_window - account.print.chart.accounts.report - form - form - new - - - - -
-