Browse Source

[10.0][MIG] account_financial_report_horizontal

pull/605/head
mreficent 7 years ago
parent
commit
bd5cf3f63c
  1. 36
      account_financial_report_horizontal/README.rst
  2. 2
      account_financial_report_horizontal/__init__.py
  3. 4
      account_financial_report_horizontal/__manifest__.py
  4. 6
      account_financial_report_horizontal/data/ir_actions_report_xml.xml
  5. 6
      account_financial_report_horizontal/data/report_paperformat.xml
  6. 1
      account_financial_report_horizontal/models/__init__.py
  7. 3
      account_financial_report_horizontal/models/account_financial_report.py
  8. 1
      account_financial_report_horizontal/report/__init__.py
  9. 7
      account_financial_report_horizontal/report/report_financial.py
  10. 6
      account_financial_report_horizontal/report/report_financial.xml
  11. 4
      account_financial_report_horizontal/tests/test_account_financial_report_horizontal.py

36
account_financial_report_horizontal/README.rst

@ -1,19 +1,41 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:alt: License: AGPL-3
:target: http://www.gnu.org/licenses/agpl
:alt: License: AGPL-3
Accounting Financial Reports Horizontal
=======================================
======================================
Accounting Financial Report Horizontal
======================================
This addon 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.
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.
Usage
=====
After the module is installed, the balance sheet and profit and loss reports will be in landscape mode with assets left and liabilities right.
After the module is installed, the balance sheet and profit and loss reports
will be in landscape mode with assets left and liabilities right.
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/91/10.0
Bug Tracker
===========
Bugs are tracked on `GitHub Issues
<https://github.com/OCA/account-financial-reporting/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.
Credits
=======
Images
------
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
Contributors
------------
@ -21,6 +43,8 @@ Contributors
* Holger Brunn <hbrunn@therp.nl>
* Stefan Rijnhart <srijnhart@therp.nl>
Do not contact contributors directly about support or help with technical issues.
Maintainer
----------
@ -34,4 +58,4 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
To contribute to this module, please visit http://odoo-community.org.
To contribute to this module, please visit https://odoo-community.org.

2
account_financial_report_horizontal/__init__.py

@ -1,2 +1,4 @@
# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import report
from . import models

4
account_financial_report_horizontal/__manifest__.py

@ -4,8 +4,8 @@
# <lorenzo.battistini@agilebg.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Accounting Financial Reports Horizontal",
"version": "9.0.0.0.0",
"name": "Accounting Financial Report Horizontal",
"version": "10.0.1.0.0",
"author": "Therp BV,Agile Business Group,Odoo Community Association (OCA)",
"category": 'Accounting & Finance',
'website': 'https://github.com/OCA/account-financial-reporting',

6
account_financial_report_horizontal/data/ir_actions_report_xml.xml

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

6
account_financial_report_horizontal/data/report_paperformat.xml

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<odoo>
<record id="paperformat_euro_landscape" model="report.paperformat">
<field name="name">European A4 (Landscape)</field>
<field name="format">A4</field>
@ -15,5 +14,4 @@
<field name="header_spacing">35</field>
<field name="dpi">90</field>
</record>
</data>
</openerp>
</odoo>

1
account_financial_report_horizontal/models/__init__.py

@ -1,3 +1,4 @@
# -*- 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

3
account_financial_report_horizontal/models/account_financial_report.py

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

1
account_financial_report_horizontal/report/__init__.py

@ -1,3 +1,4 @@
# -*- 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,6 +1,7 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
from openerp import api, models
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, models
class ReportFinancial(models.AbstractModel):
@ -20,9 +21,9 @@ class ReportFinancial(models.AbstractModel):
return self.get_account_lines(data, side='right')
@api.multi
def render_html(self, data):
def render_html(self, docids, data):
data.setdefault('form', {}).update(
get_left_lines=self.get_left_lines,
get_right_lines=self.get_right_lines,
)
return super(ReportFinancial, self).render_html(data)
return super(ReportFinancial, self).render_html(docids, data)

6
account_financial_report_horizontal/report/report_financial.xml

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<odoo>
<template id="report_financial" inherit_id="account.report_financial">
<!-- replace all tables for different selections and do it in one table /-->
<!-- with credit/debit /-->
@ -47,5 +46,4 @@
</div>
</xpath>
</template>
</data>
</openerp>
</odoo>

4
account_financial_report_horizontal/tests/test_account_financial_report_horizontal.py

@ -2,7 +2,7 @@
# © 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from lxml import etree
from openerp.tests.common import TransactionCase
from odoo.tests.common import TransactionCase
class TestAccountFinancialReportHorizontal(TransactionCase):
@ -14,7 +14,7 @@ class TestAccountFinancialReportHorizontal(TransactionCase):
data = action['data']
html = self.env['report'].with_context(action['context']).get_html(
self.env[data['model']].browse(data['ids']),
action['report_name'],
report_name=action['report_name'],
data=data,
)
self.assertTrue(etree.fromstring(html).xpath('//div[@class="row"]'))
Loading…
Cancel
Save