Skip to content
Merged
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
128 changes: 128 additions & 0 deletions purchase_order_report_hide_tax/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

======================================
Purchase order line hide tax in report
======================================

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

.. |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/license-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%2Fpurchase--reporting-lightgray.png?logo=github
:target: https://github.com/OCA/purchase-reporting/tree/19.0/purchase_order_report_hide_tax
:alt: OCA/purchase-reporting
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/purchase-reporting-19-0/purchase-reporting-19-0-purchase_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/purchase-reporting&target_branch=19.0
:alt: Try me on Runboat

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

Hide taxes column in the purchase order document that is sent to the
vendor.

.. 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 purchase 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.

Configuration
=============

You can choose to always show the **Taxes** column in the Purchase Order
reports when the taxes on the document belong to certain tax groups
(e.g. domestic transactions). To do so:

- Go to *Invoicing/Accounting > Configuration > Tax Groups*.
- Enable **Show Tax Column in Purchase Report**: If enabled, the
**Taxes** column will always be shown on the Purchase Order report for
this tax group, even when all order lines share the same taxes.

Usage
=====

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

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/purchase-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/purchase-reporting/issues/new?body=module:%20purchase_order_report_hide_tax%0Aversion:%2019.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/>``\ \_\_)
- `Quartile <https://www.quartile.co>`__:

- Aung Ko Ko Lin

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/purchase-reporting <https://github.com/OCA/purchase-reporting/tree/19.0/purchase_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 purchase_order_report_hide_tax/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
18 changes: 18 additions & 0 deletions purchase_order_report_hide_tax/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2025 Moduon Team S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
{
"name": "Purchase order line hide tax in report",
"summary": "Hide taxes column when they don't add value",
"version": "19.0.1.0.0",
"development_status": "Alpha",
"category": "Purchases",
"website": "https://github.com/OCA/purchase-reporting",
"author": "Moduon, Odoo Community Association (OCA)",
"maintainers": ["chienandalu", "rafaelbn"],
"license": "LGPL-3",
"depends": ["purchase"],
"data": [
"reports/purchase_order_report_template.xml",
"views/account_tax_group_views.xml",
],
}
27 changes: 27 additions & 0 deletions purchase_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:
# * purchase_order_report_hide_tax
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-12-10 11:43+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: purchase_order_report_hide_tax
#: model:ir.model,name:purchase_order_report_hide_tax.model_purchase_order
msgid "Purchase Order"
msgstr "Ordine di acquisto"

#. module: purchase_order_report_hide_tax
#: model:ir.model.fields,field_description:purchase_order_report_hide_tax.field_purchase_order__show_tax_column_in_report
msgid "Show Tax Column In Report"
msgstr "Visualizza colonna imposta nel resoconto"
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_order_report_hide_tax
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.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: purchase_order_report_hide_tax
#: model:ir.model.fields,help:purchase_order_report_hide_tax.field_account_tax_group__show_tax_column_in_purchase_report
msgid ""
"If enabled, always show the Taxes column on the Purchase Order report for "
"this tax group even when all lines in the order share the same taxes."
msgstr ""

#. module: purchase_order_report_hide_tax
#: model:ir.model,name:purchase_order_report_hide_tax.model_purchase_order
msgid "Purchase Order"
msgstr ""

#. module: purchase_order_report_hide_tax
#: model:ir.model.fields,field_description:purchase_order_report_hide_tax.field_account_tax_group__show_tax_column_in_purchase_report
msgid "Show Tax Column In Purchase Report"
msgstr ""

#. module: purchase_order_report_hide_tax
#: model:ir.model.fields,field_description:purchase_order_report_hide_tax.field_purchase_order__show_tax_column_in_report
msgid "Show Tax Column In Report"
msgstr ""

#. module: purchase_order_report_hide_tax
#: model:ir.model,name:purchase_order_report_hide_tax.model_account_tax_group
msgid "Tax Group"
msgstr ""
2 changes: 2 additions & 0 deletions purchase_order_report_hide_tax/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import account_tax_group
from . import purchase_order
13 changes: 13 additions & 0 deletions purchase_order_report_hide_tax/models/account_tax_group.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2026 Quartile (https://www.quartile.co)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)

from odoo import fields, models


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

show_tax_column_in_purchase_report = fields.Boolean(
help="If enabled, always show the Taxes column on the Purchase Order report "
"for this tax group even when all lines in the order share the same taxes."
)
26 changes: 26 additions & 0 deletions purchase_order_report_hide_tax/models/purchase_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 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 PurchaseOrder(models.Model):
_inherit = "purchase.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)
# Can be a recordset if several taxes apply
first_line_tax_group = next(
iter(order_lines), order_lines
).tax_ids.tax_group_id
if first_line_tax_group.filtered("show_tax_column_in_purchase_report"):
continue
# Mixed group taxes, let's show them for clarity
order.show_tax_column_in_report = (
first_line_tax_group != order_lines.tax_ids.tax_group_id
)
3 changes: 3 additions & 0 deletions purchase_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"
8 changes: 8 additions & 0 deletions purchase_order_report_hide_tax/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
You can choose to always show the **Taxes** column in the Purchase Order reports
when the taxes on the document belong to certain tax groups (e.g. domestic transactions).
To do so:

- Go to *Invoicing/Accounting > Configuration > Tax Groups*.
- Enable **Show Tax Column in Purchase Report**: If enabled, the **Taxes**
column will always be shown on the Purchase Order report for this tax group,
even when all order lines share the same taxes.
3 changes: 3 additions & 0 deletions purchase_order_report_hide_tax/readme/CONTEXT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
When the taxes are the same in every purchase 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.
3 changes: 3 additions & 0 deletions purchase_order_report_hide_tax/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* David Vidal (`Moduon <https://www.moduon.team/>`__)
* [Quartile](https://www.quartile.co):
* Aung Ko Ko Lin
1 change: 1 addition & 0 deletions purchase_order_report_hide_tax/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hide taxes column in the purchase order document that is sent to the vendor.
2 changes: 2 additions & 0 deletions purchase_order_report_hide_tax/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Whenever the taxes are in the same group for the whole order the column won't be
displayed in the purchase order printed report.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<template
id="report_purchaseorder_document"
inherit_id="purchase.report_purchaseorder_document"
>
<xpath expr="//th[@name='th_taxes']" position="attributes">
<attribute name="t-if">o.show_tax_column_in_report</attribute>
</xpath>
<xpath
expr="//td[span[contains(@t-out, 'line.tax_ids')]]"
position="attributes"
>
<attribute name="t-if">o.show_tax_column_in_report</attribute>
</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
Loading