diff --git a/account_entries_report_hooks/README.rst b/account_entries_report_hooks/README.rst index 7143eb35..404d15ed 100644 --- a/account_entries_report_hooks/README.rst +++ b/account_entries_report_hooks/README.rst @@ -6,9 +6,9 @@ Account Entries Report Hooks =============================== -This module extends the functionality of account.entries.report module -which intends to override it in order to support and allow you to extend -it by other modules that want to add or change the standard behaviour. +This model extends the functionality of the "Account Entries Report" +by overriding the standard query with a new one that will allow other +modules to extend more flexibly. Installation ============ @@ -18,14 +18,19 @@ No external library is used. Configuration ============= -To configure this module, you need to: +In order to extend the Account Entries Report, you need to: +- Include this module as dependency in your own module +- Inherit from "account.entries.report" module +- Add your own fields, as needed +- Implement one of the new methods _select, _from, _where, _group_by, calling +first to the super() method and then adding the extra string as needed. Usage ===== .. 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/9.0 + :target: https://runbot.odoo-community.org/runbot/91/8.0 Bug Tracker =========== @@ -37,7 +42,7 @@ help us smashing it by providing a detailed and welcomed `feedback `_. +8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. Credits ======= diff --git a/account_entries_report_hooks/__init__.py b/account_entries_report_hooks/__init__.py index d365a10a..3fd88c48 100644 --- a/account_entries_report_hooks/__init__.py +++ b/account_entries_report_hooks/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # © 2015 Eficent Business and IT Consulting Services S.L. - # Jordi Ballester Alomar -# © 2015 Serpent Consulting Services Pvt. Ltd. - Sudhir Arya +# © 2015 Serpent Consulting Services Pvt. Ltd. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from . import report diff --git a/account_entries_report_hooks/__openerp__.py b/account_entries_report_hooks/__openerp__.py index bba15eaf..55cbf38c 100644 --- a/account_entries_report_hooks/__openerp__.py +++ b/account_entries_report_hooks/__openerp__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # © 2015 Eficent Business and IT Consulting Services S.L. - # Jordi Ballester Alomar -# © 2015 Serpent Consulting Services Pvt. Ltd. - Sudhir Arya +# © 2015 Serpent Consulting Services Pvt. Ltd. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { 'name' : 'Account Entries Report Hooks', diff --git a/account_entries_report_hooks/report/__init__.py b/account_entries_report_hooks/report/__init__.py index 3e233f12..590eba3f 100644 --- a/account_entries_report_hooks/report/__init__.py +++ b/account_entries_report_hooks/report/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # © 2015 Eficent Business and IT Consulting Services S.L. - # Jordi Ballester Alomar -# © 2015 Serpent Consulting Services Pvt. Ltd. - Sudhir Arya +# © 2015 Serpent Consulting Services Pvt. Ltd. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from . import account_entries_report diff --git a/account_entries_report_hooks/report/account_entries_report.py b/account_entries_report_hooks/report/account_entries_report.py index 1ecf89a6..7b0e53dc 100644 --- a/account_entries_report_hooks/report/account_entries_report.py +++ b/account_entries_report_hooks/report/account_entries_report.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # © 2015 Eficent Business and IT Consulting Services S.L. - # Jordi Ballester Alomar -# © 2015 Serpent Consulting Services Pvt. Ltd. - Sudhir Arya +# © 2015 Serpent Consulting Services Pvt. Ltd. # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from openerp import tools from openerp import models @@ -50,12 +50,13 @@ class account_entries_report(models.Model): left join account_account a on (l.account_id = a.id) left join account_move am on (am.id=l.move_id) left join account_period p on (am.period_id=p.id) - where l.state != 'draft' + """ return from_str def _where(self): where_str = """ + where l.state != 'draft' """ return where_str