diff --git a/purchase_invoice_subtotal_taxes/README.md b/purchase_invoice_subtotal_taxes/README.md new file mode 100644 index 0000000..da35c3a --- /dev/null +++ b/purchase_invoice_subtotal_taxes/README.md @@ -0,0 +1,66 @@ +# Purchase Invoice Subtotal with Taxes + +## Description + +This module adds two optional columns to purchase orders and invoices to display the subtotal both with and without taxes, regardless of the tax configuration in Odoo. + +### Problem + +By default, Odoo only shows one subtotal column in purchase orders and invoices based on the tax configuration: +- If taxes are configured as "included in price", it shows the total with taxes +- If taxes are configured as "excluded from price", it shows the total without taxes + +However, in some cases, users need to see **both** values at the same time for comparison or reporting purposes. + +### Solution + +This module adds two new optional columns: +- **Subtotal (No Tax)**: Always shows the line subtotal without taxes included +- **Subtotal (Tax Incl.)**: Always shows the line subtotal with taxes included + +These columns are available in: +- Purchase order lines +- Invoice lines (customer and vendor invoices) + +Both columns are hidden by default (optional="hide") and can be shown by users as needed using the column visibility controls. + +## Installation + +1. Install the module from the Apps menu +2. No additional configuration is required + +## Usage + +After installation: +1. Go to a purchase order or invoice +2. In the lines view, click on the column selector (≡ icon) +3. Enable "Subtotal (No Tax)" and/or "Subtotal (Tax Incl.)" columns +4. Both values will be displayed regardless of your tax configuration + +## Technical Details + +The module creates two computed fields on: +- `purchase.order.line`: `price_subtotal_no_tax` and `price_subtotal_with_tax` +- `account.move.line`: `price_subtotal_no_tax` and `price_subtotal_with_tax` + +These fields are based on the existing `price_subtotal` (without tax) and `price_total` (with tax) fields, ensuring consistency with Odoo's core calculations. + +## Bug Tracker + +Bugs are tracked on [GitHub Issues](https://github.com/OCA/account-invoicing/issues). + +## Credits + +### Contributors + +* Criptomart + +### Maintainers + +This module is maintained by the OCA. + +## Compatibility + +- Odoo 16.0 +- purchase +- account diff --git a/purchase_invoice_subtotal_taxes/__init__.py b/purchase_invoice_subtotal_taxes/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/purchase_invoice_subtotal_taxes/__manifest__.py b/purchase_invoice_subtotal_taxes/__manifest__.py new file mode 100644 index 0000000..1ef984a --- /dev/null +++ b/purchase_invoice_subtotal_taxes/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2025 Criptomart +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +{ + "name": "Purchase Invoice Subtotal with Taxes", + "version": "16.0.1.0.0", + "summary": "Show both subtotal with and without taxes as optional columns", + "license": "AGPL-3", + "author": "Criptomart, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/account-invoicing", + "depends": ["purchase", "account"], + "data": [ + "views/purchase_order_view.xml", + "views/account_move_view.xml", + ], + "installable": True, +} diff --git a/purchase_invoice_subtotal_taxes/i18n/es.po b/purchase_invoice_subtotal_taxes/i18n/es.po new file mode 100644 index 0000000..124f7a7 --- /dev/null +++ b/purchase_invoice_subtotal_taxes/i18n/es.po @@ -0,0 +1,28 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_invoice_subtotal_taxes +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-12-04 16:53+0000\n" +"PO-Revision-Date: 2025-12-04 16:53+0000\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_invoice_subtotal_taxes +#: model_terms:ir.ui.view,arch_db:purchase_invoice_subtotal_taxes.purchase_order_form_subtotal_taxes +#: model_terms:ir.ui.view,arch_db:purchase_invoice_subtotal_taxes.view_move_form_subtotal_taxes +msgid "Subtotal (No Tax)" +msgstr "Subtotal (Sin Imp.)" + +#. module: purchase_invoice_subtotal_taxes +#: model_terms:ir.ui.view,arch_db:purchase_invoice_subtotal_taxes.purchase_order_form_subtotal_taxes +#: model_terms:ir.ui.view,arch_db:purchase_invoice_subtotal_taxes.view_move_form_subtotal_taxes +msgid "Subtotal (Tax Incl.)" +msgstr "Subtotal (Con Imp.)" diff --git a/purchase_invoice_subtotal_taxes/i18n/purchase_invoice_subtotal_taxes.pot b/purchase_invoice_subtotal_taxes/i18n/purchase_invoice_subtotal_taxes.pot new file mode 100644 index 0000000..b7c40ba --- /dev/null +++ b/purchase_invoice_subtotal_taxes/i18n/purchase_invoice_subtotal_taxes.pot @@ -0,0 +1,28 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * purchase_invoice_subtotal_taxes +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-12-04 16:53+0000\n" +"PO-Revision-Date: 2025-12-04 16:53+0000\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_invoice_subtotal_taxes +#: model_terms:ir.ui.view,arch_db:purchase_invoice_subtotal_taxes.purchase_order_form_subtotal_taxes +#: model_terms:ir.ui.view,arch_db:purchase_invoice_subtotal_taxes.view_move_form_subtotal_taxes +msgid "Subtotal (No Tax)" +msgstr "" + +#. module: purchase_invoice_subtotal_taxes +#: model_terms:ir.ui.view,arch_db:purchase_invoice_subtotal_taxes.purchase_order_form_subtotal_taxes +#: model_terms:ir.ui.view,arch_db:purchase_invoice_subtotal_taxes.view_move_form_subtotal_taxes +msgid "Subtotal (Tax Incl.)" +msgstr "" diff --git a/purchase_invoice_subtotal_taxes/views/account_move_view.xml b/purchase_invoice_subtotal_taxes/views/account_move_view.xml new file mode 100644 index 0000000..cfc6f74 --- /dev/null +++ b/purchase_invoice_subtotal_taxes/views/account_move_view.xml @@ -0,0 +1,31 @@ + + + + + + account.move.form.subtotal.taxes + account.move + + + + + + show + Subtotal (No Tax) + + + + + show + Subtotal (Tax Incl.) + + + + + diff --git a/purchase_invoice_subtotal_taxes/views/purchase_order_view.xml b/purchase_invoice_subtotal_taxes/views/purchase_order_view.xml new file mode 100644 index 0000000..18815b7 --- /dev/null +++ b/purchase_invoice_subtotal_taxes/views/purchase_order_view.xml @@ -0,0 +1,30 @@ + + + + + + purchase.order.form.subtotal.taxes + purchase.order + + + + + 0 + hide + Subtotal (Tax Incl.) + + + + show + Subtotal (No Tax) + + + + +