Browse Source

Merge pull request #28 from guewen/8.0-account_journal_report_xls-migr

Migration of account_journal_report_xls to 8.0
pull/59/head
Sandy 10 years ago
parent
commit
c3c205a72e
  1. 14
      account_journal_report_xls/README.rst
  2. 0
      account_journal_report_xls/__init__.py
  3. 24
      account_journal_report_xls/__openerp__.py
  4. 0
      account_journal_report_xls/account_journal.py
  5. 309
      account_journal_report_xls/i18n/account_journal_report_xls.pot
  6. 0
      account_journal_report_xls/i18n/fr.po
  7. 0
      account_journal_report_xls/i18n/nl.po
  8. 0
      account_journal_report_xls/report/__init__.py
  9. 0
      account_journal_report_xls/report/nov_account_journal.py
  10. 0
      account_journal_report_xls/report/nov_account_journal.rml
  11. 12
      account_journal_report_xls/report/nov_account_journal_xls.py
  12. 0
      account_journal_report_xls/static/src/img/icon.png
  13. 83
      account_journal_report_xls/tests/export_csv_journal_by_fiscal_year.yml
  14. 107
      account_journal_report_xls/tests/export_csv_journal_by_period.yml
  15. 83
      account_journal_report_xls/tests/print_journal_by_fiscal_year.yml
  16. 107
      account_journal_report_xls/tests/print_journal_by_period.yml
  17. 0
      account_journal_report_xls/wizard/__init__.py
  18. 9
      account_journal_report_xls/wizard/print_journal_wizard.py
  19. 0
      account_journal_report_xls/wizard/print_journal_wizard.xml

14
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

0
__unported__/account_journal_report_xls/__init__.py → account_journal_report_xls/__init__.py

24
__unported__/account_journal_report_xls/__openerp__.py → account_journal_report_xls/__openerp__.py

@ -26,23 +26,6 @@
'license': 'AGPL-3', 'license': 'AGPL-3',
'author': 'Noviat', 'author': 'Noviat',
'category': 'Accounting & Finance', '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://launchpad.net/openerp-reporting-engines
""",
'depends': [ 'depends': [
'account_voucher', 'account_voucher',
'report_xls', 'report_xls',
@ -51,4 +34,11 @@ cf. https://launchpad.net/openerp-reporting-engines
'data': [ 'data': [
'wizard/print_journal_wizard.xml', '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,
} }

0
__unported__/account_journal_report_xls/account_journal.py → account_journal_report_xls/account_journal.py

309
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 ""

0
__unported__/account_journal_report_xls/i18n/fr.po → account_journal_report_xls/i18n/fr.po

0
__unported__/account_journal_report_xls/i18n/nl.po → account_journal_report_xls/i18n/nl.po

0
__unported__/account_journal_report_xls/report/__init__.py → account_journal_report_xls/report/__init__.py

0
__unported__/account_journal_report_xls/report/nov_account_journal.py → account_journal_report_xls/report/nov_account_journal.py

0
__unported__/account_journal_report_xls/report/nov_account_journal.rml → account_journal_report_xls/report/nov_account_journal.rml

12
__unported__/account_journal_report_xls/report/nov_account_journal_xls.py → 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]}, 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']) cell_style = xlwt.easyxf(_xs['xls_title'])
report_name = (10 * ' ').join([ report_name = (10 * ' ').join([
_p.company.name, _p.company.name,
@ -251,7 +251,7 @@ class account_journal_xls(report_xls):
ws, row_pos, row_data, row_style=cell_style) ws, row_pos, row_data, row_style=cell_style)
return row_pos + 1 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 wanted_list = self.wanted_list
debit_pos = self.debit_pos 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) ws, row_pos, row_data, row_style=self.rt_cell_style_right)
return row_pos + 1 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): if not _p.tax_codes(o):
return row_pos return row_pos
@ -400,9 +400,9 @@ class account_journal_xls(report_xls):
ws.footer_str = self.xls_footers['standard'] ws.footer_str = self.xls_footers['standard']
# Data # 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', account_journal_xls('report.nov.account.journal.xls', 'account.journal.period',
parser=account_journal_xls_parser) parser=account_journal_xls_parser)

0
__unported__/account_journal_report_xls/static/src/img/icon.png → account_journal_report_xls/static/src/img/icon.png

Before

Width: 256  |  Height: 256  |  Size: 15 KiB

After

Width: 256  |  Height: 256  |  Size: 15 KiB

83
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')

107
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')

83
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')

107
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')

0
__unported__/account_journal_report_xls/wizard/__init__.py → account_journal_report_xls/wizard/__init__.py

9
__unported__/account_journal_report_xls/wizard/print_journal_wizard.py → 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' _name = 'account.print.journal.xls'
_description = 'Print/Export Journal' _description = 'Print/Export Journal'
_columns = { _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': fields.boolean(
'Group Entries', 'Group Entries',
help="Group entries with same General Account & Tax Code."), help="Group entries with same General Account & Tax Code."),

0
__unported__/account_journal_report_xls/wizard/print_journal_wizard.xml → account_journal_report_xls/wizard/print_journal_wizard.xml

Loading…
Cancel
Save