From 4d288417909dc72ffab234c1cd2e1f6728277ac4 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Wed, 19 Nov 2014 10:41:26 +0100 Subject: [PATCH 1/8] Move account_journal_report_xls from __unported__ to root folder --- .../__init__.py | 0 .../__openerp__.py | 0 .../account_journal.py | 0 .../i18n/fr.po | 0 .../i18n/nl.po | 0 .../report/__init__.py | 0 .../report/nov_account_journal.py | 0 .../report/nov_account_journal.rml | 0 .../report/nov_account_journal_xls.py | 0 .../static/src/img/icon.png | Bin .../wizard/__init__.py | 0 .../wizard/print_journal_wizard.py | 0 .../wizard/print_journal_wizard.xml | 0 13 files changed, 0 insertions(+), 0 deletions(-) rename {__unported__/account_journal_report_xls => account_journal_report_xls}/__init__.py (100%) rename {__unported__/account_journal_report_xls => account_journal_report_xls}/__openerp__.py (100%) rename {__unported__/account_journal_report_xls => account_journal_report_xls}/account_journal.py (100%) rename {__unported__/account_journal_report_xls => account_journal_report_xls}/i18n/fr.po (100%) rename {__unported__/account_journal_report_xls => account_journal_report_xls}/i18n/nl.po (100%) rename {__unported__/account_journal_report_xls => account_journal_report_xls}/report/__init__.py (100%) rename {__unported__/account_journal_report_xls => account_journal_report_xls}/report/nov_account_journal.py (100%) rename {__unported__/account_journal_report_xls => account_journal_report_xls}/report/nov_account_journal.rml (100%) rename {__unported__/account_journal_report_xls => account_journal_report_xls}/report/nov_account_journal_xls.py (100%) rename {__unported__/account_journal_report_xls => account_journal_report_xls}/static/src/img/icon.png (100%) rename {__unported__/account_journal_report_xls => account_journal_report_xls}/wizard/__init__.py (100%) rename {__unported__/account_journal_report_xls => account_journal_report_xls}/wizard/print_journal_wizard.py (100%) rename {__unported__/account_journal_report_xls => account_journal_report_xls}/wizard/print_journal_wizard.xml (100%) diff --git a/__unported__/account_journal_report_xls/__init__.py b/account_journal_report_xls/__init__.py similarity index 100% rename from __unported__/account_journal_report_xls/__init__.py rename to account_journal_report_xls/__init__.py diff --git a/__unported__/account_journal_report_xls/__openerp__.py b/account_journal_report_xls/__openerp__.py similarity index 100% rename from __unported__/account_journal_report_xls/__openerp__.py rename to account_journal_report_xls/__openerp__.py diff --git a/__unported__/account_journal_report_xls/account_journal.py b/account_journal_report_xls/account_journal.py similarity index 100% rename from __unported__/account_journal_report_xls/account_journal.py rename to account_journal_report_xls/account_journal.py diff --git a/__unported__/account_journal_report_xls/i18n/fr.po b/account_journal_report_xls/i18n/fr.po similarity index 100% rename from __unported__/account_journal_report_xls/i18n/fr.po rename to account_journal_report_xls/i18n/fr.po diff --git a/__unported__/account_journal_report_xls/i18n/nl.po b/account_journal_report_xls/i18n/nl.po similarity index 100% rename from __unported__/account_journal_report_xls/i18n/nl.po rename to account_journal_report_xls/i18n/nl.po diff --git a/__unported__/account_journal_report_xls/report/__init__.py b/account_journal_report_xls/report/__init__.py similarity index 100% rename from __unported__/account_journal_report_xls/report/__init__.py rename to account_journal_report_xls/report/__init__.py diff --git a/__unported__/account_journal_report_xls/report/nov_account_journal.py b/account_journal_report_xls/report/nov_account_journal.py similarity index 100% rename from __unported__/account_journal_report_xls/report/nov_account_journal.py rename to account_journal_report_xls/report/nov_account_journal.py diff --git a/__unported__/account_journal_report_xls/report/nov_account_journal.rml b/account_journal_report_xls/report/nov_account_journal.rml similarity index 100% rename from __unported__/account_journal_report_xls/report/nov_account_journal.rml rename to account_journal_report_xls/report/nov_account_journal.rml diff --git a/__unported__/account_journal_report_xls/report/nov_account_journal_xls.py b/account_journal_report_xls/report/nov_account_journal_xls.py similarity index 100% rename from __unported__/account_journal_report_xls/report/nov_account_journal_xls.py rename to account_journal_report_xls/report/nov_account_journal_xls.py diff --git a/__unported__/account_journal_report_xls/static/src/img/icon.png b/account_journal_report_xls/static/src/img/icon.png similarity index 100% rename from __unported__/account_journal_report_xls/static/src/img/icon.png rename to account_journal_report_xls/static/src/img/icon.png diff --git a/__unported__/account_journal_report_xls/wizard/__init__.py b/account_journal_report_xls/wizard/__init__.py similarity index 100% rename from __unported__/account_journal_report_xls/wizard/__init__.py rename to account_journal_report_xls/wizard/__init__.py diff --git a/__unported__/account_journal_report_xls/wizard/print_journal_wizard.py b/account_journal_report_xls/wizard/print_journal_wizard.py similarity index 100% rename from __unported__/account_journal_report_xls/wizard/print_journal_wizard.py rename to account_journal_report_xls/wizard/print_journal_wizard.py diff --git a/__unported__/account_journal_report_xls/wizard/print_journal_wizard.xml b/account_journal_report_xls/wizard/print_journal_wizard.xml similarity index 100% rename from __unported__/account_journal_report_xls/wizard/print_journal_wizard.xml rename to account_journal_report_xls/wizard/print_journal_wizard.xml From cf278d39c483c724c6e70624c14125fcee5a04c0 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Wed, 19 Nov 2014 10:59:01 +0100 Subject: [PATCH 2/8] add the missing key installable --- account_journal_report_xls/__openerp__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/account_journal_report_xls/__openerp__.py b/account_journal_report_xls/__openerp__.py index cac29015..2e2471d5 100644 --- a/account_journal_report_xls/__openerp__.py +++ b/account_journal_report_xls/__openerp__.py @@ -51,4 +51,5 @@ cf. https://launchpad.net/openerp-reporting-engines 'data': [ 'wizard/print_journal_wizard.xml', ], + 'installable': True, } From e8bfbef0f04ad76ae8e3cc1e9cef457d9a924679 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Wed, 19 Nov 2014 10:59:40 +0100 Subject: [PATCH 3/8] Change URL from Launchpad to GitHub --- account_journal_report_xls/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_journal_report_xls/__openerp__.py b/account_journal_report_xls/__openerp__.py index 2e2471d5..1ecce0c2 100644 --- a/account_journal_report_xls/__openerp__.py +++ b/account_journal_report_xls/__openerp__.py @@ -40,7 +40,7 @@ This module adds journal reports by period and by fiscal year with These reports are available in PDF and XLS format. This module depends upon the 'report_xls' module, -cf. https://launchpad.net/openerp-reporting-engines +cf. https://github.com/OCA/reporting-engine """, 'depends': [ From 4a55f36be9902081808bdfabfbbdb111b03d6408 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Wed, 19 Nov 2014 11:00:54 +0100 Subject: [PATCH 4/8] Extract the description in README.rst --- account_journal_report_xls/README.rst | 14 ++++++++++++++ account_journal_report_xls/__openerp__.py | 17 ----------------- 2 files changed, 14 insertions(+), 17 deletions(-) create mode 100644 account_journal_report_xls/README.rst diff --git a/account_journal_report_xls/README.rst b/account_journal_report_xls/README.rst new file mode 100644 index 00000000..94b8b750 --- /dev/null +++ b/account_journal_report_xls/README.rst @@ -0,0 +1,14 @@ +Journal Reports +=============== + +This module adds journal reports by period and by fiscal year with + +* entries printed per move +* option to group entries with same general account & VAT case +* vat info per entry +* vat summary + +These reports are available in PDF and XLS format. + +This module depends upon the 'report_xls' module, +cf. https://github.com/OCA/reporting-engine diff --git a/account_journal_report_xls/__openerp__.py b/account_journal_report_xls/__openerp__.py index 1ecce0c2..4355f87c 100644 --- a/account_journal_report_xls/__openerp__.py +++ b/account_journal_report_xls/__openerp__.py @@ -26,23 +26,6 @@ 'license': 'AGPL-3', 'author': 'Noviat', 'category': 'Accounting & Finance', - 'description': """ - -Journal Reports -=============== - -This module adds journal reports by period and by fiscal year with - - entries printed per move - - option to group entries with same general account & VAT case - - vat info per entry - - vat summary - -These reports are available in PDF and XLS format. - -This module depends upon the 'report_xls' module, -cf. https://github.com/OCA/reporting-engine - - """, 'depends': [ 'account_voucher', 'report_xls', From 79798cb9f7a8ed33185cbbe7a5759df55c1f07b9 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Wed, 19 Nov 2014 13:16:46 +0100 Subject: [PATCH 5/8] If the relation table and fields are not explicit, they are created on the wrong table (the base model from which the model _inherit) See https://github.com/odoo/odoo/issues/3751 --- .../wizard/print_journal_wizard.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/account_journal_report_xls/wizard/print_journal_wizard.py b/account_journal_report_xls/wizard/print_journal_wizard.py index 6c4f9df7..cc2ab4a2 100644 --- a/account_journal_report_xls/wizard/print_journal_wizard.py +++ b/account_journal_report_xls/wizard/print_journal_wizard.py @@ -33,8 +33,13 @@ class account_print_journal_xls(orm.TransientModel): _name = 'account.print.journal.xls' _description = 'Print/Export Journal' _columns = { - 'journal_ids': fields.many2many('account.journal', string='Journals', - required=True), + 'journal_ids': fields.many2many( + 'account.journal', + 'account_print_journal_xls_journal_rel', + 'journal_xls_id', + 'journal_id', + string='Journals', + required=True), 'group_entries': fields.boolean( 'Group Entries', help="Group entries with same General Account & Tax Code."), From 9fddff5b266a3058d30613fc69c95b9c70b98019 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Wed, 19 Nov 2014 13:25:10 +0100 Subject: [PATCH 6/8] Correct pylint warning: W0621(redefined-outer-name) xlwt is imported, no need to pass it it in the arguments --- .../report/nov_account_journal_xls.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/account_journal_report_xls/report/nov_account_journal_xls.py b/account_journal_report_xls/report/nov_account_journal_xls.py index 57cdcd40..75fe9215 100644 --- a/account_journal_report_xls/report/nov_account_journal_xls.py +++ b/account_journal_report_xls/report/nov_account_journal_xls.py @@ -235,7 +235,7 @@ class account_journal_xls(report_xls): self.aml_cell_style_decimal]}, } - def _journal_title(self, o, ws, _p, row_pos, xlwt, _xs): + def _journal_title(self, o, ws, _p, row_pos, _xs): cell_style = xlwt.easyxf(_xs['xls_title']) report_name = (10 * ' ').join([ _p.company.name, @@ -251,7 +251,7 @@ class account_journal_xls(report_xls): ws, row_pos, row_data, row_style=cell_style) return row_pos + 1 - def _journal_lines(self, o, ws, _p, row_pos, xlwt, _xs): + def _journal_lines(self, o, ws, _p, row_pos, _xs): wanted_list = self.wanted_list debit_pos = self.debit_pos @@ -305,7 +305,7 @@ class account_journal_xls(report_xls): ws, row_pos, row_data, row_style=self.rt_cell_style_right) return row_pos + 1 - def _journal_vat_summary(self, o, ws, _p, row_pos, xlwt, _xs): + def _journal_vat_summary(self, o, ws, _p, row_pos, _xs): if not _p.tax_codes(o): return row_pos @@ -400,9 +400,9 @@ class account_journal_xls(report_xls): ws.footer_str = self.xls_footers['standard'] # Data - row_pos = self._journal_title(o, ws, _p, row_pos, xlwt, _xs) - row_pos = self._journal_lines(o, ws, _p, row_pos, xlwt, _xs) - row_pos = self._journal_vat_summary(o, ws, _p, row_pos, xlwt, _xs) + row_pos = self._journal_title(o, ws, _p, row_pos, _xs) + row_pos = self._journal_lines(o, ws, _p, row_pos, _xs) + row_pos = self._journal_vat_summary(o, ws, _p, row_pos, _xs) account_journal_xls('report.nov.account.journal.xls', 'account.journal.period', parser=account_journal_xls_parser) From 5fb5ec4e02ff097268f8cd5c254d0fc98d82b806 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Wed, 19 Nov 2014 14:02:56 +0100 Subject: [PATCH 7/8] Add tests to check if the reports and csv export are generated --- account_journal_report_xls/__openerp__.py | 6 + .../export_csv_journal_by_fiscal_year.yml | 83 ++++++++++++++ .../tests/export_csv_journal_by_period.yml | 107 ++++++++++++++++++ .../tests/print_journal_by_fiscal_year.yml | 83 ++++++++++++++ .../tests/print_journal_by_period.yml | 107 ++++++++++++++++++ 5 files changed, 386 insertions(+) create mode 100644 account_journal_report_xls/tests/export_csv_journal_by_fiscal_year.yml create mode 100644 account_journal_report_xls/tests/export_csv_journal_by_period.yml create mode 100644 account_journal_report_xls/tests/print_journal_by_fiscal_year.yml create mode 100644 account_journal_report_xls/tests/print_journal_by_period.yml diff --git a/account_journal_report_xls/__openerp__.py b/account_journal_report_xls/__openerp__.py index 4355f87c..dcd88583 100644 --- a/account_journal_report_xls/__openerp__.py +++ b/account_journal_report_xls/__openerp__.py @@ -34,5 +34,11 @@ 'data': [ 'wizard/print_journal_wizard.xml', ], + 'test': [ + 'tests/print_journal_by_fiscal_year.yml', + 'tests/print_journal_by_period.yml', + 'tests/export_csv_journal_by_fiscal_year.yml', + 'tests/export_csv_journal_by_period.yml', + ], 'installable': True, } diff --git a/account_journal_report_xls/tests/export_csv_journal_by_fiscal_year.yml b/account_journal_report_xls/tests/export_csv_journal_by_fiscal_year.yml new file mode 100644 index 00000000..0275c402 --- /dev/null +++ b/account_journal_report_xls/tests/export_csv_journal_by_fiscal_year.yml @@ -0,0 +1,83 @@ +- + In order to test the Excel General Ledger webkit wizard I will print report on all the journals +- + !python {model: account.account}: | + ctx = {} + data_dict = {'chart_account_id': ref('account.chart0'), + 'journal_ids': self.pool['account.journal'].search(cr, uid, []), + } + ctx.update({'model': 'account.account', + 'active_ids': [ref('account.chart0')], + 'active_id': ref('account.chart0')}) + from openerp.tools import test_reports + test_reports.try_report_action( + cr, uid, + 'account_journal_report_xls.action_print_journal_by_fiscalyear_xls', + wiz_data=data_dict, + context=ctx, + wiz_buttons='xls_export', + our_module='account_journal_report_xls') + +- + In order to test the Excel General Ledger webkit wizard I will print report with entries sorted by date +- + !python {model: account.account}: | + ctx = {} + data_dict = {'chart_account_id': ref('account.chart0'), + 'journal_ids': self.pool['account.journal'].search(cr, uid, []), + 'sort_selection': 'l.date', + } + ctx.update({'model': 'account.account', + 'active_ids': [ref('account.chart0')], + 'active_id': ref('account.chart0')}) + from openerp.tools import test_reports + test_reports.try_report_action( + cr, uid, + 'account_journal_report_xls.action_print_journal_by_fiscalyear_xls', + wiz_data=data_dict, + context=ctx, + wiz_buttons='xls_export', + our_module='account_journal_report_xls') + +- + In order to test the Excel General Ledger webkit wizard I will print report without grouped entries +- + !python {model: account.account}: | + ctx = {} + data_dict = {'chart_account_id': ref('account.chart0'), + 'journal_ids': self.pool['account.journal'].search(cr, uid, []), + 'group_entries': False, + } + ctx.update({'model': 'account.account', + 'active_ids': [ref('account.chart0')], + 'active_id': ref('account.chart0')}) + from openerp.tools import test_reports + test_reports.try_report_action( + cr, uid, + 'account_journal_report_xls.action_print_journal_by_fiscalyear_xls', + wiz_data=data_dict, + context=ctx, + wiz_buttons='xls_export', + our_module='account_journal_report_xls') + +- + In order to test the Excel General Ledger webkit wizard I will print report with currency +- + !python {model: account.account}: | + ctx = {} + data_dict = {'chart_account_id': ref('account.chart0'), + 'journal_ids': self.pool['account.journal'].search(cr, uid, []), + 'amount_currency': False, + } + ctx.update({'model': 'account.account', + 'active_ids': [ref('account.chart0')], + 'active_id': ref('account.chart0')}) + from openerp.tools import test_reports + test_reports.try_report_action( + cr, uid, + 'account_journal_report_xls.action_print_journal_by_fiscalyear_xls', + wiz_data=data_dict, + context=ctx, + wiz_buttons='xls_export', + our_module='account_journal_report_xls') + diff --git a/account_journal_report_xls/tests/export_csv_journal_by_period.yml b/account_journal_report_xls/tests/export_csv_journal_by_period.yml new file mode 100644 index 00000000..bc2e0f07 --- /dev/null +++ b/account_journal_report_xls/tests/export_csv_journal_by_period.yml @@ -0,0 +1,107 @@ +- + In order to test the Excel General Ledger webkit wizard I will print report on all the journals +- + !python {model: account.account}: | + ctx = {} + fiscalyear_id = self.pool['account.fiscalyear'].search(cr, uid, [])[0] + wizard = self.pool['account.print.journal.xls'] + period_ids = wizard.fy_period_ids(cr, uid, fiscalyear_id) + data_dict = {'chart_account_id': ref('account.chart0'), + 'journal_ids': self.pool['account.journal'].search(cr, uid, []), + 'fiscalyear_id': fiscalyear_id, + 'period_from': period_ids[0], + 'period_to': period_ids[-1], + } + ctx.update({'model': 'account.account', + 'active_ids': [ref('account.chart0')], + 'active_id': ref('account.chart0')}) + from openerp.tools import test_reports + test_reports.try_report_action( + cr, uid, + 'account_journal_report_xls.action_print_journal_by_period_xls', + wiz_data=data_dict, + context=ctx, + wiz_buttons='xls_export', + our_module='account_journal_report_xls') + +- + In order to test the Excel General Ledger webkit wizard I will print report with entries sorted by date +- + !python {model: account.account}: | + ctx = {} + fiscalyear_id = self.pool['account.fiscalyear'].search(cr, uid, [])[0] + wizard = self.pool['account.print.journal.xls'] + period_ids = wizard.fy_period_ids(cr, uid, fiscalyear_id) + data_dict = {'chart_account_id': ref('account.chart0'), + 'journal_ids': self.pool['account.journal'].search(cr, uid, []), + 'sort_selection': 'l.date', + 'fiscalyear_id': fiscalyear_id, + 'period_from': period_ids[0], + 'period_to': period_ids[-1], + } + ctx.update({'model': 'account.account', + 'active_ids': [ref('account.chart0')], + 'active_id': ref('account.chart0')}) + from openerp.tools import test_reports + test_reports.try_report_action( + cr, uid, + 'account_journal_report_xls.action_print_journal_by_period_xls', + wiz_data=data_dict, + context=ctx, + wiz_buttons='xls_export', + our_module='account_journal_report_xls') + +- + In order to test the Excel General Ledger webkit wizard I will print report without grouped entries +- + !python {model: account.account}: | + ctx = {} + fiscalyear_id = self.pool['account.fiscalyear'].search(cr, uid, [])[0] + wizard = self.pool['account.print.journal.xls'] + period_ids = wizard.fy_period_ids(cr, uid, fiscalyear_id) + data_dict = {'chart_account_id': ref('account.chart0'), + 'journal_ids': self.pool['account.journal'].search(cr, uid, []), + 'group_entries': False, + 'fiscalyear_id': fiscalyear_id, + 'period_from': period_ids[0], + 'period_to': period_ids[-1], + } + ctx.update({'model': 'account.account', + 'active_ids': [ref('account.chart0')], + 'active_id': ref('account.chart0')}) + from openerp.tools import test_reports + test_reports.try_report_action( + cr, uid, + 'account_journal_report_xls.action_print_journal_by_period_xls', + wiz_data=data_dict, + context=ctx, + wiz_buttons='xls_export', + our_module='account_journal_report_xls') + +- + In order to test the Excel General Ledger webkit wizard I will print report with currency +- + !python {model: account.account}: | + ctx = {} + fiscalyear_id = self.pool['account.fiscalyear'].search(cr, uid, [])[0] + wizard = self.pool['account.print.journal.xls'] + period_ids = wizard.fy_period_ids(cr, uid, fiscalyear_id) + data_dict = {'chart_account_id': ref('account.chart0'), + 'journal_ids': self.pool['account.journal'].search(cr, uid, []), + 'amount_currency': False, + 'fiscalyear_id': fiscalyear_id, + 'period_from': period_ids[0], + 'period_to': period_ids[-1], + } + ctx.update({'model': 'account.account', + 'active_ids': [ref('account.chart0')], + 'active_id': ref('account.chart0')}) + from openerp.tools import test_reports + test_reports.try_report_action( + cr, uid, + 'account_journal_report_xls.action_print_journal_by_period_xls', + wiz_data=data_dict, + context=ctx, + wiz_buttons='xls_export', + our_module='account_journal_report_xls') + diff --git a/account_journal_report_xls/tests/print_journal_by_fiscal_year.yml b/account_journal_report_xls/tests/print_journal_by_fiscal_year.yml new file mode 100644 index 00000000..27d6826f --- /dev/null +++ b/account_journal_report_xls/tests/print_journal_by_fiscal_year.yml @@ -0,0 +1,83 @@ +- + In order to test the Excel General Ledger webkit wizard I will print report on all the journals +- + !python {model: account.account}: | + ctx = {} + data_dict = {'chart_account_id': ref('account.chart0'), + 'journal_ids': self.pool['account.journal'].search(cr, uid, []), + } + ctx.update({'model': 'account.account', + 'active_ids': [ref('account.chart0')], + 'active_id': ref('account.chart0')}) + from openerp.tools import test_reports + test_reports.try_report_action( + cr, uid, + 'account_journal_report_xls.action_print_journal_by_fiscalyear_xls', + wiz_data=data_dict, + context=ctx, + wiz_buttons='print_report', + our_module='account_journal_report_xls') + +- + In order to test the Excel General Ledger webkit wizard I will print report with entries sorted by date +- + !python {model: account.account}: | + ctx = {} + data_dict = {'chart_account_id': ref('account.chart0'), + 'journal_ids': self.pool['account.journal'].search(cr, uid, []), + 'sort_selection': 'l.date', + } + ctx.update({'model': 'account.account', + 'active_ids': [ref('account.chart0')], + 'active_id': ref('account.chart0')}) + from openerp.tools import test_reports + test_reports.try_report_action( + cr, uid, + 'account_journal_report_xls.action_print_journal_by_fiscalyear_xls', + wiz_data=data_dict, + context=ctx, + wiz_buttons='print_report', + our_module='account_journal_report_xls') + +- + In order to test the Excel General Ledger webkit wizard I will print report without grouped entries +- + !python {model: account.account}: | + ctx = {} + data_dict = {'chart_account_id': ref('account.chart0'), + 'journal_ids': self.pool['account.journal'].search(cr, uid, []), + 'group_entries': False, + } + ctx.update({'model': 'account.account', + 'active_ids': [ref('account.chart0')], + 'active_id': ref('account.chart0')}) + from openerp.tools import test_reports + test_reports.try_report_action( + cr, uid, + 'account_journal_report_xls.action_print_journal_by_fiscalyear_xls', + wiz_data=data_dict, + context=ctx, + wiz_buttons='print_report', + our_module='account_journal_report_xls') + +- + In order to test the Excel General Ledger webkit wizard I will print report with currency +- + !python {model: account.account}: | + ctx = {} + data_dict = {'chart_account_id': ref('account.chart0'), + 'journal_ids': self.pool['account.journal'].search(cr, uid, []), + 'amount_currency': False, + } + ctx.update({'model': 'account.account', + 'active_ids': [ref('account.chart0')], + 'active_id': ref('account.chart0')}) + from openerp.tools import test_reports + test_reports.try_report_action( + cr, uid, + 'account_journal_report_xls.action_print_journal_by_fiscalyear_xls', + wiz_data=data_dict, + context=ctx, + wiz_buttons='print_report', + our_module='account_journal_report_xls') + diff --git a/account_journal_report_xls/tests/print_journal_by_period.yml b/account_journal_report_xls/tests/print_journal_by_period.yml new file mode 100644 index 00000000..eb36060c --- /dev/null +++ b/account_journal_report_xls/tests/print_journal_by_period.yml @@ -0,0 +1,107 @@ +- + In order to test the Excel General Ledger webkit wizard I will print report on all the journals +- + !python {model: account.account}: | + ctx = {} + fiscalyear_id = self.pool['account.fiscalyear'].search(cr, uid, [])[0] + wizard = self.pool['account.print.journal.xls'] + period_ids = wizard.fy_period_ids(cr, uid, fiscalyear_id) + data_dict = {'chart_account_id': ref('account.chart0'), + 'journal_ids': self.pool['account.journal'].search(cr, uid, []), + 'fiscalyear_id': fiscalyear_id, + 'period_from': period_ids[0], + 'period_to': period_ids[-1], + } + ctx.update({'model': 'account.account', + 'active_ids': [ref('account.chart0')], + 'active_id': ref('account.chart0')}) + from openerp.tools import test_reports + test_reports.try_report_action( + cr, uid, + 'account_journal_report_xls.action_print_journal_by_period_xls', + wiz_data=data_dict, + context=ctx, + wiz_buttons='print_report', + our_module='account_journal_report_xls') + +- + In order to test the Excel General Ledger webkit wizard I will print report with entries sorted by date +- + !python {model: account.account}: | + ctx = {} + fiscalyear_id = self.pool['account.fiscalyear'].search(cr, uid, [])[0] + wizard = self.pool['account.print.journal.xls'] + period_ids = wizard.fy_period_ids(cr, uid, fiscalyear_id) + data_dict = {'chart_account_id': ref('account.chart0'), + 'journal_ids': self.pool['account.journal'].search(cr, uid, []), + 'sort_selection': 'l.date', + 'fiscalyear_id': fiscalyear_id, + 'period_from': period_ids[0], + 'period_to': period_ids[-1], + } + ctx.update({'model': 'account.account', + 'active_ids': [ref('account.chart0')], + 'active_id': ref('account.chart0')}) + from openerp.tools import test_reports + test_reports.try_report_action( + cr, uid, + 'account_journal_report_xls.action_print_journal_by_period_xls', + wiz_data=data_dict, + context=ctx, + wiz_buttons='print_report', + our_module='account_journal_report_xls') + +- + In order to test the Excel General Ledger webkit wizard I will print report without grouped entries +- + !python {model: account.account}: | + ctx = {} + fiscalyear_id = self.pool['account.fiscalyear'].search(cr, uid, [])[0] + wizard = self.pool['account.print.journal.xls'] + period_ids = wizard.fy_period_ids(cr, uid, fiscalyear_id) + data_dict = {'chart_account_id': ref('account.chart0'), + 'journal_ids': self.pool['account.journal'].search(cr, uid, []), + 'group_entries': False, + 'fiscalyear_id': fiscalyear_id, + 'period_from': period_ids[0], + 'period_to': period_ids[-1], + } + ctx.update({'model': 'account.account', + 'active_ids': [ref('account.chart0')], + 'active_id': ref('account.chart0')}) + from openerp.tools import test_reports + test_reports.try_report_action( + cr, uid, + 'account_journal_report_xls.action_print_journal_by_period_xls', + wiz_data=data_dict, + context=ctx, + wiz_buttons='print_report', + our_module='account_journal_report_xls') + +- + In order to test the Excel General Ledger webkit wizard I will print report with currency +- + !python {model: account.account}: | + ctx = {} + fiscalyear_id = self.pool['account.fiscalyear'].search(cr, uid, [])[0] + wizard = self.pool['account.print.journal.xls'] + period_ids = wizard.fy_period_ids(cr, uid, fiscalyear_id) + data_dict = {'chart_account_id': ref('account.chart0'), + 'journal_ids': self.pool['account.journal'].search(cr, uid, []), + 'amount_currency': False, + 'fiscalyear_id': fiscalyear_id, + 'period_from': period_ids[0], + 'period_to': period_ids[-1], + } + ctx.update({'model': 'account.account', + 'active_ids': [ref('account.chart0')], + 'active_id': ref('account.chart0')}) + from openerp.tools import test_reports + test_reports.try_report_action( + cr, uid, + 'account_journal_report_xls.action_print_journal_by_period_xls', + wiz_data=data_dict, + context=ctx, + wiz_buttons='print_report', + our_module='account_journal_report_xls') + From 638214845f03abf425e3954e8a37e7e873b648c7 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Wed, 19 Nov 2014 14:35:22 +0100 Subject: [PATCH 8/8] Add pot for translations --- .../i18n/account_journal_report_xls.pot | 309 ++++++++++++++++++ 1 file changed, 309 insertions(+) create mode 100644 account_journal_report_xls/i18n/account_journal_report_xls.pot diff --git a/account_journal_report_xls/i18n/account_journal_report_xls.pot b/account_journal_report_xls/i18n/account_journal_report_xls.pot new file mode 100644 index 00000000..24ddae8b --- /dev/null +++ b/account_journal_report_xls/i18n/account_journal_report_xls.pot @@ -0,0 +1,309 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_journal_report_xls +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-11-19 13:34+0000\n" +"PO-Revision-Date: 2014-11-19 13:34+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_journal_report_xls +#: selection:account.print.journal.xls,target_move:0 +msgid "All Entries" +msgstr "" + +#. module: account_journal_report_xls +#: selection:account.print.journal.xls,target_move:0 +msgid "All Posted Entries" +msgstr "" + +#. module: account_journal_report_xls +#: code:addons/account_journal_report_xls/report/nov_account_journal.py:97 +#, python-format +msgid "Amount" +msgstr "" + +#. module: account_journal_report_xls +#: field:account.print.journal.xls,chart_account_id:0 +msgid "Chart of Account" +msgstr "" + +#. module: account_journal_report_xls +#: field:account.print.journal.xls,company_id:0 +msgid "Company" +msgstr "" + +#. module: account_journal_report_xls +#: field:account.print.journal.xls,create_uid:0 +msgid "Created by" +msgstr "" + +#. module: account_journal_report_xls +#: field:account.print.journal.xls,create_date:0 +msgid "Created on" +msgstr "" + +#. module: account_journal_report_xls +#: code:addons/account_journal_report_xls/report/nov_account_journal.py:98 +#, python-format +msgid "Credit" +msgstr "" + +#. module: account_journal_report_xls +#: code:addons/account_journal_report_xls/report/nov_account_journal.py:97 +#, python-format +msgid "Currency" +msgstr "" + +#. module: account_journal_report_xls +#: code:addons/account_journal_report_xls/report/nov_account_journal_xls.py:381 +#, python-format +msgid "Customisation Error!" +msgstr "" + +#. module: account_journal_report_xls +#: selection:account.print.journal.xls,filter:0 +#: selection:account.print.journal.xls,sort_selection:0 +msgid "Date" +msgstr "" + +#. module: account_journal_report_xls +#: code:addons/account_journal_report_xls/report/nov_account_journal.py:98 +#, python-format +msgid "Debit" +msgstr "" + +#. module: account_journal_report_xls +#: field:account.print.journal.xls,date_to:0 +msgid "End Date" +msgstr "" + +#. module: account_journal_report_xls +#: field:account.print.journal.xls,period_to:0 +msgid "End Period" +msgstr "" + +#. module: account_journal_report_xls +#: field:account.print.journal.xls,sort_selection:0 +msgid "Entries Sorted by" +msgstr "" + +#. module: account_journal_report_xls +#: view:account.print.journal.xls:account_journal_report_xls.view_print_journal_xls +msgid "Export" +msgstr "" + +#. module: account_journal_report_xls +#: field:account.print.journal.xls,filter:0 +msgid "Filter by" +msgstr "" + +#. module: account_journal_report_xls +#: field:account.print.journal.xls,fiscalyear_id:0 +#: code:addons/account_journal_report_xls/report/nov_account_journal.py:93 +#, python-format +msgid "Fiscal Year" +msgstr "" + +#. module: account_journal_report_xls +#: field:account.print.journal.xls,group_entries:0 +msgid "Group Entries" +msgstr "" + +#. module: account_journal_report_xls +#: help:account.print.journal.xls,group_entries:0 +msgid "Group entries with same General Account & Tax Code." +msgstr "" + +#. module: account_journal_report_xls +#: code:addons/account_journal_report_xls/report/nov_account_journal.py:270 +#, python-format +msgid "Grouped Entries" +msgstr "" + +#. module: account_journal_report_xls +#: field:account.print.journal.xls,id:0 +msgid "ID" +msgstr "" + +#. module: account_journal_report_xls +#: code:addons/account_journal_report_xls/report/nov_account_journal.py:209 +#, python-format +msgid "Invoice" +msgstr "" + +#. module: account_journal_report_xls +#: model:ir.model,name:account_journal_report_xls.model_account_journal +msgid "Journal" +msgstr "" + +#. module: account_journal_report_xls +#: selection:account.print.journal.xls,sort_selection:0 +msgid "Journal Entry Number" +msgstr "" + +#. module: account_journal_report_xls +#: code:addons/account_journal_report_xls/report/nov_account_journal_xls.py:244 +#, python-format +msgid "Journal Overview" +msgstr "" + +#. module: account_journal_report_xls +#: model:ir.actions.act_window,name:account_journal_report_xls.action_print_journal_by_fiscalyear_xls +#: model:ir.ui.menu,name:account_journal_report_xls.menu_print_journal_by_fiscalyear_xls +msgid "Journal by Fiscal Year" +msgstr "" + +#. module: account_journal_report_xls +#: model:ir.actions.act_window,name:account_journal_report_xls.action_print_journal_by_period_xls +#: model:ir.ui.menu,name:account_journal_report_xls.menu_print_journal_by_period_xls +msgid "Journal by Period" +msgstr "" + +#. module: account_journal_report_xls +#: view:account.print.journal.xls:account_journal_report_xls.view_print_journal_xls +#: field:account.print.journal.xls,journal_ids:0 +msgid "Journals" +msgstr "" + +#. module: account_journal_report_xls +#: help:account.print.journal.xls,fiscalyear_id:0 +msgid "Keep empty for all open fiscal year" +msgstr "" + +#. module: account_journal_report_xls +#: field:account.print.journal.xls,write_uid:0 +msgid "Last Updated by" +msgstr "" + +#. module: account_journal_report_xls +#: field:account.print.journal.xls,write_date:0 +msgid "Last Updated on" +msgstr "" + +#. module: account_journal_report_xls +#: code:addons/account_journal_report_xls/wizard/print_journal_wizard.py:160 +#: code:addons/account_journal_report_xls/wizard/print_journal_wizard.py:184 +#, python-format +msgid "No Data Available" +msgstr "" + +#. module: account_journal_report_xls +#: selection:account.print.journal.xls,filter:0 +msgid "No Filters" +msgstr "" + +#. module: account_journal_report_xls +#: code:addons/account_journal_report_xls/wizard/print_journal_wizard.py:161 +#: code:addons/account_journal_report_xls/wizard/print_journal_wizard.py:185 +#, python-format +msgid "No records found for your selection!" +msgstr "" + +#. module: account_journal_report_xls +#: code:addons/account_journal_report_xls/report/nov_account_journal.py:92 +#, python-format +msgid "Period" +msgstr "" + +#. module: account_journal_report_xls +#: view:account.print.journal.xls:account_journal_report_xls.view_print_journal_xls +#: selection:account.print.journal.xls,filter:0 +msgid "Periods" +msgstr "" + +#. module: account_journal_report_xls +#: view:account.print.journal.xls:account_journal_report_xls.view_print_journal_xls +msgid "Print" +msgstr "" + +#. module: account_journal_report_xls +#: help:account.print.journal.xls,amount_currency:0 +msgid "Print Report with the currency column if the currency differs from the company currency." +msgstr "" + +#. module: account_journal_report_xls +#: model:ir.model,name:account_journal_report_xls.model_account_print_journal_xls +msgid "Print/Export Journal" +msgstr "" + +#. module: account_journal_report_xls +#: code:addons/account_journal_report_xls/report/nov_account_journal_xls.py:327 +#, python-format +msgid "Programming Error!" +msgstr "" + +#. module: account_journal_report_xls +#: help:account.print.journal.xls,chart_account_id:0 +msgid "Select Charts of Accounts" +msgstr "" + +#. module: account_journal_report_xls +#: field:account.print.journal.xls,date_from:0 +msgid "Start Date" +msgstr "" + +#. module: account_journal_report_xls +#: field:account.print.journal.xls,period_from:0 +msgid "Start Period" +msgstr "" + +#. module: account_journal_report_xls +#: code:addons/account_journal_report_xls/report/nov_account_journal.py:213 +#, python-format +msgid "Statement" +msgstr "" + +#. module: account_journal_report_xls +#: field:account.print.journal.xls,target_move:0 +msgid "Target Moves" +msgstr "" + +#. module: account_journal_report_xls +#: code:addons/account_journal_report_xls/report/nov_account_journal_xls.py:382 +#, python-format +msgid "The 'Balance' field is a calculated XLS field requiring the presence of the 'Debit' and 'Credit' fields !" +msgstr "" + +#. module: account_journal_report_xls +#: view:account.print.journal.xls:account_journal_report_xls.view_print_journal_xls +msgid "This report allows you to generate a pdf or xls of your journals" +msgstr "" + +#. module: account_journal_report_xls +#: code:addons/account_journal_report_xls/report/nov_account_journal_xls.py:314 +#, python-format +msgid "VAT Declaration" +msgstr "" + +#. module: account_journal_report_xls +#: code:addons/account_journal_report_xls/report/nov_account_journal.py:210 +#: code:addons/account_journal_report_xls/report/nov_account_journal.py:214 +#, python-format +msgid "Voucher" +msgstr "" + +#. module: account_journal_report_xls +#: field:account.print.journal.xls,amount_currency:0 +msgid "With Currency" +msgstr "" + +#. module: account_journal_report_xls +#: view:account.print.journal.xls:account_journal_report_xls.view_print_journal_xls +msgid "onchange_fiscalyear_id(fiscalyear_id, context)" +msgstr "" + +#. module: account_journal_report_xls +#: code:addons/account_journal_report_xls/report/nov_account_journal_xls.py:328 +#, python-format +msgid "vat_summary_cols_number should be < cols_number !" +msgstr "" +