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
223 changes: 223 additions & 0 deletions account_tax_product_amount/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
==========================
Account tax product amount
==========================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |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%2Faccount--fiscal--rule-lightgray.png?logo=github
:target: https://github.com/OCA/account-fiscal-rule/tree/18.0/account_tax_product_amount
:alt: OCA/account-fiscal-rule
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-fiscal-rule-18-0/account-fiscal-rule-18-0-account_tax_product_amount
: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/account-fiscal-rule&target_branch=18.0
:alt: Try me on Runboat

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

This module allows you to manage fixed tax amounts that vary per product
variant.

By default, Odoo manages fixed tax amounts at the tax level. However,
some taxes effectively depend on product characteristics (like
dimensions, weight, or material) while sharing the same tax
configuration (same account, same name, same tax report line).

With this module, you can configure a tax with ``Amount Type`` set to
``Fixed`` and enable the **Use Product Amount** option. This tells Odoo
to look for the specific amount defined on the product variant. If no
specific amount is found for the variant, the default amount defined on
the tax is used.

**Features:**

- Define specific tax amounts per product variant.
- Support for multiple taxes per product.
- Multi-company support.
- Compatible with Sales, Purchases, Invoicing, and Website Sales.

..

**Note**: This module is particularly useful for handling
**Eco-taxes** (or similar levies) and offers advantages over other
community modules:

- Compared to ``account_ecotax``: This module relies on the standard
Odoo Tax engine. This makes it natively compatible with accounting,
invoicing, and reporting without needing glue modules for every
application (Sales, Purchase, POS, etc.). It also allows using
different accounts per tax easily.
- Compared to ``account_ecotax_tax``: This module does not rely on
``account_tax_python`` (Python Code taxes), which can be complex to
maintain. It also supports multiple different tax amounts for a
single variant independently and offers better flexibility.

**Table of contents**

.. contents::
:local:

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

To configure this module, you need to:

1. **Configure Accounts**: Setup specific accounts for your taxes in
your Chart of Accounts, or decide which existing accounts to use.

2. **Create a Tax**:

- Go to **Accounting > Configuration > Taxes**.
- Create a new tax.
- Set **Tax Computation** (Amount Type) to ``Fixed``.
- Check the box **Use Product Amount**.
- Set a default **Amount**. This will be used as a fallback if no
specific amount is set on the product variant.
- Configure other settings (Accounts, Tax Group, Label on Invoices,
etc.) as usual.

3. **Add tax on product template**:

- Go to **Product template** form view.
- Select the product template.
- Add the tax to the **Sales/Purchase Taxes** field.
- Save the record this will generate the tax amount records for all
existing variants using the default tax amount.

4. **Define Amounts on Products**:

- Go to the **Product Variant** form view.
- You will find a new tab or section (depending on view
configuration) to set the fixed amounts for each tax that has "Use
Product Amount" enabled.
- Alternatively, go to **Accounting > Configuration > Accounting >
Tax > Product Amounts** to see and manage all product tax amounts
in one place.

**Eco-Tax Example (France)**

In France, the "Éco-participation" (Eco-tax) is a fixed contribution
added to the price of new items to fund recycling and waste management.
The amount depends on the product's characteristics (weight, type,
material).

*Scenario*: You sell a sofa that contains electronic components (e.g., a
massage sofa). This product is subject to two distinct eco-taxes: one
for the furniture (Eco-mobilier) and one for the electronics (DEEE).

1. **Purchase**: When you buy the goods, the eco-tax is billed by your
supplier. It is not recoverable VAT but an expense spread over the
product cost.

- We advise using a dedicated Expense Account (e.g., ``607...``) for
each tax or a generic one to track these costs.

2. **Sale**: When you sell the product, you collect the eco-tax from the
customer.

- Use a dedicated Income Account (e.g., ``707...`` or a liability
account depending on your accounting rules) for the tax.
- Since the Eco-tax is part of the taxable basis for VAT, ensure that
the Eco-tax is applied *before* VAT.
- In the Tax configuration, for the VAT tax, ensure "Affect Base of
Subsequent Taxes" is checked (or simply ensure the Eco-tax is in a
Tax Group with lower sequence/sequence number so it applies first,
and VAT applies on top).

*Calculation Example*:

- Sofa Base Price: 10.00€
- Eco-mobilier (Furniture Tax): 1.50€
- VAT (20%): Applied on (10.00€ + 1.50€) = 11.50€ \* 20% = 2.30€
- **Total Price**: 10.00€ + 1.50€ + 2.30€ = 13.80€

*Journal Entries*:

- **Credit** 707000 Product Sales: 10.00€
- **Credit** 707100 Eco-tax Income (or similar): 1.50€
- **Credit** 445700 Output VAT: 2.30€
- **Debit** 411100 Customer Receivable: 13.80€

Usage
=====

