diff --git a/account_chart_report/README.rst b/account_chart_report/README.rst new file mode 100644 index 00000000..ed6059e0 --- /dev/null +++ b/account_chart_report/README.rst @@ -0,0 +1,17 @@ +Print chart of accounts +======================= + +This module add the menu Accounting \ Charts \ Print chart of Accounts +and allow to print the selected chart of accounts. + +This module is based on the old RML engine report. + +Credits +======= + +Contributors +------------ + +* Marc Cassuto (marc.cassuto@savoirfairelinux.com) +* Mathieu Benoit (mathieu.benoit@savoirfairelinux.com) +* Guillaume Auger (guillaume.auger@savoirfairelinux.com) diff --git a/__unported__/account_chart_report/__init__.py b/account_chart_report/__init__.py similarity index 100% rename from __unported__/account_chart_report/__init__.py rename to account_chart_report/__init__.py diff --git a/__unported__/account_chart_report/__openerp__.py b/account_chart_report/__openerp__.py similarity index 78% rename from __unported__/account_chart_report/__openerp__.py rename to account_chart_report/__openerp__.py index 7d2fbde6..654c4680 100644 --- a/__unported__/account_chart_report/__openerp__.py +++ b/account_chart_report/__openerp__.py @@ -25,19 +25,6 @@ 'name': 'Print chart of accounts', 'version': '1.0', 'category': 'Reports/pdf', - 'description': """Print chart of accounts. - -This module add the menu Accounting \ Charts \ Print chart of Accounts -and allow to print the selected chart of accounts. - -This module is based on the old RML engine report. - -Contributors ------------- -* Marc Cassuto (marc.cassuto@savoirfairelinux.com) -* Mathieu Benoit (mathieu.benoit@savoirfairelinux.com) - - """, 'author': 'Savoir-faire Linux', 'website': 'http://www.savoirfairelinux.com', 'depends': [ @@ -48,6 +35,6 @@ Contributors 'account_report.xml', 'wizard/account_report_chart_of_account.xml', ], - 'installable': False, + 'installable': True, 'auto_install': False, } diff --git a/__unported__/account_chart_report/account_report.xml b/account_chart_report/account_report.xml similarity index 100% rename from __unported__/account_chart_report/account_report.xml rename to account_chart_report/account_report.xml diff --git a/__unported__/account_chart_report/i18n/account_chart_report.pot b/account_chart_report/i18n/account_chart_report.pot similarity index 100% rename from __unported__/account_chart_report/i18n/account_chart_report.pot rename to account_chart_report/i18n/account_chart_report.pot diff --git a/__unported__/account_chart_report/i18n/fr.po b/account_chart_report/i18n/fr.po similarity index 100% rename from __unported__/account_chart_report/i18n/fr.po rename to account_chart_report/i18n/fr.po diff --git a/__unported__/account_chart_report/report/__init__.py b/account_chart_report/report/__init__.py similarity index 100% rename from __unported__/account_chart_report/report/__init__.py rename to account_chart_report/report/__init__.py diff --git a/__unported__/account_chart_report/report/chart_of_accounts.py b/account_chart_report/report/chart_of_accounts.py similarity index 100% rename from __unported__/account_chart_report/report/chart_of_accounts.py rename to account_chart_report/report/chart_of_accounts.py diff --git a/__unported__/account_chart_report/report/chart_of_accounts.rml b/account_chart_report/report/chart_of_accounts.rml similarity index 100% rename from __unported__/account_chart_report/report/chart_of_accounts.rml rename to account_chart_report/report/chart_of_accounts.rml diff --git a/__unported__/account_chart_report/wizard/__init__.py b/account_chart_report/wizard/__init__.py similarity index 100% rename from __unported__/account_chart_report/wizard/__init__.py rename to account_chart_report/wizard/__init__.py diff --git a/__unported__/account_chart_report/wizard/account_report_chart_of_account.py b/account_chart_report/wizard/account_report_chart_of_account.py similarity index 65% rename from __unported__/account_chart_report/wizard/account_report_chart_of_account.py rename to account_chart_report/wizard/account_report_chart_of_account.py index b471bdbf..872ac507 100644 --- a/__unported__/account_chart_report/wizard/account_report_chart_of_account.py +++ b/account_chart_report/wizard/account_report_chart_of_account.py @@ -20,25 +20,23 @@ # ############################################################################## -from openerp.osv import fields, orm +from openerp import fields, models, api -class ChartOfAccountsReport(orm.TransientModel): +class ChartOfAccountsReport(models.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 Accounts', - help='Select Charts of Accounts', - required=True, - domain=domain_char_account), - } + chart_account_id = fields.Many2one( + 'account.account', + 'Chart of Accounts', + help='Select Charts of Accounts', + required=True, + domain=([('parent_id', '=', False)])) - 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] + @api.multi + def print_report(self, data): + account_id = self.chart_account_id.id data["form"] = {"id_account": account_id} return { 'type': 'ir.actions.report.xml', diff --git a/__unported__/account_chart_report/wizard/account_report_chart_of_account.xml b/account_chart_report/wizard/account_report_chart_of_account.xml similarity index 100% rename from __unported__/account_chart_report/wizard/account_report_chart_of_account.xml rename to account_chart_report/wizard/account_report_chart_of_account.xml