diff --git a/account_financial_report/README.rst b/account_financial_report/README.rst index 5591297b..b6e9080f 100644 --- a/account_financial_report/README.rst +++ b/account_financial_report/README.rst @@ -131,6 +131,11 @@ Contributors * Jo??o Marques * Alexandre D. D??az +* `Sygel `__: + + * Harald Panten + * Valentin Vinagre + Much of the work in this module was done at a sprint in Sorrento, Italy in April 2016. diff --git a/account_financial_report/__manifest__.py b/account_financial_report/__manifest__.py index 6730a316..b61c7eaa 100644 --- a/account_financial_report/__manifest__.py +++ b/account_financial_report/__manifest__.py @@ -6,7 +6,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Account Financial Reports", - "version": "14.0.1.2.4", + "version": "14.0.1.3.0", "category": "Reporting", "summary": "OCA Financial Reports", "author": "Camptocamp SA," diff --git a/account_financial_report/i18n/account_financial_report.pot b/account_financial_report/i18n/account_financial_report.pot index 1d3becfc..a4bf671b 100644 --- a/account_financial_report/i18n/account_financial_report.pot +++ b/account_financial_report/i18n/account_financial_report.pot @@ -1404,6 +1404,13 @@ msgstr "" msgid "Residual" msgstr "" +#. module: account_financial_report +#: code:addons/account_financial_report/report/journal_ledger_xlsx.py:0 +#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_table_header +#, python-format +msgid "Sequence" +msgstr "" + #. module: account_financial_report #: code:addons/account_financial_report/report/general_ledger_xlsx.py:0 #: code:addons/account_financial_report/report/open_items_xlsx.py:0 @@ -1420,6 +1427,11 @@ msgstr "" msgid "Show Analytic Account" msgstr "" +#. module: account_financial_report +#: model:ir.model.fields,field_description:account_financial_report.field_journal_ledger_report_wizard__with_auto_sequence +msgid "Show Auto Sequence" +msgstr "" + #. module: account_financial_report #: model:ir.model.fields,field_description:account_financial_report.field_aged_partner_balance_report_wizard__show_move_line_details msgid "Show Move Line Details" @@ -1767,6 +1779,11 @@ msgstr "" msgid "to" msgstr "" +#. module: account_financial_report +#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_table_header +msgid "width: 16.21%;" +msgstr "" + #. module: account_financial_report #: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_table_header msgid "width: 23.24%;" @@ -1777,6 +1794,11 @@ msgstr "" msgid "width: 23.78%;" msgstr "" +#. module: account_financial_report +#: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_table_header +msgid "width: 31.35%;" +msgstr "" + #. module: account_financial_report #: model_terms:ir.ui.view,arch_db:account_financial_report.report_journal_ledger_journal_table_header msgid "width: 38.92%;" diff --git a/account_financial_report/readme/CONTRIBUTORS.rst b/account_financial_report/readme/CONTRIBUTORS.rst index 70ad6808..f46c041c 100644 --- a/account_financial_report/readme/CONTRIBUTORS.rst +++ b/account_financial_report/readme/CONTRIBUTORS.rst @@ -24,5 +24,10 @@ * Jo??o Marques * Alexandre D. D??az +* `Sygel `__: + + * Harald Panten + * Valentin Vinagre + Much of the work in this module was done at a sprint in Sorrento, Italy in April 2016. diff --git a/account_financial_report/report/journal_ledger.py b/account_financial_report/report/journal_ledger.py index 2ae97810..a79a6cd5 100644 --- a/account_financial_report/report/journal_ledger.py +++ b/account_financial_report/report/journal_ledger.py @@ -84,7 +84,7 @@ class JournalLedgerReport(models.AbstractModel): def _get_move_lines_order(self, move_ids, wizard, journal_ids): return "" - def _get_move_lines_data(self, ml, wizard, ml_taxes): + def _get_move_lines_data(self, ml, wizard, ml_taxes, auto_sequence): base_debit = ( base_credit ) = tax_debit = tax_credit = base_balance = tax_balance = 0.0 @@ -116,6 +116,7 @@ class JournalLedgerReport(models.AbstractModel): "tax_credit": tax_credit, "base_balance": base_balance, "tax_balance": tax_balance, + "auto_sequence": str(auto_sequence).zfill(6), } def _get_account_data(self, accounts): @@ -200,6 +201,7 @@ class JournalLedgerReport(models.AbstractModel): partners = self.env["res.partner"] currencies = self.env["res.currency"] tax_lines = self.env["account.tax"] + auto_sequence = len(move_ids) for ml in move_lines: if ml.account_id not in accounts: accounts |= ml.account_id @@ -211,13 +213,14 @@ class JournalLedgerReport(models.AbstractModel): tax_lines |= ml.tax_line_id if ml.move_id.id not in Move_Lines.keys(): Move_Lines[ml.move_id.id] = [] + auto_sequence -= 1 taxes = ( ml.id in move_line_ids_taxes_data.keys() and move_line_ids_taxes_data[ml.id] or {} ) Move_Lines[ml.move_id.id].append( - self._get_move_lines_data(ml, wizard, taxes) + self._get_move_lines_data(ml, wizard, taxes, auto_sequence) ) account_ids_data = self._get_account_data(accounts) partner_ids_data = self._get_partner_data(partners) @@ -348,6 +351,7 @@ class JournalLedgerReport(models.AbstractModel): "date_from": data["date_from"], "date_to": data["date_to"], "move_target": data["move_target"], + "with_auto_sequence": data["with_auto_sequence"], "account_ids_data": account_ids_data, "partner_ids_data": partner_ids_data, "currency_ids_data": currency_ids_data, diff --git a/account_financial_report/report/journal_ledger_xlsx.py b/account_financial_report/report/journal_ledger_xlsx.py index 5a321dc3..e31d1709 100644 --- a/account_financial_report/report/journal_ledger_xlsx.py +++ b/account_financial_report/report/journal_ledger_xlsx.py @@ -28,6 +28,11 @@ class JournalLedgerXslx(models.AbstractModel): {"header": _("Account"), "field": "account_code", "width": 9}, ] + if report.with_auto_sequence: + columns.insert( + 0, {"header": _("Sequence"), "field": "auto_sequence", "width": 10} + ) + if report.with_account_name: columns.append( {"header": _("Account Name"), "field": "account_name", "width": 15} @@ -232,6 +237,7 @@ class JournalLedgerXslx(models.AbstractModel): line["partner"] = self._get_partner_name( line["partner_id"], partner_ids_data ) + line["auto_sequence"] = line["auto_sequence"] line["account_code"] = account_code line["account_name"] = account_name line["currency_name"] = currency_name diff --git a/account_financial_report/report/templates/journal_ledger.xml b/account_financial_report/report/templates/journal_ledger.xml index 4ba80aa7..c6b90307 100644 --- a/account_financial_report/report/templates/journal_ledger.xml +++ b/account_financial_report/report/templates/journal_ledger.xml @@ -12,6 +12,7 @@