Once configured:

1. Create a Sales Order, Purchase Order, or Invoice.
2. Select a Product Variant that has a specific tax amount configured.
3. Add the corresponding tax (the one with "Use Product Amount" checked)
to the line.

..

**Note**: If the tax is set as a Default Tax on the product, it will
be added automatically.

4. Odoo will compute the tax amount based on the value defined for the
selected variant.
5. If you change the quantity, the fixed tax amount is multiplied by the
quantity (e.g., 2 units \* 1.50€ = 3.00€ tax).

Known issues / Roadmap
======================

- Allow setting the tax amount directly from the **Product Template**
view when the product has only one variant.
- Support for **Point of Sale (POS)** via a dedicated bridge module
(e.g., ``pos_account_tax_product_amount``).

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-fiscal-rule/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/account-fiscal-rule/issues/new?body=module:%20account_tax_product_amount%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
-------

* Pierre Verkest

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

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

|maintainer-petrus-v|

This module is part of the `OCA/account-fiscal-rule <https://github.com/OCA/account-fiscal-rule/tree/18.0/account_tax_product_amount>`_ 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 account_tax_product_amount/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions account_tax_product_amount/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2025 Pierre Verkest <[email protected]>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
"name": "Account tax product amount",
"summary": "Manage tax amount per product variant",
"version": "18.0.1.0.0",
"category": "Accounting/Accounting",
"license": "LGPL-3",
"author": "Pierre Verkest, Odoo Community Association (OCA)",
"maintainers": ["petrus-v"],
"depends": ["account", "product"],
"data": [
"security/ir.model.access.csv",
"security/ir_rules.xml",
"views/account_tax_view.xml",
"views/account_tax_product_amount_view.xml",
"views/product_product_view.xml",
],
"website": "https://github.com/OCA/account-fiscal-rule",
}
140 changes: 140 additions & 0 deletions account_tax_product_amount/i18n/account_tax_product_amount.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_tax_product_amount
#
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: account_tax_product_amount
#: model:ir.model,name:account_tax_product_amount.model_account_tax_product_amount
msgid "Account Tax Product Amounts (ie: usefull to manage ecotax)"
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__amount
msgid "Amount"
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__company_id
msgid "Company"
msgstr ""

#. module: account_tax_product_amount
#: model_terms:ir.actions.act_window,help:account_tax_product_amount.action_tax_product_amount
msgid "Create a new tax amount for a product variant"
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__create_uid
msgid "Created by"
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__create_date
msgid "Created on"
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model.fields,help:account_tax_product_amount.field_product_product__tax_amount_ids
msgid "Define specific tax fixed amounts for this variant."
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model.fields,help:account_tax_product_amount.field_account_tax_product_amount__type_tax_use
msgid ""
"Determines where the tax is selectable. Note: 'None' means a tax can't be "
"used by itself, however it can still be used in a group. 'adjustment' is "
"used to perform tax adjustment."
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__display_name
msgid "Display Name"
msgstr ""

#. module: account_tax_product_amount
#: model_terms:ir.ui.view,arch_db:account_tax_product_amount.product_normal_form_view
msgid "Fixed Tax Amount"
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__id
msgid "ID"
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model.fields,help:account_tax_product_amount.field_account_tax__use_product_amount
msgid ""
"If checked, the tax amount is taken from the product variant (with a "
"fallback to the tax amount)."
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__write_uid
msgid "Last Updated by"
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__write_date
msgid "Last Updated on"
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model,name:account_tax_product_amount.model_product_template
msgid "Product"
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model,name:account_tax_product_amount.model_product_product
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__product_id
msgid "Product Variant"
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model,name:account_tax_product_amount.model_account_tax
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__tax_id
msgid "Tax"
msgstr ""

#. module: account_tax_product_amount
#: model:ir.actions.act_window,name:account_tax_product_amount.action_tax_product_amount
#: model:ir.ui.menu,name:account_tax_product_amount.menu_tax_product_amount
msgid "Tax Product Amount"
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__type_tax_use
msgid "Tax Type"
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model.fields,field_description:account_tax_product_amount.field_product_product__tax_amount_ids
msgid "Tax fixed amounts"
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model.constraint,message:account_tax_product_amount.constraint_account_tax_product_amount_product_tax_unique
msgid "The tax amount must be unique per product variant and tax."
msgstr ""

#. module: account_tax_product_amount
#: model_terms:ir.ui.view,arch_db:account_tax_product_amount.product_normal_form_view
#: model_terms:ir.ui.view,arch_db:account_tax_product_amount.product_variant_easy_edit_view
msgid ""
"To add / remove tax amount line, please use\n"
" Sales/Purchase Taxes field on product template."
msgstr ""

#. module: account_tax_product_amount
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax__use_product_amount
msgid "Use Product Amount"
msgstr ""
Loading