openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #03006
lp:~luc-demeyer/account-financial-report/update-account_journal_report_xls into lp:account-financial-report
Luc De Meyer (Noviat) has proposed merging lp:~luc-demeyer/account-financial-report/update-account_journal_report_xls into lp:account-financial-report.
Requested reviews:
Account Report Core Editors (account-report-core-editor)
For more details, see:
https://code.launchpad.net/~luc-demeyer/account-financial-report/update-account_journal_report_xls/+merge/202223
Extra fields:
'acc_name', # account.account,name
'journal', # account.journal,name
'journal_code', # account.journal,code
'analytic_account', # account.analytic.account,name
'analytic_account_code', # account.analytic.account,code
--
https://code.launchpad.net/~luc-demeyer/account-financial-report/update-account_journal_report_xls/+merge/202223
Your team Account Report Core Editors is requested to review the proposed merge of lp:~luc-demeyer/account-financial-report/update-account_journal_report_xls into lp:account-financial-report.
=== modified file 'account_journal_report_xls/__init__.py'
--- account_journal_report_xls/__init__.py 2014-01-08 11:49:48 +0000
+++ account_journal_report_xls/__init__.py 2014-01-19 18:26:13 +0000
@@ -3,7 +3,7 @@
#
# OpenERP, Open Source Management Solution
#
-# Copyright (c) 2013 Noviat nv/sa (www.noviat.com). All rights reserved.
+# Copyright (c) 2014 Noviat nv/sa (www.noviat.com). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -12,11 +12,11 @@
#
# 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
+# 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 <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -28,6 +28,4 @@
import logging
logging.getLogger('openerp.module').warning('report_xls not available in addons path. account_financial_report_webkit_xls will not be usable')
-
-
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
=== modified file 'account_journal_report_xls/__openerp__.py'
--- account_journal_report_xls/__openerp__.py 2013-12-19 17:08:40 +0000
+++ account_journal_report_xls/__openerp__.py 2014-01-19 18:26:13 +0000
@@ -3,7 +3,7 @@
#
# OpenERP, Open Source Management Solution
#
-# Copyright (c) 2013 Noviat nv/sa (www.noviat.com). All rights reserved.
+# Copyright (c) 2014 Noviat nv/sa (www.noviat.com). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -12,17 +12,17 @@
#
# 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
+# 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 <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
'name': 'Financial Journal reports',
- 'version': '0.1',
+ 'version': '0.2',
'license': 'AGPL-3',
'author': 'Noviat',
'category': 'Accounting & Finance',
@@ -47,9 +47,8 @@
'account_voucher',
'report_xls',
],
- 'demo_xml': [],
- 'init_xml': [],
- 'update_xml': [
+ 'demo': [],
+ 'data': [
'wizard/print_journal_wizard.xml',
],
}
=== modified file 'account_journal_report_xls/account_journal.py'
--- account_journal_report_xls/account_journal.py 2013-12-19 17:08:40 +0000
+++ account_journal_report_xls/account_journal.py 2014-01-19 18:26:13 +0000
@@ -65,6 +65,11 @@
#'partner_ref', # res.partner,ref
#'move_ref', # account.move,ref
#'move_id', # account.move,id
+ #'acc_name', # account.account,name
+ #'journal', # account.journal,name
+ #'journal_code', # account.journal,code
+ #'analytic_account', # account.analytic.account,name
+ #'analytic_account_code', # account.analytic.account,code
]
return res
=== modified file 'account_journal_report_xls/i18n/fr.po'
--- account_journal_report_xls/i18n/fr.po 2013-12-18 20:08:12 +0000
+++ account_journal_report_xls/i18n/fr.po 2014-01-19 18:26:13 +0000
@@ -6,8 +6,8 @@
msgstr ""
"Project-Id-Version: OpenERP Server 6.1\n"
"Report-Msgid-Bugs-To: support@xxxxxxxxx\n"
-"POT-Creation-Date: 2013-11-23 17:11:14.941000\n"
-"PO-Revision-Date: 2013-11-23 17:11:14.941000\n"
+"POT-Creation-Date: 2014-01-19 17:16:37.990000\n"
+"PO-Revision-Date: 2014-01-19 17:16:37.990000\n"
"Last-Translator: Luc De Meyer (Noviat nv/sa)\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -121,11 +121,36 @@
#. module: account_journal_report_xls
#: report:nov.account.journal.print:0
+msgid "Journal Items"
+msgstr "Écritures comptables"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
msgid "Entry"
msgstr "Écriture"
#. module: account_journal_report_xls
#: report:nov.account.journal.print:0
+msgid "Name"
+msgstr "Nom"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
+msgid "Reference"
+msgstr "Référence"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
+msgid "Effective Date"
+msgstr "Date"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
+msgid "Period"
+msgstr "Période"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
msgid "Date"
msgstr "Date"
@@ -136,6 +161,16 @@
#. module: account_journal_report_xls
#: report:nov.account.journal.print:0
+msgid "Account Name"
+msgstr "Description compte "
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
+msgid "Journal"
+msgstr "Journal"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
msgid "Description"
msgstr "Description"
@@ -181,6 +216,16 @@
#. module: account_journal_report_xls
#: report:nov.account.journal.print:0
+msgid "Tax Code"
+msgstr "Case TVA"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
+msgid "Tax/Base Amount"
+msgstr "Montant TVA/Base"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
msgid "VAT"
msgstr "TVA"
@@ -211,6 +256,16 @@
#. module: account_journal_report_xls
#: report:nov.account.journal.print:0
+msgid "Comp. Curr."
+msgstr "Dev. Soc."
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
+msgid "Analytic Account"
+msgstr "Compte analytique"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
msgid "Document"
msgstr "Document"
=== modified file 'account_journal_report_xls/i18n/nl.po'
--- account_journal_report_xls/i18n/nl.po 2013-12-18 20:08:12 +0000
+++ account_journal_report_xls/i18n/nl.po 2014-01-19 18:26:13 +0000
@@ -6,8 +6,8 @@
msgstr ""
"Project-Id-Version: OpenERP Server 6.1\n"
"Report-Msgid-Bugs-To: support@xxxxxxxxx\n"
-"POT-Creation-Date: 2013-11-23 17:11:14.936000\n"
-"PO-Revision-Date: 2013-11-23 17:11:14.936000\n"
+"POT-Creation-Date: 2014-01-19 17:16:37.980000\n"
+"PO-Revision-Date: 2014-01-19 17:16:37.980000\n"
"Last-Translator: Luc De Meyer (Noviat nv/sa)\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -121,11 +121,36 @@
#. module: account_journal_report_xls
#: report:nov.account.journal.print:0
+msgid "Journal Items"
+msgstr "Boekingsregels"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
msgid "Entry"
msgstr "Boeking"
#. module: account_journal_report_xls
#: report:nov.account.journal.print:0
+msgid "Name"
+msgstr "Naam"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
+msgid "Reference"
+msgstr "Referentie"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
+msgid "Effective Date"
+msgstr "Datum"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
+msgid "Period"
+msgstr "Periode"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
msgid "Date"
msgstr "Datum"
@@ -136,6 +161,16 @@
#. module: account_journal_report_xls
#: report:nov.account.journal.print:0
+msgid "Account Name"
+msgstr "Omschrijving rekening"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
+msgid "Journal"
+msgstr "Dagboek"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
msgid "Description"
msgstr "Omschrijving"
@@ -181,6 +216,16 @@
#. module: account_journal_report_xls
#: report:nov.account.journal.print:0
+msgid "Tax Code"
+msgstr "BTW vak"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
+msgid "Tax/Base Amount"
+msgstr "Bedrag BTW/Mvh"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
msgid "VAT"
msgstr "BTW"
@@ -211,6 +256,16 @@
#. module: account_journal_report_xls
#: report:nov.account.journal.print:0
+msgid "Comp. Curr."
+msgstr "Bedr. Val."
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
+msgid "Analytic Account"
+msgstr "Kostenplaats"
+
+#. module: account_journal_report_xls
+#: report:nov.account.journal.print:0
msgid "Document"
msgstr "Document"
=== modified file 'account_journal_report_xls/report/nov_account_journal.py'
--- account_journal_report_xls/report/nov_account_journal.py 2013-12-23 21:36:43 +0000
+++ account_journal_report_xls/report/nov_account_journal.py 2014-01-19 18:26:13 +0000
@@ -3,7 +3,7 @@
#
# OpenERP, Open Source Management Solution
#
-# Copyright (c) 2013 Noviat nv/sa (www.noviat.com). All rights reserved.
+# Copyright (c) 2014 Noviat nv/sa (www.noviat.com). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -12,11 +12,11 @@
#
# 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
+# 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 <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -121,9 +121,12 @@
select_extra, join_extra, where_extra = j_obj._report_xls_query_extra(self.cr, self.uid, self.context)
+ # SQL select for performance reasons, as a consequence, there are no field value translations.
+ # If performance is no issue, you can adapt the _report_xls_template in an inherited module to add field value translations.
self.cr.execute("SELECT l.move_id AS move_id, l.id AS aml_id, "
"am.name AS move_name, coalesce(am.ref,'') AS move_ref, am.date AS move_date, "
- "aa.id AS account_id, aa.code AS acc_code, "
+ "aa.id AS account_id, aa.code AS acc_code, aa.name AS acc_name, "
+ "aj.name AS journal, aj.code AS journal_code, "
"coalesce(rp.name,'') AS partner_name, coalesce(rp.ref,'') AS partner_ref, rp.id AS partner_id, "
"coalesce(l.name,'') AS aml_name, "
"l.date_maturity AS date_maturity, "
@@ -131,6 +134,7 @@
"coalesce(atc.code,'') AS tax_code, atc.id AS tax_code_id, coalesce(l.tax_amount,0.0) AS tax_amount, "
"coalesce(l.debit,0.0) AS debit, coalesce(l.credit,0.0) AS credit, "
"coalesce(amr.name,'') AS reconcile, coalesce(amrp.name,'') AS reconcile_partial, "
+ "ana.name AS an_acc_name, coalesce(ana.code,'') AS an_acc_code, "
"coalesce(l.amount_currency,0.0) AS amount_currency, "
"rc.id AS currency_id, rc.name AS currency_name, rc.symbol AS currency_symbol, "
"coalesce(ai.internal_number,'-') AS inv_number, coalesce(abs.name,'-') AS st_number, coalesce(av.number,'-') AS voucher_number "
@@ -138,6 +142,7 @@
"FROM account_move_line l "
"INNER JOIN account_move am ON l.move_id = am.id "
"INNER JOIN account_account aa ON l.account_id = aa.id "
+ "INNER JOIN account_journal aj ON l.journal_id = aj.id "
"INNER JOIN account_period ap ON l.period_id = ap.id "
"LEFT OUTER JOIN account_invoice ai ON ai.move_id = am.id "
"LEFT OUTER JOIN account_voucher av ON av.move_id = am.id "
@@ -146,6 +151,7 @@
"LEFT OUTER JOIN account_tax_code atc ON l.tax_code_id = atc.id "
"LEFT OUTER JOIN account_move_reconcile amr ON l.reconcile_id = amr.id "
"LEFT OUTER JOIN account_move_reconcile amrp ON l.reconcile_partial_id = amrp.id "
+ "LEFT OUTER JOIN account_analytic_account ana ON l.analytic_account_id = ana.id "
"LEFT OUTER JOIN res_currency rc ON l.currency_id = rc.id "
+ join_extra +
"WHERE l.period_id IN %s AND l.journal_id = %s "
@@ -165,6 +171,10 @@
#_logger.warn('code_string= %s', code_string)
[x.update({'docname': eval(code_string) or '-'}) for x in lines]
+ # group lines
+ if self.group_entries:
+ lines = self._group_lines(lines)
+
# format debit, credit, amount_currency for pdf report
if self.display_currency and self.report_type == 'pdf':
curr_obj = self.pool.get('res.currency')
@@ -175,10 +185,6 @@
else:
[x.update({'amount1': self.formatLang(x['debit']), 'amount2': self.formatLang(x['credit'])}) for x in lines]
- # group lines
- if self.group_entries:
- lines = self._group_lines(lines)
-
# insert a flag in every move_line to indicate the end of a move
# this flag will be used to draw a full line between moves
for cnt in range(len(lines) - 1):
@@ -215,7 +221,7 @@
grouped_lines = [lines_in[0]]
move_id = lines_in[0]['move_id']
line_cnt = len(lines_in)
- for i in range(1,line_cnt):
+ for i in range(1, line_cnt):
line = lines_in[i]
if line['move_id'] == move_id:
grouped_lines.append(line)
=== modified file 'account_journal_report_xls/report/nov_account_journal_xls.py'
--- account_journal_report_xls/report/nov_account_journal_xls.py 2013-12-19 17:08:40 +0000
+++ account_journal_report_xls/report/nov_account_journal_xls.py 2014-01-19 18:26:13 +0000
@@ -86,6 +86,10 @@
'header': [1, 12, 'text', _render("_('Account')")],
'lines': [1, 0, 'text', _render("l['acc_code']")],
'totals': [1, 0, 'text', None]},
+ 'acc_name': {
+ 'header': [1, 36, 'text', _render("_('Account Name')")],
+ 'lines': [1, 0, 'text', _render("l['acc_name']")],
+ 'totals': [1, 0, 'text', None]},
'aml_name': {
'header': [1, 42, 'text', _render("_('Description')")],
'lines': [1, 0, 'text', _render("l['aml_name']")],
@@ -94,6 +98,22 @@
'header': [1, 12, 'text', _render("_('Period')")],
'lines': [1, 0, 'text', _render("l['period']")],
'totals': [1, 0, 'text', None]},
+ 'journal': {
+ 'header': [1, 20, 'text', _render("_('Journal')")],
+ 'lines': [1, 0, 'text', _render("l['journal']")],
+ 'totals': [1, 0, 'text', None]},
+ 'journal_code': {
+ 'header': [1, 10, 'text', _render("_('Journal')")],
+ 'lines': [1, 0, 'text', _render("l['journal_code']")],
+ 'totals': [1, 0, 'text', None]},
+ 'analytic_account': {
+ 'header': [1, 20, 'text', _render("_('Analytic Account')")],
+ 'lines': [1, 0, 'text', _render("l['an_acc_name']")],
+ 'totals': [1, 0, 'text', None]},
+ 'analytic_account_code': {
+ 'header': [1, 20, 'text', _render("_('Analytic Account')")],
+ 'lines': [1, 0, 'text', _render("l['an_acc_code']")],
+ 'totals': [1, 0, 'text', None]},
'partner_name': {
'header': [1, 36, 'text', _render("_('Partner')")],
'lines': [1, 0, 'text', _render("l['partner_name']")],
=== modified file 'account_journal_report_xls/wizard/__init__.py'
--- account_journal_report_xls/wizard/__init__.py 2013-12-18 20:08:12 +0000
+++ account_journal_report_xls/wizard/__init__.py 2014-01-19 18:26:13 +0000
@@ -3,7 +3,7 @@
#
# OpenERP, Open Source Management Solution
#
-# Copyright (c) 2013 Noviat nv/sa (www.noviat.com). All rights reserved.
+# Copyright (c) 2014 Noviat nv/sa (www.noviat.com). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -12,11 +12,11 @@
#
# 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
+# 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 <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
=== modified file 'account_journal_report_xls/wizard/print_journal_wizard.py'
--- account_journal_report_xls/wizard/print_journal_wizard.py 2013-12-20 01:18:22 +0000
+++ account_journal_report_xls/wizard/print_journal_wizard.py 2014-01-19 18:26:13 +0000
@@ -3,7 +3,7 @@
#
# OpenERP, Open Source Management Solution
#
-# Copyright (c) 2013 Noviat nv/sa (www.noviat.com). All rights reserved.
+# Copyright (c) 2014 Noviat nv/sa (www.noviat.com). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -12,11 +12,11 @@
#
# 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
+# 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 <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
Follow ups