Skip to content

Commit b880a86

Browse files
committed
[IMP] Taxes: improve tax configuration doc
task-5094417 We improve the following sections of the Taxes page: - Tax computations: At the moment, the section for the `Percentage of Price tax included` tax computation doesn't distinguish itself enough from the 'Included in Price' option which people usually want. We also improve the examples. - Included in Price - Affects base of subsequent taxes - Base affected by preceding taxes: this option was not documented, so we add a section for it. X-original-commit: f596554
1 parent 5661b5e commit b880a86

File tree

1 file changed

+198
-53
lines changed
  • content/applications/finance/accounting

1 file changed

+198
-53
lines changed

content/applications/finance/accounting/taxes.rst

Lines changed: 198 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -72,23 +72,42 @@ The **tax name** is displayed for backend users in the :guilabel:`Taxes` field i
7272
Tax computation
7373
~~~~~~~~~~~~~~~
7474

75-
- **Group of Taxes**
75+
The :guilabel:`Tax Computation` field determines how the tax amount is computed from the sales
76+
price. The following options are available:
77+
78+
- :ref:`Group of Taxes <taxes/computation/group-of-taxes>`: a combination of several other taxes
79+
- :ref:`Fixed <taxes/computation/fixed>`: a fixed amount
80+
- :ref:`Percentage of Price <taxes/computation/percentage-of-price>`: a percentage of the
81+
tax-excluded sales price
82+
- :ref:`Percentage of Price Tax Included <taxes/computation/percentage-of-price-tax-included>`: a
83+
percentage of the tax-included total
84+
- :ref:`Python Code <taxes/computation/python-code>`: a custom user-defined formula
85+
86+
.. _taxes/computation/group-of-taxes:
87+
88+
Group of taxes
89+
**************
7690

7791
The tax is a combination of multiple sub-taxes. You can add as many taxes as you want, in the
7892
order you want them to be applied.
7993

