Skip to content

Commit

Permalink
Merge 5e15e72 into e12847e
Browse files Browse the repository at this point in the history
  • Loading branch information
kongrattapong committed Dec 16, 2019
2 parents e12847e + 5e15e72 commit 7ea8d9b
Show file tree
Hide file tree
Showing 17 changed files with 883 additions and 0 deletions.
86 changes: 86 additions & 0 deletions account_invoice_tax_note/README.rst
@@ -0,0 +1,86 @@
========================
Account invoice tax note
========================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |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--invoicing-lightgray.png?logo=github
:target: https://github.com/OCA/account-invoicing/tree/13.0-mig-account_invoice_tax_note/account_invoice_tax_note
:alt: OCA/account-invoicing
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-invoicing-13-0-mig-account_invoice_tax_note/account-invoicing-13-0-mig-account_invoice_tax_note-account_invoice_tax_note
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/95/13.0-mig-account_invoice_tax_note
:alt: Try me on Runbot

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

In some situations, a mention must be displayed on invoices when a specific tax is used.
This module lets you define such a mention on Tax Groups.
This mechanism complements the invoice note coming from the fiscal position.
These tax group notes are translatable and company dependent.
To contribute to this module, please visit https://odoo-community.org.

**Table of contents**

.. contents::
:local:

Usage
=====

#. Go to 'Accounting/Invoicing > Configuration > Taxes';
#. Select a tax and click on the 'Tax Group' field;
#. Edit the note of the Tax Group.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-invoicing/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-invoicing/issues/new?body=module:%20account_invoice_tax_note%0Aversion:%2013.0-mig-account_invoice_tax_note%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
~~~~~~~

* ACSONE SA/NV

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

* François Honoré <francois.honore@acsone.eu>
* Denis Roussel <denis.roussel@acsone.eu>
* Rattapong Chokmasermkul <rattapongc@ecosoft.co.th>

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.

This module is part of the `OCA/account-invoicing <https://github.com/OCA/account-invoicing/tree/13.0-mig-account_invoice_tax_note/account_invoice_tax_note>`_ 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_tax_note/__init__.py
@@ -0,0 +1,4 @@
# Copyright 2018 ACSONE SA/NV (https://acsone.eu)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)

from . import models
15 changes: 15 additions & 0 deletions account_invoice_tax_note/__manifest__.py
@@ -0,0 +1,15 @@
# Copyright 2018 ACSONE SA/NV (https://acsone.eu)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
{
"name": "Account invoice tax note",
"version": "13.0.1.0.0",
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
"development_status": "Production/Stable",
"summary": "Print tax notes on customer invoices",
"website": "https://github.com/OCA/account-invoicing",
"category": "Localization / Accounting",
"license": "AGPL-3",
"depends": ["account"],
"data": ["reports/report_invoice_document.xml"],
"installable": True,
}
35 changes: 35 additions & 0 deletions account_invoice_tax_note/i18n/account_invoice_tax_note.pot
@@ -0,0 +1,35 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_tax_note
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.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_tax_note
#: model:ir.model,name:account_invoice_tax_note.model_account_invoice
msgid "Invoice"
msgstr ""

#. module: account_invoice_tax_note
#: model:ir.model.fields,help:account_invoice_tax_note.field_account_tax_group__report_note
msgid "Note to insert on Invoice Report if the tax group is used."
msgstr ""

#. module: account_invoice_tax_note
#: model:ir.model.fields,field_description:account_invoice_tax_note.field_account_tax_group__report_note
msgid "Report Note"
msgstr ""

#. module: account_invoice_tax_note
#: model:ir.model,name:account_invoice_tax_note.model_account_tax_group
msgid "Tax Group"
msgstr ""

38 changes: 38 additions & 0 deletions account_invoice_tax_note/i18n/de.po
@@ -0,0 +1,38 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_tax_note
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-07-17 12:43+0000\n"
"Last-Translator: Maria Sparenberg <maria.sparenberg@gmx.net>\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 3.7.1\n"

#. module: account_invoice_tax_note
#: model:ir.model,name:account_invoice_tax_note.model_account_invoice
msgid "Invoice"
msgstr "Rechnung"

#. module: account_invoice_tax_note
#: model:ir.model.fields,help:account_invoice_tax_note.field_account_tax_group__report_note
msgid "Note to insert on Invoice Report if the tax group is used."
msgstr ""
"Dies ist ein Hinweis zur Steuer, der auf dem Rechnungsbeleg gedruckt wird."

#. module: account_invoice_tax_note
#: model:ir.model.fields,field_description:account_invoice_tax_note.field_account_tax_group__report_note
msgid "Report Note"
msgstr "Hinweis auf Beleg"

#. module: account_invoice_tax_note
#: model:ir.model,name:account_invoice_tax_note.model_account_tax_group
msgid "Tax Group"
msgstr "Steuergruppe"
37 changes: 37 additions & 0 deletions account_invoice_tax_note/i18n/fr.po
@@ -0,0 +1,37 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_invoice_tax_note
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-08-01 08:29+0000\n"
"PO-Revision-Date: 2018-08-01 08:29+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: account_invoice_tax_note
#: model:ir.model,name:account_invoice_tax_note.model_account_invoice
msgid "Invoice"
msgstr "Facture"

#. module: account_invoice_tax_note
#: model:ir.model.fields,help:account_invoice_tax_note.field_account_tax_group__report_note
msgid "Note to insert on Invoice Report if the tax group is used."
msgstr "Note à insérer dans le rapport des factures si ce groupe est utilisé"

#. module: account_invoice_tax_note
#: model:ir.model.fields,field_description:account_invoice_tax_note.field_account_tax_group__report_note
msgid "Report Note"
msgstr "Note rapport"

#. module: account_invoice_tax_note
#: model:ir.model,name:account_invoice_tax_note.model_account_tax_group
msgid "Tax Group"
msgstr ""
5 changes: 5 additions & 0 deletions account_invoice_tax_note/models/__init__.py
@@ -0,0 +1,5 @@
# Copyright 2018 ACSONE SA/NV (https://acsone.eu)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)

from . import account_move
from . import account_tax_group
15 changes: 15 additions & 0 deletions account_invoice_tax_note/models/account_move.py
@@ -0,0 +1,15 @@
# Copyright 2018 ACSONE SA/NV (https://acsone.eu)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)

from odoo import models


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

def _get_account_tax_groups_with_notes(self):
self.ensure_one()
for line in self:
tax_groups = line.mapped("invoice_line_ids.tax_ids.tax_group_id")
tax_groups = tax_groups.filtered(lambda g: g.report_note)
return tax_groups
13 changes: 13 additions & 0 deletions account_invoice_tax_note/models/account_tax_group.py
@@ -0,0 +1,13 @@
# Copyright 2018 ACSONE SA/NV (https://acsone.eu)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)

from odoo import fields, models


class AccountTaxGroup(models.Model):
_inherit = "account.tax.group"

report_note = fields.Text(
translate=True,
help="Note to insert on Invoice Report if the tax group is used.",
)
3 changes: 3 additions & 0 deletions account_invoice_tax_note/readme/CONTRIBUTORS.rst
@@ -0,0 +1,3 @@
* François Honoré <francois.honore@acsone.eu>
* Denis Roussel <denis.roussel@acsone.eu>
* Rattapong Chokmasermkul <rattapongc@ecosoft.co.th>
5 changes: 5 additions & 0 deletions account_invoice_tax_note/readme/DESCRIPTION.rst
@@ -0,0 +1,5 @@
In some situations, a mention must be displayed on invoices when a specific tax is used.
This module lets you define such a mention on Tax Groups.
This mechanism complements the invoice note coming from the fiscal position.
These tax group notes are translatable and company dependent.
To contribute to this module, please visit https://odoo-community.org.
3 changes: 3 additions & 0 deletions account_invoice_tax_note/readme/USAGE.rst
@@ -0,0 +1,3 @@
#. Go to 'Accounting/Invoicing > Configuration > Taxes';
#. Select a tax and click on the 'Tax Group' field;
#. Edit the note of the Tax Group.
16 changes: 16 additions & 0 deletions account_invoice_tax_note/reports/report_invoice_document.xml
@@ -0,0 +1,16 @@
<!-- Copyright 2018 ACSONE SA/NV
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html) -->
<odoo>

<template id="report_invoice_document_inherit" inherit_id="account.report_invoice_document">
<p t-if="o.fiscal_position_id.note" position="after">
<t t-set="account_tax_groups" t-value="o._get_account_tax_groups_with_notes()"/>
<t t-if="account_tax_groups">
<t t-foreach="account_tax_groups" t-as="account_tax_group">
<p t-field="account_tax_group.report_note"/>
</t>
</t>
</p>
</template>

</odoo>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7ea8d9b

Please sign in to comment.