Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADD account_invoice_report_hide_line #283

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions account_invoice_report_hide_line/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
=============================================================
Hide invoice lines from the PDF report if the unit price is 0
=============================================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--invoice--reporting-lightgray.png?logo=github
:target: https://github.com/OCA/account-invoice-reporting/tree/14.0/account_invoice_report_hide_line
:alt: OCA/account-invoice-reporting
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-invoice-reporting-14-0/account-invoice-reporting-14-0-account_invoice_report_hide_line
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/94/14.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|

In some service companies, the customer is invoiced for a service that may consume inventory items. Those inventory items needs to be invoiced to account in the cost of services sold and reconcile the value of the inventory items delivered and sitting in the Un-Invoiced Goods Delivered, but they should not appear to the customer on the PDF report of their invoice.

This module allows you to hide invoice lines from the PDF report if the unit price is 0.

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

* Go to Invoicing
* Create or select a draft invoice
* Add an invoice line
* Un-check the "Show in report" box
* Select a storable product
* Set the unit price to 0
* Save and print the invoice. The new line does not show up in PDF.
* If you are using anglo-saxon accounting, validate the invoice and check that the journal entry is reconciling the delivery of the product.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoice-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 <https://github.com/OCA/account-invoice-reporting/issues/new?body=module:%20account_invoice_report_hide_line%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Open Source Integrators

Contributors
~~~~~~~~~~~~

* Bhavesh Odedra <[email protected]>
* Ammar Officewala <[email protected]>

Other credits
~~~~~~~~~~~~~

The development of this module has been financially supported by:

* Open Source Integrators <https://opensourceintegrators.com>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

.. |maintainer-bodedra| image:: https://github.com/bodedra.png?size=40px
:target: https://github.com/bodedra
:alt: bodedra
.. |maintainer-max3903| image:: https://github.com/max3903.png?size=40px
:target: https://github.com/max3903
:alt: max3903

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-bodedra| |maintainer-max3903|

This module is part of the `OCA/account-invoice-reporting <https://github.com/OCA/account-invoice-reporting/tree/14.0/account_invoice_report_hide_line>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions account_invoice_report_hide_line/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
16 changes: 16 additions & 0 deletions account_invoice_report_hide_line/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Hide invoice lines from the PDF report if the unit price is 0",
"version": "15.0.1.0.0",
"category": "Accounting",
"author": "Open Source Integrators, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-invoice-reporting",
"depends": ["account"],
"data": ["views/account_move_view.xml", "views/report_invoice.xml"],
"installable": True,
"license": "AGPL-3",
"development_status": "Beta",
"maintainers": ["bodedra", "max3903"],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_report_hide_line
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: account_invoice_report_hide_line
#: model:ir.model.fields,field_description:account_invoice_report_hide_line.field_account_move_line__display_name
msgid "Display Name"
msgstr ""

#. module: account_invoice_report_hide_line
#: model:ir.model.fields,field_description:account_invoice_report_hide_line.field_account_move_line__id
msgid "ID"
msgstr ""

#. module: account_invoice_report_hide_line
#: model:ir.model,name:account_invoice_report_hide_line.model_account_move_line
msgid "Journal Item"
msgstr ""

#. module: account_invoice_report_hide_line
#: model:ir.model.fields,field_description:account_invoice_report_hide_line.field_account_move_line____last_update
msgid "Last Modified on"
msgstr ""

#. module: account_invoice_report_hide_line
#: model:ir.model.fields,field_description:account_invoice_report_hide_line.field_account_move_line__show_in_report
msgid "Show In Report"
msgstr ""
42 changes: 42 additions & 0 deletions account_invoice_report_hide_line/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_report_hide_line
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-05-11 13:05+0000\n"
"Last-Translator: Maria Sparenberg <[email protected]>\n"
"Language-Team: none\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: account_invoice_report_hide_line
#: model:ir.model.fields,field_description:account_invoice_report_hide_line.field_account_move_line__display_name
msgid "Display Name"
msgstr "Anzeigename"

#. module: account_invoice_report_hide_line
#: model:ir.model.fields,field_description:account_invoice_report_hide_line.field_account_move_line__id
msgid "ID"
msgstr "ID"

#. module: account_invoice_report_hide_line
#: model:ir.model,name:account_invoice_report_hide_line.model_account_move_line
msgid "Journal Item"
msgstr "Journal-Item"

#. module: account_invoice_report_hide_line
#: model:ir.model.fields,field_description:account_invoice_report_hide_line.field_account_move_line____last_update
msgid "Last Modified on"
msgstr "Zuletzt geändert am"

#. module: account_invoice_report_hide_line
#: model:ir.model.fields,field_description:account_invoice_report_hide_line.field_account_move_line__show_in_report
msgid "Show In Report"
msgstr "im Beleg anzeigen"
28 changes: 28 additions & 0 deletions account_invoice_report_hide_line/i18n/hr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_report_hide_line
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-03-05 16:13+0000\n"
"Last-Translator: Bole <[email protected]>\n"
"Language-Team: none\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<="
"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 3.10\n"

#. module: account_invoice_report_hide_line
#: model:ir.model,name:account_invoice_report_hide_line.model_account_invoice_line
msgid "Invoice Line"
msgstr "Stavka računa"

#. module: account_invoice_report_hide_line
#: model:ir.model.fields,field_description:account_invoice_report_hide_line.field_account_invoice_line__show_in_report
msgid "Show In Report"
msgstr "Prikaži u izvještaju"
4 changes: 4 additions & 0 deletions account_invoice_report_hide_line/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import account_invoice
17 changes: 17 additions & 0 deletions account_invoice_report_hide_line/models/account_invoice.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (C) 2019 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


class AccountMoveLine(models.Model):
_inherit = "account.move.line"

show_in_report = fields.Boolean(default=True)

@api.onchange("price_unit")
def _onchange_price_unit(self):
if self.price_unit > 0.0:
self.show_in_report = True
else:
self.show_in_report = False
2 changes: 2 additions & 0 deletions account_invoice_report_hide_line/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Bhavesh Odedra <[email protected]>
* Ammar Officewala <[email protected]>
3 changes: 3 additions & 0 deletions account_invoice_report_hide_line/readme/CREDITS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The development of this module has been financially supported by:

* Open Source Integrators <https://opensourceintegrators.com>
3 changes: 3 additions & 0 deletions account_invoice_report_hide_line/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
In some service companies, the customer is invoiced for a service that may consume inventory items. Those inventory items needs to be invoiced to account in the cost of services sold and reconcile the value of the inventory items delivered and sitting in the Un-Invoiced Goods Delivered, but they should not appear to the customer on the PDF report of their invoice.

This module allows you to hide invoice lines from the PDF report if the unit price is 0.
10 changes: 10 additions & 0 deletions account_invoice_report_hide_line/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
To use this module, you need to:

* Go to Invoicing
* Create or select a draft invoice
* Add an invoice line
* Un-check the "Show in report" box
* Select a storable product
* Set the unit price to 0
* Save and print the invoice. The new line does not show up in PDF.
* If you are using anglo-saxon accounting, validate the invoice and check that the journal entry is reconciling the delivery of the product.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading