Browse Source

[add] fields to journal_report_xls

pull/7/merge
unknown 11 years ago
committed by Yannick Vaucher
parent
commit
23070573c2
  1. 2
      account_journal_report_xls/__init__.py
  2. 2
      account_journal_report_xls/__openerp__.py
  3. 5
      account_journal_report_xls/account_journal.py
  4. 59
      account_journal_report_xls/i18n/fr.po
  5. 59
      account_journal_report_xls/i18n/nl.po
  6. 8
      account_journal_report_xls/report/nov_account_journal.py
  7. 20
      account_journal_report_xls/report/nov_account_journal_xls.py
  8. 2
      account_journal_report_xls/wizard/__init__.py
  9. 2
      account_journal_report_xls/wizard/print_journal_wizard.py

2
account_journal_report_xls/__init__.py

@ -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

2
account_journal_report_xls/__openerp__.py

@ -22,7 +22,7 @@
{
'name': 'Financial Journal reports',
'version': '0.1',
'version': '0.2',
'license': 'AGPL-3',
'author': 'Noviat',
'category': 'Accounting & Finance',

5
account_journal_report_xls/account_journal.py

@ -65,6 +65,11 @@ class account_journal(orm.Model):
#'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

59
account_journal_report_xls/i18n/fr.po

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.1\n"
"Report-Msgid-Bugs-To: support@noviat.be\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"
@ -119,11 +119,36 @@ msgstr "Exercice fiscal"
msgid "Journal Overview"
msgstr "Journal détaillé"
#. 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"
@ -134,6 +159,16 @@ msgstr "Date"
msgid "Account"
msgstr "Compte"
#. 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"
@ -179,6 +214,16 @@ msgstr "Let."
msgid "Part. Rec."
msgstr "Let. Part."
#. 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"
@ -209,6 +254,16 @@ msgstr "Montant devise"
msgid "Curr."
msgstr "Dev."
#. 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"

59
account_journal_report_xls/i18n/nl.po

@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.1\n"
"Report-Msgid-Bugs-To: support@noviat.be\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"
@ -119,11 +119,36 @@ msgstr "Boekjaar"
msgid "Journal Overview"
msgstr "Dagboekoverzicht"
#. 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"
@ -134,6 +159,16 @@ msgstr "Datum"
msgid "Account"
msgstr "Rekening"
#. 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"
@ -179,6 +214,16 @@ msgstr "Rec."
msgid "Part. Rec."
msgstr "Rec. Part."
#. 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"
@ -209,6 +254,16 @@ msgstr "Bedrag valuta"
msgid "Curr."
msgstr "Val."
#. 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"

8
account_journal_report_xls/report/nov_account_journal.py

@ -121,9 +121,12 @@ class nov_journal_print(report_sxw.rml_parse):
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 @@ class nov_journal_print(report_sxw.rml_parse):
"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 @@ class nov_journal_print(report_sxw.rml_parse):
"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 @@ class nov_journal_print(report_sxw.rml_parse):
"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 "

20
account_journal_report_xls/report/nov_account_journal_xls.py

@ -86,6 +86,10 @@ class account_journal_xls(report_xls):
'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 @@ class account_journal_xls(report_xls):
'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']")],

2
account_journal_report_xls/wizard/__init__.py

@ -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

2
account_journal_report_xls/wizard/print_journal_wizard.py

@ -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

Loading…
Cancel
Save