Browse Source

[ADD] account_tax_report_no_zeroes: Account tax report without zeroes

Account tax report without zeroes
=================================

Remove lines with a zero tax amount in the generic taxes report.

Usage
=====

Print the tax report as usual in Accounting > Reporting > Taxes > Taxes Report,
but with this module, only lines with amounts will be printed.

Known issues / Roadmap
======================

* Let the user to decide if they want the zeroes in the report or not. For now,
  zeroes are always hidden.
pull/92/head
Pedro M. Baeza 9 years ago
parent
commit
e5546abfea
  1. 58
      account_tax_report_no_zeroes/README.rst
  2. 5
      account_tax_report_no_zeroes/__init__.py
  3. 16
      account_tax_report_no_zeroes/__openerp__.py
  4. 5
      account_tax_report_no_zeroes/report/__init__.py
  5. 27
      account_tax_report_no_zeroes/report/report_vat.py
  6. BIN
      account_tax_report_no_zeroes/static/description/icon.png

58
account_tax_report_no_zeroes/README.rst

@ -0,0 +1,58 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
=================================
Account tax report without zeroes
=================================
Remove lines with a zero tax amount in the generic taxes report.
Usage
=====
Print the tax report as usual in Accounting > Reporting > Taxes > Taxes Report,
but with this module, only lines with amounts will be printed.
.. 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/8.0
Known issues / Roadmap
======================
* Let the user to decide if they want the zeroes in the report or not. For now,
zeroes are always hidden.
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 smashing it by providing a detailed and welcomed feedback
`here <https://github.com/OCA/account-financial-reporting/issues/new?body=module:%20account_tax_report_no_zeroes%0Aversion:%208.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits
=======
Contributors
------------
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
Maintainer
----------
.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org
This module is maintained by the OCA.
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.

5
account_tax_report_no_zeroes/__init__.py

@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# (c) 2015 Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from . import report

16
account_tax_report_no_zeroes/__openerp__.py

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# (c) 2015 Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
'name': 'Account tax report without zeroes',
'version': '1.0',
'category': 'Accounting & Finance',
'author': 'Serv. Tecnol. Avanzados - Pedro M. Baeza,'
'Odoo Community Association (OCA)',
'website': 'http://www.serviciosbaeza.com',
'depends': [
'account',
],
'installable': True,
}

5
account_tax_report_no_zeroes/report/__init__.py

@ -0,0 +1,5 @@
# -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from . import report_vat

27
account_tax_report_no_zeroes/report/report_vat.py

@ -0,0 +1,27 @@
# -*- encoding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models
from openerp.addons.account.report.report_vat import tax_report
from functools import partial
class TaxReport(tax_report):
def __init__(self, cr, uid, name, context=None):
super(TaxReport, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'get_lines': partial(self._get_lines, context=context),
})
def _get_lines(self, based_on, company_id=False, parent=False, level=0,
context=None):
result = super(TaxReport, self)._get_lines(
based_on, company_id=company_id, parent=parent, level=level,
context=context)
return filter(lambda x: x['tax_amount'], result)
class ReportVat(models.AbstractModel):
_inherit = 'report.account.report_vat'
_wrapped_report_class = TaxReport

BIN
account_tax_report_no_zeroes/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

Loading…
Cancel
Save