80-
.. important::
81-
Make sure that the tax sequence is correct, as the order in which they are may impact the
82-
taxes' amounts computation, especially if one of the taxes :ref:`affects the base of the
83-
subsequent ones <taxes/base-subsequent>`.
94+
.. important::
95+
Make sure the tax sequence is correct, as the display order determines the application order and
96+
may affect tax computation, particularly if a tax :ref:`affects the base of subsequent taxes
97+
<taxes/base-subsequent>`.
8498

85-
- **Fixed**
99+
.. _taxes/computation/fixed:
86100

87-
The tax has a fixed amount in the default currency. The amount remains the same, regardless of the
88-
sales price.
101+
Fixed
102+
*****
103+
104+
The tax has a fixed amount in the default currency. The amount remains the same per unit,
105+
regardless of the sales price.
106+
107+
The computation is :math:`\text{tax amount} = \text{fixed tax amount} \times \text{quantity}`.
89108

90109
.. example::
91-
A product has a sales price of $1000, and we apply a $10 *fixed* tax. We then have:
110+
A product has a sales price of $1000, and we apply a $10 :guilabel:`Fixed` tax. We then have:
92111

93112
+-------------+-------------+----------+----------+
94113
| Product | Price | Tax | Total |
@@ -97,47 +116,137 @@ Tax computation
97116
| 1,000 | 1,000 | 10 | 1,010.00 |
98117
+-------------+-------------+----------+----------+
99118

100-
- **Percentage of price**
119+
.. _taxes/computation/percentage-of-price:
101120

102-
The *sales price* is the taxable basis: the tax amount is computed by multiplying the sales price
103-
by the tax percentage.
121+
Percentage of price
122+
*******************
104123

105-
.. example::
106-
A product has a sales price of $1000, and we apply a *10% of Price* tax. We then have:
124+
The tax rate is a percentage of the **tax-excluded** subtotal.
107125

108-
+-------------+-------------+----------+----------+
109-
| Product | Price | Tax | Total |
110-
| sales price | without tax | | |
111-
+=============+=============+==========+==========+
112-
| 1,000 | 1,000 | 100 | 1,100.00 |
113-
+-------------+-------------+----------+----------+
126+
The exact tax computation depends on the :ref:`Included in Price <taxes/included-in-price>` field,
127+
which determines whether the sales price should be treated as tax-excluded or tax-included:
128+
129+
.. tabs::
130+
.. tab:: Tax-excluded
131+
132+
If :guilabel:`Included in Price` is disabled, the computation is :math:`\text{tax amount}
133+
= \text{sales price} \times \text{tax rate}`.
134+
135+
.. example::
136+
A product has a sales price of $1000, and we apply a 10% :guilabel:`Percentage of Price`
137+
tax that is not :guilabel:`Included in Price`. We then have:
138+
139+
+-------------+-------------+----------+----------+
140+
| Product | Price | Tax | Total |
141+
| sales price | without tax | | |
142+
+=============+=============+==========+==========+
143+
| 1,000 | 1,000 | 100 | 1,100.00 |
144+
+-------------+-------------+----------+----------+
145+
146+
.. tab:: Tax-included
147+
148+
If :guilabel:`Included in Price` is enabled, the computation is :math:`\text{tax amount} =
149+
\text{sales price} \times \frac{\text{tax rate}}{1 + \text{tax rate}}`.
150+
151+
.. example::
152+
A product has a sales price of $1000, and we apply a 10% :guilabel:`Percentage of Price`
153+
tax that is :guilabel:`Included in Price`. We then have:
154+
155+
+-------------+-------------+----------+----------+
156+
| Product | Price | Tax | Total |
157+
| sales price | without tax | | |
158+
+=============+=============+==========+==========+
159+
| 1,000 | 909.09 | 90.91 | 1,000.00 |
160+
+-------------+-------------+----------+----------+
161+
162+
.. _taxes/computation/percentage-of-price-tax-included:
163+
164+
Percentage of price tax included
165+
********************************
166+
167+
.. important::
168+
This tax computation is rarely used and only useful in countries (e.g., Brazil, Bolivia) that
169+
quote tax rates as a percentage of the tax-included total.
170+
For the more common need to compute tax amounts from a tax-included price, use the
171+
:ref:`Percentage of Price <taxes/computation/percentage-of-price>` tax computation with the
172+
:ref:`Included in Price <taxes/included-in-price>` option.
173+
174+
The tax rate is a percentage of the **tax-included** total.
175+
176+
The exact tax computation depends on the :ref:`Included in Price <taxes/included-in-price>` field,
177+
which determines whether the sales price should be treated as tax-excluded or tax-included:
114178

115-
- **Percentage of Price Tax Included**
179+
.. tabs::
180+
.. tab:: Tax-excluded
181+
If :guilabel:`Included in Price` is disabled, the computation is :math:`\text{tax amount}
182+
= \text{sales price} \times \frac{\text{tax rate}}{1 - \text{tax rate}}`.
116183

117-
The **total** is the taxable basis: the tax amount is a percentage of the total.
184+
.. example::
185+
A product has a sales price of $1000, and we apply a 10% :guilabel:`Percentage of Price
186+
Tax Included` tax that is not :guilabel:`Included in Price`. We then have:
187+
188+
+-------------+-------------+----------+----------+
189+
| Product | Price | Tax | Total |
190+
| sales price | without tax | | |
191+
+=============+=============+==========+==========+
192+
| 1,000 | 1,000 | 111.11 | 1,111.11 |
193+
+-------------+-------------+----------+----------+
194+
195+
Note that the real tax rate in terms of the tax-excluded price is
196+
:math:`\frac{111.11}{1000} = 11.111\%`.
197+
198+
.. tab:: Tax-included
199+
200+
If :guilabel:`Included in Price` is enabled, the computation is :math:`\text{tax amount} =
201+
\text{sales price} \times \text{tax rate}`.
202+
203+
.. example::
204+
A product has a sales price of $1000, and we apply a 10%
205+
:guilabel:`Percentage of Price Tax Included` tax that is :guilabel:`Included in Price`.
206+
We then have:
207+
208+
+-------------+-------------+----------+----------+
209+
| Product | Price | Tax | Total |
210+
| sales price | without tax | | |
211+
+=============+=============+==========+==========+
212+
| 1,000 | 900 | 100 | 1,000.00 |
213+
+-------------+-------------+----------+----------+
214+
215+
Note that the real tax rate in terms of the tax-excluded price is
216+
:math:`\frac{100}{900} = 11.111\%`.
217+
218+
.. _taxes/computation/python-code:
219+
220+
Python code
221+
***********
222+
223+
.. important::
224+
If a tax can be expressed as a multiple of the quantity of the product to which it applies, it
225+
can be defined as a :ref:`Fixed <taxes/computation/fixed>` tax. Doing so is strongly recommended
226+
over defining a :guilabel:`Python Code` tax.
227+
228+
A tax defined as :guilabel:`Python Code` consists of two snippets of Python code that are executed
229+
in a local environment that can access the unit price, quantity, product, and partner.
230+
:guilabel:`Python Code` defines the amount of the tax, and :guilabel:`Applicable Code` defines
231+
whether the tax is applied. Enter a formula for each field at the bottom of the
232+
:guilabel:`Definition` tab.
118233

119234
.. example::
120-
A product has a Sales Price of $1000, and we apply a *10% of Price Tax Included* tax. We then
121-
have:
235+
A product has a sales price of $1000, and we apply a :guilabel:`Python Code` tax with the
236+
following configuration:
237+
238+
- :guilabel:`Python Code`: `result = price_unit * 0.10` and
239+
- :guilabel:`Applicable Code`: `result = True`.
240+
241+
We then have:
122242

123243
+-------------+-------------+----------+----------+
124244
| Product | Price | Tax | Total |
125245
| sales price | without tax | | |
126246
+=============+=============+==========+==========+
127-
| 1,000 | 1,000 | 111.11 | 1,111.11 |
247+
| 1,000 | 1,000 | 100 | 1,100.00 |
128248
+-------------+-------------+----------+----------+
129249

130-
- **Python code**
131-
132-
A tax defined as **Python code** consists of two snippets of Python code that are executed in a
133-
local environment containing data such as the unit price, product or partner.
134-
:guilabel:`Python Code` defines the amount of the tax, and :guilabel:`Applicable Code` defines if
135-
the tax is to be applied. The formula is found at the bottom of the :guilabel:`Definition` tab.
136-
137-
.. example::
138-
:guilabel:`Python Code`: `result = price_unit * 0.10`
139-
:guilabel:`Applicable Code`: `result = true`
140-
141250
.. _taxes/active:
142251

143252
Active
@@ -296,29 +405,27 @@ invoice line.
296405
Included in price
297406
~~~~~~~~~~~~~~~~~
298407

299-
With this option activated, the total (including the tax) equals the **sales price**.
408+
With this option activated, the tax will treat the sales price on which it is applied as a total
409+
including the tax amount. The tax computation will split the sales price into a base amount and a
410+
tax amount. This makes it suitable for B2C sales in most countries where prices are quoted
411+
tax-inclusive.
300412

301413
`Total = Sales Price = Computed Tax-Excluded price + Tax`
302414

303415
.. example::
304-
A product has a sales price of $1000, and we apply a *10% of Price* tax, which is *included in
305-
the price*. We then have:
416+
A product has a sales price of $1000, and we apply a 10% :guilabel:`Percentage of Price` tax
417+
with :guilabel:`Included in Price`. We then have:
306418

307419
+-------------+-------------+----------+----------+
308420
| Product | Price | Tax | Total |
309421
| sales price | without tax | | |
310422
+=============+=============+==========+==========+
311-
| 1,000 | 900.10 | 90.9 | 1,000.00 |
423+
| 1,000 | 909.09 | 90.91 | 1,000.00 |
312424
+-------------+-------------+----------+----------+
313425

314426
.. note::
315-
If you need to define prices accurately, both tax-included and tax-excluded, please refer to the
316-
following documentation: :doc:`taxes/B2B_B2C`.
317-
318-
.. note::
319-
By default, only the :guilabel:`Tax excluded` column is displayed on invoices. To display the
320-
:guilabel:`Tax included` column, click the **dropdown toggle** button and check
321-
:guilabel:`Tax incl.`.
427+
For a guide on configuring tax-excluded and tax-included prices for B2B and B2C customers,
428+
see :doc:`taxes/B2B_B2C`.
322429

323430
.. image:: taxes/toggle-button.png
324431

@@ -327,11 +434,36 @@ With this option activated, the total (including the tax) equals the **sales pri
327434
Affect base of subsequent taxes
328435
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
329436

330-
With this option, the total tax-included becomes the taxable basis for the other taxes applied to
331-
the same product.
332-
333-
You can configure a new :ref:`group of taxes <taxes/computation>` to include this tax or add it
334-
directly to a product line.
437+
If this setting is enabled, any subsequent tax applied on the same product line that has
438+
:ref:`taxes/base-affected` will be based on a modified sales price. The exact behavior depends on
439+
whether the tax with :guilabel:`Affect base of subsequent taxes` is :ref:`taxes/included-in-price`
440+
or not.
441+
442+
.. tabs::
443+
.. tab:: Tax-excluded
444+
If :guilabel:`Included in Price` is disabled, subsequent taxes with :guilabel:`Base affected
445+
by preceding taxes` will be based on a modified sales price equal to the original sales price
446+
plus the tax amount.
447+
448+
.. example::
449+
A product has a sales price of $1000, and we apply a 10% :guilabel:`Percentage of Price`
450+
tax with :guilabel:`Affect base of subsequent taxes`. Any subsequent tax with
451+
:guilabel:`Base affected by preceding taxes` will be based on a modified sales price of
452+
$1100.
453+
454+
.. tab:: Tax-included
455+
If :guilabel:`Included in Price` is enabled, subsequent taxes with :guilabel:`Base affected
456+
by preceding taxes` will be based on a modified sales price equal to the original sales price
457+
minus the tax amount.
458+
459+
.. example::
460+
A product has a sales price of $1100, and we apply a 10% :guilabel:`Percentage of Price`
461+
tax with :guilabel:`Included in Price` and :guilabel:`Affect base of subsequent taxes`.
462+
Any subsequent tax with :guilabel:`Base affected by preceding taxes` will be based on a
463+
modified sales price of $1000.
464+
465+
This setting is considered any time multiple taxes are applied to the same product line, whether
466+
via a :ref:`group of taxes <taxes/computation>` or multiple taxes added directly to a product line.
335467

336468
.. image:: taxes/subsequent-line.png
337469
:alt: The eco-tax is taken into the basis of the 21% VAT tax
@@ -347,6 +479,19 @@ directly to a product line.
347479
.. image:: taxes/list-sequence.png
348480
:alt: The taxes' sequence in Odoo determines which tax is applied first
349481

482+
.. _taxes/base-affected:
483+
484+
Base affected by preceding taxes
485+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
486+
487+
This setting, which is only visible in :doc:`developer mode <../../general/developer_mode>`,
488+
determines whether any previous tax that :ref:`affects the base of subsequent taxes
489+
<taxes/base-subsequent>` will modify the sales price that this tax is based on.
490+
491+
.. note::
492+
Taxes with :ref:`Included in Price <taxes/included-in-price>` always behave as if this setting is
493+
enabled.
494+
350495
Extra taxes
351496
===========
352497

@@ -360,7 +505,7 @@ imposed by governments. These extra taxes can be **luxury** taxes, **environment
360505

361506
To compute an extra tax in Odoo, :ref:`create a tax <taxes/configuration>`, enter a tax name, select
362507
a :ref:`Tax Computation <taxes/configuration>`, set an :guilabel:`Amount`, and in the
363-
:guilabel:`Advanced Options` tab, check :guilabel:`Affect Base of Subsequent Taxes`. Then, drag and
508+
:guilabel:`Advanced Options` tab, enable :guilabel:`Affect Base of Subsequent Taxes`. Then, drag and
364509
drop the taxes in the :ref:`order they should be computed <taxes/base-subsequent>`.
365510

366511
.. example::

0 commit comments

Comments
 (0)