Browse Source

[IMP] : Modified Readme file

pull/153/head
Darshan Patel 9 years ago
parent
commit
ea81cfb7dd
  1. 17
      account_entries_report_hooks/README.rst
  2. 2
      account_entries_report_hooks/__init__.py
  3. 2
      account_entries_report_hooks/__openerp__.py
  4. 2
      account_entries_report_hooks/report/__init__.py
  5. 5
      account_entries_report_hooks/report/account_entries_report.py

17
account_entries_report_hooks/README.rst

@ -6,9 +6,9 @@
Account Entries Report Hooks 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 Installation
============ ============
@ -18,14 +18,19 @@ No external library is used.
Configuration 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 Usage
===== =====
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot :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 Bug Tracker
=========== ===========
@ -37,7 +42,7 @@ help us smashing it by providing a detailed and welcomed `feedback
<https://github.com/OCA/ <https://github.com/OCA/
91/issues/new?body=module:%20 91/issues/new?body=module:%20
account_entries_report_hooks%0Aversion:%20 account_entries_report_hooks%0Aversion:%20
9.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits Credits
======= =======

2
account_entries_report_hooks/__init__.py

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# © 2015 Eficent Business and IT Consulting Services S.L. - # © 2015 Eficent Business and IT Consulting Services S.L. -
# Jordi Ballester Alomar # 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). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import report from . import report

2
account_entries_report_hooks/__openerp__.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# © 2015 Eficent Business and IT Consulting Services S.L. - # © 2015 Eficent Business and IT Consulting Services S.L. -
# Jordi Ballester Alomar # 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). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{ {
'name' : 'Account Entries Report Hooks', 'name' : 'Account Entries Report Hooks',

2
account_entries_report_hooks/report/__init__.py

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# © 2015 Eficent Business and IT Consulting Services S.L. - # © 2015 Eficent Business and IT Consulting Services S.L. -
# Jordi Ballester Alomar # 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). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import account_entries_report from . import account_entries_report

5
account_entries_report_hooks/report/account_entries_report.py

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# © 2015 Eficent Business and IT Consulting Services S.L. - # © 2015 Eficent Business and IT Consulting Services S.L. -
# Jordi Ballester Alomar # 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). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from openerp import tools from openerp import tools
from openerp import models 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_account a on (l.account_id = a.id)
left join account_move am on (am.id=l.move_id) left join account_move am on (am.id=l.move_id)
left join account_period p on (am.period_id=p.id) left join account_period p on (am.period_id=p.id)
where l.state != 'draft'
""" """
return from_str return from_str
def _where(self): def _where(self):
where_str = """ where_str = """
where l.state != 'draft'
""" """
return where_str return where_str

Loading…
Cancel
Save