Browse Source

[MIG] account_financial_report_horizontal to v11.

pull/745/head
fshah 5 years ago
parent
commit
8af3ca011b
  1. 4
      account_financial_report_horizontal/__init__.py
  2. 8
      account_financial_report_horizontal/__manifest__.py
  3. 6
      account_financial_report_horizontal/data/ir_actions_report_xml.xml
  4. 28
      account_financial_report_horizontal/data/report_paperformat.xml
  5. 47
      account_financial_report_horizontal/i18n/fi.po
  6. 1
      account_financial_report_horizontal/models/__init__.py
  7. 1
      account_financial_report_horizontal/models/account_financial_report.py
  8. 4
      account_financial_report_horizontal/readme/CONTRIBUTORS.rst
  9. 3
      account_financial_report_horizontal/readme/DESCRIPTION.rst
  10. 2
      account_financial_report_horizontal/readme/USAGE.rst
  11. 1
      account_financial_report_horizontal/report/__init__.py
  12. 7
      account_financial_report_horizontal/report/report_financial.py
  13. 1
      account_financial_report_horizontal/tests/__init__.py
  14. 8
      account_financial_report_horizontal/tests/test_account_financial_report_horizontal.py

4
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

8
account_financial_report_horizontal/__manifest__.py

@ -1,16 +1,16 @@
# -*- coding: utf-8 -*-
# © 2012-2016 Therp BV <http://therp.nl>
# © 2013 Agile Business Group sagl <http://www.agilebg.com>
# <lorenzo.battistini@agilebg.com>
# 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",

6
account_financial_report_horizontal/data/ir_actions_report_xml.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="account.action_report_financial" model="ir.actions.report.xml">
<field name="paperformat_id" ref="paperformat_euro_landscape" />
</record>
<record id="account.action_report_financial" model="ir.actions.report">
<field name="paperformat_id" ref="paperformat_euro_landscape" />
</record>
</odoo>

28
account_financial_report_horizontal/data/report_paperformat.xml

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="paperformat_euro_landscape" model="report.paperformat">
<field name="name">European A4 (Landscape)</field>
<field name="format">A4</field>
<field name="page_height">0</field>
<field name="page_width">0</field>
<field name="orientation">Landscape</field>
<field name="margin_top">40</field>
<field name="margin_bottom">23</field>
<field name="margin_left">7</field>
<field name="margin_right">7</field>
<field name="header_line" eval="False" />
<field name="header_spacing">35</field>
<field name="dpi">90</field>
</record>
<record id="paperformat_euro_landscape" model="report.paperformat">
<field name="name">European A4 (Landscape)</field>
<field name="format">A4</field>
<field name="page_height">0</field>
<field name="page_width">0</field>
<field name="orientation">Landscape</field>
<field name="margin_top">40</field>
<field name="margin_bottom">23</field>
<field name="margin_left">7</field>
<field name="margin_right">7</field>
<field name="header_line" eval="False" />
<field name="header_spacing">35</field>
<field name="dpi">90</field>
</record>
</odoo>

47
account_financial_report_horizontal/i18n/fi.po

@ -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 <jarmo.kortetjarvi@gmail.com>\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"

1
account_financial_report_horizontal/models/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2015 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import account_financial_report

1
account_financial_report_horizontal/models/account_financial_report.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2015 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, models

4
account_financial_report_horizontal/readme/CONTRIBUTORS.rst

@ -0,0 +1,4 @@
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
* Holger Brunn <hbrunn@therp.nl>
* Stefan Rijnhart <srijnhart@therp.nl>
* Dhara Solanki <dhara.solanki@initos.com>

3
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.

2
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.

1
account_financial_report_horizontal/report/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2015 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import report_financial

7
account_financial_report_horizontal/report/report_financial.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# 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)

1
account_financial_report_horizontal/tests/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import test_account_financial_report_horizontal

8
account_financial_report_horizontal/tests/test_account_financial_report_horizontal.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# 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"]'))
Loading…
Cancel
Save