diff --git a/account_financial_report_horizontal/__init__.py b/account_financial_report_horizontal/__init__.py index 4cbc5614..980878ad 100644 --- a/account_financial_report_horizontal/__init__.py +++ b/account_financial_report_horizontal/__init__.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# © initOS GmbH 2019 +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from . import report from . import models diff --git a/account_financial_report_horizontal/__manifest__.py b/account_financial_report_horizontal/__manifest__.py index 3b79db47..e058f8e3 100644 --- a/account_financial_report_horizontal/__manifest__.py +++ b/account_financial_report_horizontal/__manifest__.py @@ -1,16 +1,16 @@ -# -*- coding: utf-8 -*- # © 2012-2016 Therp BV # © 2013 Agile Business Group sagl # # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Accounting Financial Report Horizontal", - "version": "10.0.1.0.0", - "author": "Therp BV,Agile Business Group,Odoo Community Association (OCA)", + "version": "11.0.1.0.0", + "author": "initOS GmbH, Therp BV," + "Agile Business Group, Odoo Community Association (OCA)", "category": 'Accounting & Finance', 'website': 'https://github.com/OCA/account-financial-reporting', 'license': 'AGPL-3', - "depends": ["account"], + "depends": ["account_invoicing"], 'data': [ "data/report_paperformat.xml", "data/ir_actions_report_xml.xml", diff --git a/account_financial_report_horizontal/data/ir_actions_report_xml.xml b/account_financial_report_horizontal/data/ir_actions_report_xml.xml index 1c0c8b2c..46bdc6e3 100644 --- a/account_financial_report_horizontal/data/ir_actions_report_xml.xml +++ b/account_financial_report_horizontal/data/ir_actions_report_xml.xml @@ -1,6 +1,6 @@ - - - + + + diff --git a/account_financial_report_horizontal/data/report_paperformat.xml b/account_financial_report_horizontal/data/report_paperformat.xml index 506db411..0296687a 100644 --- a/account_financial_report_horizontal/data/report_paperformat.xml +++ b/account_financial_report_horizontal/data/report_paperformat.xml @@ -1,17 +1,17 @@ - - European A4 (Landscape) - A4 - 0 - 0 - Landscape - 40 - 23 - 7 - 7 - - 35 - 90 - + + European A4 (Landscape) + A4 + 0 + 0 + Landscape + 40 + 23 + 7 + 7 + + 35 + 90 + diff --git a/account_financial_report_horizontal/i18n/fi.po b/account_financial_report_horizontal/i18n/fi.po deleted file mode 100644 index a443c944..00000000 --- a/account_financial_report_horizontal/i18n/fi.po +++ /dev/null @@ -1,47 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * account_financial_report_horizontal -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" -"Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2019-07-22 15:43+0000\n" -"Last-Translator: Jarmo Kortetjärvi \n" -"Language-Team: none\n" -"Language: fi\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 3.7.1\n" - -#. module: account_financial_report_horizontal -#: model:ir.model,name:account_financial_report_horizontal.model_account_financial_report -msgid "Account Report" -msgstr "Tiliraportti" - -#. module: account_financial_report_horizontal -#: model:ir.ui.view,arch_db:account_financial_report_horizontal.report_financial -msgid "Balance" -msgstr "Saldo" - -#. module: account_financial_report_horizontal -#: model:ir.ui.view,arch_db:account_financial_report_horizontal.report_financial -msgid "Credit" -msgstr "Kredit" - -#. module: account_financial_report_horizontal -#: model:ir.ui.view,arch_db:account_financial_report_horizontal.report_financial -msgid "Debit" -msgstr "Debet" - -#. module: account_financial_report_horizontal -#: model:ir.ui.view,arch_db:account_financial_report_horizontal.report_financial -msgid "Name" -msgstr "Nimi" - -#. module: account_financial_report_horizontal -#: model:ir.model,name:account_financial_report_horizontal.model_report_account_report_financial -msgid "report.account.report_financial" -msgstr "report.account.report_financial" diff --git a/account_financial_report_horizontal/models/__init__.py b/account_financial_report_horizontal/models/__init__.py index df355783..d914d870 100644 --- a/account_financial_report_horizontal/models/__init__.py +++ b/account_financial_report_horizontal/models/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2015 Therp BV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import account_financial_report diff --git a/account_financial_report_horizontal/models/account_financial_report.py b/account_financial_report_horizontal/models/account_financial_report.py index ef887b69..2dc77508 100644 --- a/account_financial_report_horizontal/models/account_financial_report.py +++ b/account_financial_report_horizontal/models/account_financial_report.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2015 Therp BV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, models diff --git a/account_financial_report_horizontal/readme/CONTRIBUTORS.rst b/account_financial_report_horizontal/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..5ba0e9df --- /dev/null +++ b/account_financial_report_horizontal/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* Lorenzo Battistini +* Holger Brunn +* Stefan Rijnhart +* Dhara Solanki diff --git a/account_financial_report_horizontal/readme/DESCRIPTION.rst b/account_financial_report_horizontal/readme/DESCRIPTION.rst new file mode 100644 index 00000000..5736293a --- /dev/null +++ b/account_financial_report_horizontal/readme/DESCRIPTION.rst @@ -0,0 +1,3 @@ +This module provides a balance sheet and profit and loss report in landscape +mode with assets to the left and liabilities to the right as is common in +Italy and the Netherlands. diff --git a/account_financial_report_horizontal/readme/USAGE.rst b/account_financial_report_horizontal/readme/USAGE.rst new file mode 100644 index 00000000..4622a626 --- /dev/null +++ b/account_financial_report_horizontal/readme/USAGE.rst @@ -0,0 +1,2 @@ +After the module is installed, the balance sheet and profit and loss reports +will be in landscape mode with assets left and liabilities right. diff --git a/account_financial_report_horizontal/report/__init__.py b/account_financial_report_horizontal/report/__init__.py index f27c91ff..576d436a 100644 --- a/account_financial_report_horizontal/report/__init__.py +++ b/account_financial_report_horizontal/report/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2015 Therp BV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import report_financial diff --git a/account_financial_report_horizontal/report/report_financial.py b/account_financial_report_horizontal/report/report_financial.py index 09defb57..3176f2df 100644 --- a/account_financial_report_horizontal/report/report_financial.py +++ b/account_financial_report_horizontal/report/report_financial.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2016 Therp BV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, models @@ -20,10 +19,10 @@ class ReportFinancial(models.AbstractModel): def get_right_lines(self, data): return self.get_account_lines(data, side='right') - @api.multi - def render_html(self, docids, data): + @api.model + def get_report_values(self, docids, data=None): data.setdefault('form', {}).update( get_left_lines=self.get_left_lines, get_right_lines=self.get_right_lines, ) - return super(ReportFinancial, self).render_html(docids, data) + return super(ReportFinancial, self).get_report_values(docids, data) diff --git a/account_financial_report_horizontal/tests/__init__.py b/account_financial_report_horizontal/tests/__init__.py index e3440ae3..b0acc596 100644 --- a/account_financial_report_horizontal/tests/__init__.py +++ b/account_financial_report_horizontal/tests/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2016 Therp BV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_account_financial_report_horizontal diff --git a/account_financial_report_horizontal/tests/test_account_financial_report_horizontal.py b/account_financial_report_horizontal/tests/test_account_financial_report_horizontal.py index b0d25a45..e312232d 100644 --- a/account_financial_report_horizontal/tests/test_account_financial_report_horizontal.py +++ b/account_financial_report_horizontal/tests/test_account_financial_report_horizontal.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2016 Therp BV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from lxml import etree @@ -12,9 +11,10 @@ class TestAccountFinancialReportHorizontal(TransactionCase): active_model='ir.ui.view', ).create({}).check_report() data = action['data'] - html = self.env['report'].with_context(action['context']).get_html( + report = self.env['ir.actions.report']._get_report_from_name( + action['report_name']) + html = report.with_context(action['context']).render_qweb_html( self.env[data['model']].browse(data['ids']), - report_name=action['report_name'], data=data, - ) + )[0] self.assertTrue(etree.fromstring(html).xpath('//div[@class="row"]'))