Skip to content

Commit 79c4a19

Browse files
chienandalusabrinaRMartin
authored andcommitted
[ADD] sale_order_report_hide_tax: new module
MT-11205
1 parent d19ef23 commit 79c4a19

File tree

14 files changed

+681
-0
lines changed

14 files changed

+681
-0
lines changed
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
.. image:: https://odoo-community.org/readme-banner-image
2+
:target: https://odoo-community.org/get-involved?utm_source=readme
3+
:alt: Odoo Community Association
4+
5+
==================================
6+
Sale order line hide tax in report
7+
==================================
8+
9+
..
10+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11+
!! This file is generated by oca-gen-addon-readme !!
12+
!! changes will be overwritten. !!
13+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14+
!! source digest: sha256:c3f8c634c1fae23b76f78082b36599f63225f7b3b09f33d3e5fa90f5b185f557
15+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16+
17+
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
18+
:target: https://odoo-community.org/page/development-status
19+
:alt: Alpha
20+
.. |badge2| image:: https://img.shields.io/badge/license-LGPL--3-blue.png
21+
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
22+
:alt: License: LGPL-3
23+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--reporting-lightgray.png?logo=github
24+
:target: https://github.com/OCA/sale-reporting/tree/16.0/sale_order_report_hide_tax
25+
:alt: OCA/sale-reporting
26+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27+
:target: https://translation.odoo-community.org/projects/sale-reporting-16-0/sale-reporting-16-0-sale_order_report_hide_tax
28+
:alt: Translate me on Weblate
29+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-reporting&target_branch=16.0
31+
:alt: Try me on Runboat
32+
33+
|badge1| |badge2| |badge3| |badge4| |badge5|
34+
35+
Hide taxes column in the quotation document that is sent to the
36+
customer.
37+
38+
.. IMPORTANT::
39+
This is an alpha version, the data model and design can change at any time without warning.
40+
Only for development or testing purpose, do not use in production.
41+
`More details on development status <https://odoo-community.org/page/development-status>`_
42+
43+
**Table of contents**
44+
45+
.. contents::
46+
:local:
47+
48+
Use Cases / Context
49+
===================
50+
51+
When the taxes are the same in every sales line, that information might
52+
be redundant with the taxes summary and takes valuable space that other
53+
columns might take.
54+
55+
This might be event more annoying when there's tax exemptions like in EU
56+
intracomunitary operations.
57+
58+
Usage
59+
=====
60+
61+
Whenever the taxes are in the same group for the whole order the column
62+
won't be displayed.
63+
64+
Bug Tracker
65+
===========
66+
67+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-reporting/issues>`_.
68+
In case of trouble, please check there if your issue has already been reported.
69+
If you spotted it first, help us to smash it by providing a detailed and welcomed
70+
`feedback <https://github.com/OCA/sale-reporting/issues/new?body=module:%20sale_order_report_hide_tax%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
71+
72+
Do not contact contributors directly about support or help with technical issues.
73+
74+
Credits
75+
=======
76+
77+
Authors
78+
-------
79+
80+
* Moduon
81+
82+
Contributors
83+
------------
84+
85+
- David Vidal (``Moduon <https://www.moduon.team/>``\ \_\_)
86+
87+
Maintainers
88+
-----------
89+
90+
This module is maintained by the OCA.
91+
92+
.. image:: https://odoo-community.org/logo.png
93+
:alt: Odoo Community Association
94+
:target: https://odoo-community.org
95+
96+
OCA, or the Odoo Community Association, is a nonprofit organization whose
97+
mission is to support the collaborative development of Odoo features and
98+
promote its widespread use.
99+
100+
.. |maintainer-chienandalu| image:: https://github.com/chienandalu.png?size=40px
101+
:target: https://github.com/chienandalu
102+
:alt: chienandalu
103+
.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px
104+
:target: https://github.com/rafaelbn
105+
:alt: rafaelbn
106+
107+
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
108+
109+
|maintainer-chienandalu| |maintainer-rafaelbn|
110+
111+
This module is part of the `OCA/sale-reporting <https://github.com/OCA/sale-reporting/tree/16.0/sale_order_report_hide_tax>`_ project on GitHub.
112+
113+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2025 Moduon Team S.L.
2+
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
3+
{
4+
"name": "Sale order line hide tax in report",
5+
"summary": "Hide taxes column when they don't add value",
6+
"version": "16.0.1.0.1",
7+
"development_status": "Alpha",
8+
"category": "Sales",
9+
"website": "https://github.com/OCA/sale-reporting",
10+
"author": "Moduon, Odoo Community Association (OCA)",
11+
"maintainers": ["chienandalu", "rafaelbn"],
12+
"license": "LGPL-3",
13+
"depends": ["sale"],
14+
"data": [
15+
"reports/sale_order_report_template.xml",
16+
],
17+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * sale_order_report_hide_tax
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 16.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2025-10-22 07:34+0000\n"
10+
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
11+
"Language-Team: none\n"
12+
"Language: it\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 5.10.4\n"
18+
19+
#. module: sale_order_report_hide_tax
20+
#: model:ir.model,name:sale_order_report_hide_tax.model_sale_order
21+
msgid "Sales Order"
22+
msgstr "Ordine di vendita"
23+
24+
#. module: sale_order_report_hide_tax
25+
#: model:ir.model.fields,field_description:sale_order_report_hide_tax.field_sale_order__show_tax_column_in_report
26+
msgid "Show Tax Column In Report"
27+
msgstr "Visualizza colonna imposta nel resoconto"
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * sale_order_report_hide_tax
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 16.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"Last-Translator: \n"
10+
"Language-Team: \n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: \n"
14+
"Plural-Forms: \n"
15+
16+
#. module: sale_order_report_hide_tax
17+
#: model:ir.model,name:sale_order_report_hide_tax.model_sale_order
18+
msgid "Sales Order"
19+
msgstr ""
20+
21+
#. module: sale_order_report_hide_tax
22+
#: model:ir.model.fields,field_description:sale_order_report_hide_tax.field_sale_order__show_tax_column_in_report
23+
msgid "Show Tax Column In Report"
24+
msgstr ""
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import sale_order
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Copyright 2025 Moduon Team S.L.
2+
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
3+
from odoo import fields, models
4+
5+
6+
class SaleOrder(models.Model):
7+
_inherit = "sale.order"
8+
9+
show_tax_column_in_report = fields.Boolean(
10+
compute="_compute_show_tax_column_in_report"
11+
)
12+
13+
def _compute_show_tax_column_in_report(self):
14+
self.show_tax_column_in_report = True
15+
for order in self.filtered("order_line"):
16+
order_lines = order.order_line.filtered(lambda x: not x.display_type)
17+
# Can be a recordset if several taxes apply
18+
first_line_tax_group = fields.first(order_lines).tax_id.tax_group_id
19+
# Mixed group taxes, let's show them for clarity
20+
order.show_tax_column_in_report = (
21+
first_line_tax_group != order_lines.tax_id.tax_group_id
22+
)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
When the taxes are the same in every sales line, that information might be redundant
2+
with the taxes summary and takes valuable space that other columns might take.
3+
4+
This might be event more annoying when there's tax exemptions like in EU intracomunitary
5+
operations.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* David Vidal (`Moduon <https://www.moduon.team/>`__)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hide taxes column in the quotation document that is sent to the customer.

0 commit comments

Comments
 (0)