Skip to content
Open
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
120 changes: 120 additions & 0 deletions sale_order_report_hide_tax/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
==================================
Sale order line hide tax in report
==================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c3f8c634c1fae23b76f78082b36599f63225f7b3b09f33d3e5fa90f5b185f557
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--reporting-lightgray.png?logo=github
:target: https://github.com/OCA/sale-reporting/tree/18.0/sale_order_report_hide_tax
:alt: OCA/sale-reporting
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/sale-reporting-18-0/sale-reporting-18-0-sale_order_report_hide_tax
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-reporting&target_branch=18.0
:alt: Try me on Runboat

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

Hide taxes column in the quotation document that is sent to the
customer. When all quotation lines have the same tax group, the Taxes
column is automatically hidden to avoid displaying redundant information
and to improve document clarity.

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
`More details on development status <https://odoo-community.org/page/development-status>`_

**Table of contents**

.. contents::
:local:

Use Cases / Context
===================

When the taxes are the same in every sales line, that information might
be redundant with the taxes summary and takes valuable space that other
columns might take.

This might be event more annoying when there's tax exemptions like in EU
intracomunitary operations.

Usage
=====

Whenever the taxes are in the same group for the whole order the column
won't be displayed.

The module performs the following validation: - It checks that all order
lines have the same tax group. - It does not validate if the taxes
within the same line are different.

**Result:** - If all tax groups are the same, the Taxes column is hidden
in the printed or sent quotation. - If at least one line has a different
tax group, the Taxes column is displayed as usual.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-reporting/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/sale-reporting/issues/new?body=module:%20sale_order_report_hide_tax%0Aversion:%2018.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
-------

* Moduon

Contributors
------------

- David Vidal (`Moduon <https://www.moduon.team/>`__)
- Sabrina Rodriguez (`Moduon <https://www.moduon.team/>`__)

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-chienandalu| image:: https://github.com/chienandalu.png?size=40px
:target: https://github.com/chienandalu
:alt: chienandalu
.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px
:target: https://github.com/rafaelbn
:alt: rafaelbn

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

|maintainer-chienandalu| |maintainer-rafaelbn|

This module is part of the `OCA/sale-reporting <https://github.com/OCA/sale-reporting/tree/18.0/sale_order_report_hide_tax>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions sale_order_report_hide_tax/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
17 changes: 17 additions & 0 deletions sale_order_report_hide_tax/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2025 Moduon Team S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
{
"name": "Sale order line hide tax in report",
"summary": "Hide taxes column when they don't add value",
"version": "18.0.1.0.1",
"development_status": "Alpha",
"category": "Sales",
"website": "https://github.com/OCA/sale-reporting",
"author": "Moduon, Odoo Community Association (OCA)",
"maintainers": ["chienandalu", "rafaelbn"],
"license": "LGPL-3",
"depends": ["sale"],
"data": [
"reports/sale_order_report_template.xml",
],
}
27 changes: 27 additions & 0 deletions sale_order_report_hide_tax/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_order_report_hide_tax
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-10-22 07:34+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\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 5.10.4\n"

#. module: sale_order_report_hide_tax
#: model:ir.model,name:sale_order_report_hide_tax.model_sale_order
msgid "Sales Order"
msgstr "Ordine di vendita"

#. module: sale_order_report_hide_tax
#: model:ir.model.fields,field_description:sale_order_report_hide_tax.field_sale_order__show_tax_column_in_report
msgid "Show Tax Column In Report"
msgstr "Visualizza colonna imposta nel resoconto"
24 changes: 24 additions & 0 deletions sale_order_report_hide_tax/i18n/sale_order_report_hide_tax.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_order_report_hide_tax
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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: sale_order_report_hide_tax
#: model:ir.model,name:sale_order_report_hide_tax.model_sale_order
msgid "Sales Order"
msgstr ""

#. module: sale_order_report_hide_tax
#: model:ir.model.fields,field_description:sale_order_report_hide_tax.field_sale_order__show_tax_column_in_report
msgid "Show Tax Column In Report"
msgstr ""
1 change: 1 addition & 0 deletions sale_order_report_hide_tax/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import sale_order
21 changes: 21 additions & 0 deletions sale_order_report_hide_tax/models/sale_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2025 Moduon Team S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from odoo import fields, models


class SaleOrder(models.Model):
_inherit = "sale.order"

show_tax_column_in_report = fields.Boolean(
compute="_compute_show_tax_column_in_report"
)

def _compute_show_tax_column_in_report(self):
self.show_tax_column_in_report = True
for order in self.filtered("order_line"):
order_lines = order.order_line.filtered(lambda x: not x.display_type)
first_line_tax_group = fields.first(order_lines).tax_id.tax_group_id
# Mixed group taxes, let's show them for clarity
order.show_tax_column_in_report = any(
first_line_tax_group != line.tax_id.tax_group_id for line in order_lines
)
3 changes: 3 additions & 0 deletions sale_order_report_hide_tax/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
5 changes: 5 additions & 0 deletions sale_order_report_hide_tax/readme/CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
When the taxes are the same in every sales line, that information might be redundant
with the taxes summary and takes valuable space that other columns might take.

This might be event more annoying when there's tax exemptions like in EU intracomunitary
operations.
2 changes: 2 additions & 0 deletions sale_order_report_hide_tax/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- David Vidal ([Moduon](https://www.moduon.team/))
- Sabrina Rodriguez ([Moduon](https://www.moduon.team/))
2 changes: 2 additions & 0 deletions sale_order_report_hide_tax/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Hide taxes column in the quotation document that is sent to the customer.
When all quotation lines have the same tax group, the Taxes column is automatically hidden to avoid displaying redundant information and to improve document clarity.
10 changes: 10 additions & 0 deletions sale_order_report_hide_tax/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Whenever the taxes are in the same group for the whole order the column won't be
displayed.

The module performs the following validation:
- It checks that all order lines have the same tax group.
- It does not validate if the taxes within the same line are different.

**Result:**
- If all tax groups are the same, the Taxes column is hidden in the printed or sent quotation.
- If at least one line has a different tax group, the Taxes column is displayed as usual.
23 changes: 23 additions & 0 deletions sale_order_report_hide_tax/reports/sale_order_report_template.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template
id="report_saleorder_document"
inherit_id="sale.report_saleorder_document"
priority="999"
>
<xpath expr="//th[@name='th_taxes']" position="attributes">
<attribute
name="t-if"
add="doc.show_tax_column_in_report"
separator="and"
/>
</xpath>
<xpath expr="//td[@name='td_taxes']" position="attributes">
<attribute
name="t-if"
add="doc.show_tax_column_in_report"
separator="and"
/>
</xpath>
</template>
</odoo>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading