Browse Source

[IMP] improved as per OCA style

pull/153/head
jbeficent 8 years ago
parent
commit
184a286372
  1. 30
      account_entries_report_hooks/README.rst
  2. 3
      account_entries_report_hooks/__init__.py
  3. 16
      account_entries_report_hooks/__openerp__.py
  4. 1
      account_entries_report_hooks/reports/__init__.py
  5. 8
      account_entries_report_hooks/reports/account_entries_report.py

30
account_entries_report_hooks/README.rst

@ -2,28 +2,29 @@
:target: https://www.gnu.org/licenses/agpl.html
:alt: License: AGPL-3
===============================
============================
Account Entries Report Hooks
===============================
============================
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.
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
============
No external library is used.
Configuration
=============
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.
* 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
=====
@ -57,6 +58,7 @@ Contributors
* Eficent Business and IT Consulting Services S.L. <contact@eficent.com>
* Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
* Xpansa Group <hello@xpansa.com>
Maintainer
----------

3
account_entries_report_hooks/__init__.py

@ -3,4 +3,5 @@
# Jordi Ballester Alomar
# © 2015 Serpent Consulting Services Pvt. Ltd.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import report
from . import reports

16
account_entries_report_hooks/__openerp__.py

@ -4,18 +4,16 @@
# © 2015 Serpent Consulting Services Pvt. Ltd.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
'name' : 'Account Entries Report Hooks',
'version' : '8.0.1.0.0',
"author": "Eficent Business and IT Consulting Services S.L., "
'name': 'Account Entries Report Hooks',
'version': '8.0.1.0.0',
'summary': 'Implements an Account Entries Report that is extensible',
'author': "Eficent Business and IT Consulting Services S.L., "
"Serpent Consulting Services Pvt. Ltd.,"
"Odoo Community Association (OCA)",
'category' : 'Accounting & Finance',
'description' : """
This module
""",
"website": "http://www.eficent.com",
'category': 'Accounting & Finance',
'website': "http://www.eficent.com",
"license": "AGPL-3",
'depends' : ['account'],
'depends': ['account'],
'installable': True,
'auto_install': False,
}

1
account_entries_report_hooks/report/__init__.py → account_entries_report_hooks/reports/__init__.py

@ -3,4 +3,5 @@
# Jordi Ballester Alomar
# © 2015 Serpent Consulting Services Pvt. Ltd.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from . import account_entries_report

8
account_entries_report_hooks/report/account_entries_report.py → account_entries_report_hooks/reports/account_entries_report.py

@ -3,12 +3,10 @@
# Jordi Ballester Alomar
# © 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
import openerp.addons.decimal_precision as dp
from openerp import models, tools
class account_entries_report(models.Model):
class AccountEntriesReport(models.Model):
_inherit = "account.entries.report"
def _select(self):
@ -44,7 +42,7 @@ class account_entries_report(models.Model):
return select_str
def _from(self):
from_str="""
from_str = """
FROM
account_move_line l
left join account_account a on (l.account_id = a.id)
Loading…
Cancel
Save