Browse Source

[MIG] account_financial_report_horizontal: Migration to 11.0

pull/689/head
mreficent 5 years ago
committed by Nikos Tsirintanis
parent
commit
7c0f25bb6e
  1. 8
      account_financial_report_horizontal/README.rst
  2. 3
      account_financial_report_horizontal/__init__.py
  3. 5
      account_financial_report_horizontal/__manifest__.py
  4. 2
      account_financial_report_horizontal/data/ir_actions_report_xml.xml
  5. 2
      account_financial_report_horizontal/i18n/account_financial_report_horizontal.pot
  6. 1
      account_financial_report_horizontal/models/__init__.py
  7. 1
      account_financial_report_horizontal/models/account_financial_report.py
  8. 1
      account_financial_report_horizontal/report/__init__.py
  9. 5
      account_financial_report_horizontal/report/report_financial.py
  10. 6
      account_financial_report_horizontal/report/report_financial.xml
  11. 1
      account_financial_report_horizontal/tests/__init__.py
  12. 10
      account_financial_report_horizontal/tests/test_account_financial_report_horizontal.py

8
account_financial_report_horizontal/README.rst

@ -1,5 +1,5 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: https://www.gnu.org/licenses/agpl
:alt: License: AGPL-3
======================================
@ -18,7 +18,7 @@ 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
:target: https://runbot.odoo-community.org/runbot/91/11.0
Bug Tracker
===========
@ -34,7 +34,7 @@ Credits
Images
------
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
* Odoo Community Association: `Icon <https://odoo-community.org/logo.png>`_.
Contributors
------------

3
account_financial_report_horizontal/__init__.py

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

5
account_financial_report_horizontal/__manifest__.py

@ -1,16 +1,15 @@
# -*- 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",
"version": "11.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',
'license': 'AGPL-3',
"depends": ["account"],
"depends": ["account_invoicing"],
'data': [
"data/report_paperformat.xml",
"data/ir_actions_report_xml.xml",

2
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">
<record id="account.action_report_financial" model="ir.actions.report">
<field name="paperformat_id" ref="paperformat_euro_landscape" />
</record>
</odoo>

2
account_financial_report_horizontal/i18n/account_financial_report_horizontal.pot

@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"

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

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

5
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
@ -21,9 +20,9 @@ class ReportFinancial(models.AbstractModel):
return self.get_account_lines(data, side='right')
@api.multi
def render_html(self, docids, data):
def get_report_values(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(docids, data)
return super(ReportFinancial, self).get_report_values(docids, data)

6
account_financial_report_horizontal/report/report_financial.xml

@ -3,11 +3,11 @@
<template id="report_financial" inherit_id="account.report_financial">
<!-- replace all tables for different selections and do it in one table /-->
<!-- with credit/debit /-->
<xpath expr="//div[@class='page']/table" position="replace" />
<xpath expr="//div[hasclass('page')]/table" position="replace" />
<!-- unfiltered without credit/debit /-->
<xpath expr="//div[@class='page']/table" position="replace" />
<xpath expr="//div[hasclass('page')]/table" position="replace" />
<!-- filtered without credit/debit /-->
<xpath expr="//div[@class='page']/table" position="replace">
<xpath expr="//div[hasclass('page')]/table" position="replace">
<div class="row">
<div class="col-xs-6" t-foreach="[data['get_left_lines'], data['get_right_lines']]" t-as="get_lines_function">
<table class="table table-condensed">

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

10
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,
)
self.assertTrue(etree.fromstring(html).xpath('//div[@class="row"]'))
)[0]
self.assertTrue(etree.fromstring(html).xpath("//div[hasclass('row')]"))
Loading…
Cancel
Save