Skip to content

Commit 1a49848

Browse files
committed
[ADD] account_tax_product_amount: set tax amount per product variant
1 parent 62cf4a3 commit 1a49848

22 files changed

+1429
-0
lines changed
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
==========================
2+
Account tax product amount
3+
==========================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:3368002193eca20078520b870a3ea0e9948107b8c03af38d3e94e7ad10092df6
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
18+
:alt: License: LGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--fiscal--rule-lightgray.png?logo=github
20+
:target: https://github.com/OCA/account-fiscal-rule/tree/18.0/account_tax_product_amount
21+
:alt: OCA/account-fiscal-rule
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/account-fiscal-rule-18-0/account-fiscal-rule-18-0-account_tax_product_amount
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-fiscal-rule&target_branch=18.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
Account tax amount per product variant
32+
======================================
33+
34+
While managing fixed tax amount, sometime we want to use a differnt
35+
amount for each variant of a product. To handle this, we use the amount
36+
type ``fixed`` and add a new setting **use product amount** to tell the
37+
system to use the amount from the product variant. If not set (equals to
38+
0), the tax amount is computed as usual taking information from the tax.
39+
40+
Features:
41+
42+
- multiple tax amount per product variant (one per tax)
43+
- multi-company support
44+
- compatible with sale, purchase, invoicing, website sale
45+
46+
..
47+
48+
**Note**: This module can be use to handle ecotax that differs from
49+
other modules in this repository:
50+
51+
- ``account_ecotax``: which do not rely on tax wich is hard to use
52+
differnt accounts and requires an odoo module for sale,purchase,
53+
account, pos, etc.
54+
- ``account_ecotax_tax``: which rely on ``account_tax_python`` but do
55+
not allow to use multiple tax amount for a single variant and also
56+
depends on the ``account_ecotax`` modules which makes the whole
57+
module less flexible.
58+
59+
**Table of contents**
60+
61+
.. contents::
62+
:local:
63+
64+
Configuration
65+
=============
66+
67+
To configure this module, you need to:
68+
69+
- Setup specific accounts for your taxes or decide which account will be
70+
used for all taxes.
71+
72+
- Create a tax with amount type ``fixed`` and set the
73+
``use_product_amount`` to ``True``. Other settings behave as usual.
74+
75+
- Configure the tax on product template this will generate all the tax
76+
amount for each product variant using default values set on the tax.
77+
78+
- Configure the tax on product variant form view or in the Accounting >
79+
Configuration > Accounting > Tax > Product Amounts menu.
80+
81+
**EcoTax example :**
82+
83+
In france eco tax is a fixed tax amount that depends on product variant
84+
caractersistics.
85+
86+
If you are selling sofa that contains electronics, you will have two
87+
different tax amount for the same product variant: one for the sofa and
88+
one for the electronics.
89+
90+
While you purchase goods eco tax is not computed as VAT this are expense
91+
that are added to the price. So we advise you to use a dedicated account
92+
in ``607`` for each tax collector to properly follow and manage your eco
93+
taxes.
94+
95+
Same for sale, you can use a dedicated account in ``707`` as the ecotax
96+
is part of your income.
97+
98+
Also the VAT amount is computed on the product variant base price plus
99+
the ecotax amount so you needs to tick the
100+
``Affect Base of Subsequent Taxes`` to ``True`` and ensure the tax is
101+
properly sorted in the tax sequence.
102+
103+
So when you sell a product variant with a base price of 10.00€ with an
104+
ecotax amount of 1.50 and a VAT of 20%. The final price will be 10.00€
105+
(base price) + 1.50€ (ecotax) + 2.30€ (VAT: 11.50€ \* 20%) = 13.80€
106+
107+
You could get the following journal items:
108+
109+
- credit 10.00€ (base price) -> 7070 (income)
110+
- credit 1.50€ (ecotax) -> 7071 (eco tax income)
111+
- credit 2.30€ (VAT) -> 445 (VAT tax)
112+
- debit 13.80€ (total to pay) -> 411 (partners receivable account)
113+
114+
Usage
115+
=====
116+
117+
Once you have setup account, tax and product, you can use product
118+
variant as usual in invoice, sale, purchase, etc.
119+
120+
Known issues / Roadmap
121+
======================
122+
123+
- Allow to set the tax amount from the product template view when there
124+
is only one variant.
125+
- implement account_tax.js to handle the tax amount in pos and create a
126+
glue module (such as ``pos_tax_product_amount``) to handle tax product
127+
amount in pos.
128+
129+
Bug Tracker
130+
===========
131+
132+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-fiscal-rule/issues>`_.
133+
In case of trouble, please check there if your issue has already been reported.
134+
If you spotted it first, help us to smash it by providing a detailed and welcomed
135+
`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**>`_.
136+
137+
Do not contact contributors directly about support or help with technical issues.
138+
139+
Credits
140+
=======
141+
142+
Authors
143+
-------
144+
145+
* Pierre Verkest
146+
147+
Maintainers
148+
-----------
149+
150+
This module is maintained by the OCA.
151+
152+
.. image:: https://odoo-community.org/logo.png
153+
:alt: Odoo Community Association
154+
:target: https://odoo-community.org
155+
156+
OCA, or the Odoo Community Association, is a nonprofit organization whose
157+
mission is to support the collaborative development of Odoo features and
158+
promote its widespread use.
159+
160+
.. |maintainer-petrus-v| image:: https://github.com/petrus-v.png?size=40px
161+
:target: https://github.com/petrus-v
162+
:alt: petrus-v
163+
164+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
165+
166+
|maintainer-petrus-v|
167+
168+
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.
169+
170+
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: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2025 Pierre Verkest <[email protected]>
2+
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
3+
{
4+
"name": "Account tax product amount",
5+
"summary": "Manage tax amount per product variant",
6+
"version": "18.0.1.0.0",
7+
"category": "Accounting/Accounting",
8+
"license": "LGPL-3",
9+
"author": "Pierre Verkest, Odoo Community Association (OCA)",
10+
"maintainers": ["petrus-v"],
11+
"depends": ["account", "product"],
12+
"data": [
13+
"security/ir.model.access.csv",
14+
"views/account_tax_view.xml",
15+
"views/account_tax_product_amount_view.xml",
16+
"views/product_product_view.xml",
17+
],
18+
"website": "https://github.com/OCA/account-fiscal-rule",
19+
}
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * account_tax_product_amount
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 18.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: account_tax_product_amount
17+
#: model:ir.model,name:account_tax_product_amount.model_account_tax_product_amount
18+
msgid "Account Tax Product Amounts (ie: usefull to manage ecotax)"
19+
msgstr ""
20+
21+
#. module: account_tax_product_amount
22+
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__amount
23+
msgid "Amount"
24+
msgstr ""
25+
26+
#. module: account_tax_product_amount
27+
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__company_id
28+
msgid "Company"
29+
msgstr ""
30+
31+
#. module: account_tax_product_amount
32+
#: model_terms:ir.actions.act_window,help:account_tax_product_amount.action_tax_product_amount
33+
msgid "Create a new tax amount for a product variant"
34+
msgstr ""
35+
36+
#. module: account_tax_product_amount
37+
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__create_uid
38+
msgid "Created by"
39+
msgstr ""
40+
41+
#. module: account_tax_product_amount
42+
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__create_date
43+
msgid "Created on"
44+
msgstr ""
45+
46+
#. module: account_tax_product_amount
47+
#: model:ir.model.fields,help:account_tax_product_amount.field_product_product__tax_amount_ids
48+
msgid "Define specific tax fixed amounts for this variant."
49+
msgstr ""
50+
51+
#. module: account_tax_product_amount
52+
#: model:ir.model.fields,help:account_tax_product_amount.field_account_tax_product_amount__type_tax_use
53+
msgid ""
54+
"Determines where the tax is selectable. Note: 'None' means a tax can't be "
55+
"used by itself, however it can still be used in a group. 'adjustment' is "
56+
"used to perform tax adjustment."
57+
msgstr ""
58+
59+
#. module: account_tax_product_amount
60+
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__display_name
61+
msgid "Display Name"
62+
msgstr ""
63+
64+
#. module: account_tax_product_amount
65+
#: model_terms:ir.ui.view,arch_db:account_tax_product_amount.product_normal_form_view
66+
msgid "Fixed Tax Amount"
67+
msgstr ""
68+
69+
#. module: account_tax_product_amount
70+
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__id
71+
msgid "ID"
72+
msgstr ""
73+
74+
#. module: account_tax_product_amount
75+
#: model:ir.model.fields,help:account_tax_product_amount.field_account_tax__use_product_amount
76+
msgid ""
77+
"If checked, the tax amount is taken from the product variant (with a "
78+
"fallback to the tax amount)."
79+
msgstr ""
80+
81+
#. module: account_tax_product_amount
82+
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__write_uid
83+
msgid "Last Updated by"
84+
msgstr ""
85+
86+
#. module: account_tax_product_amount
87+
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__write_date
88+
msgid "Last Updated on"
89+
msgstr ""
90+
91+
#. module: account_tax_product_amount
92+
#: model:ir.model,name:account_tax_product_amount.model_product_template
93+
msgid "Product"
94+
msgstr ""
95+
96+
#. module: account_tax_product_amount
97+
#: model:ir.model,name:account_tax_product_amount.model_product_product
98+
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__product_id
99+
msgid "Product Variant"
100+
msgstr ""
101+
102+
#. module: account_tax_product_amount
103+
#: model:ir.model,name:account_tax_product_amount.model_account_tax
104+
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__tax_id
105+
msgid "Tax"
106+
msgstr ""
107+
108+
#. module: account_tax_product_amount
109+
#: model:ir.actions.act_window,name:account_tax_product_amount.action_tax_product_amount
110+
#: model:ir.ui.menu,name:account_tax_product_amount.menu_tax_product_amount
111+
msgid "Tax Product Amount"
112+
msgstr ""
113+
114+
#. module: account_tax_product_amount
115+
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax_product_amount__type_tax_use
116+
msgid "Tax Type"
117+
msgstr ""
118+
119+
#. module: account_tax_product_amount
120+
#: model:ir.model.fields,field_description:account_tax_product_amount.field_product_product__tax_amount_ids
121+
msgid "Tax fixed amounts"
122+
msgstr ""
123+
124+
#. module: account_tax_product_amount
125+
#: model:ir.model.constraint,message:account_tax_product_amount.constraint_account_tax_product_amount_product_tax_unique
126+
msgid "The tax amount must be unique per product variant and tax."
127+
msgstr ""
128+
129+
#. module: account_tax_product_amount
130+
#: model_terms:ir.ui.view,arch_db:account_tax_product_amount.product_normal_form_view
131+
#: model_terms:ir.ui.view,arch_db:account_tax_product_amount.product_variant_easy_edit_view
132+
msgid ""
133+
"To add / remove tax amount line, please use\n"
134+
" Sales/Purchase Taxes field on product template."
135+
msgstr ""
136+
137+
#. module: account_tax_product_amount
138+
#: model:ir.model.fields,field_description:account_tax_product_amount.field_account_tax__use_product_amount
139+
msgid "Use Product Amount"
140+
msgstr ""

0 commit comments

Comments
 (0)