@@ -72,23 +72,40 @@ The **tax name** is displayed for backend users in the :guilabel:`Taxes` field i
7272Tax 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: `taxes/computation/group-of-taxes `: a combination of several other taxes
79+ - :ref: `taxes/computation/fixed `: a fixed amount
80+ - :ref: `taxes/computation/percentage-of-price `: a percentage of the tax-excluded sales price
81+ - :ref: `taxes/computation/percentage-of-price-tax-included `: a percentage of the tax-included total
82+ - :ref: `taxes/computation/python-code `: a custom user-defined formula.
83+
84+ .. _taxes/computation/group-of-taxes :
85+
86+ Group of Taxes
87+ **************
7688
7789 The tax is a combination of multiple sub-taxes. You can add as many taxes as you want, in the
7890 order you want them to be applied.
7991
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>`.
92+ .. important ::
93+ Make sure that the tax sequence is correct, as the order in which they are may impact the
94+ taxes' amounts computation, especially if any of the taxes :ref: `affects the base of the
95+ subsequent ones <taxes/base-subsequent>`.
8496
85- - ** Fixed **
97+ .. _ taxes/computation/fixed :
8698
87- The tax has a fixed amount in the default currency. The amount remains the same, regardless of the
88- sales price.
99+ Fixed
100+ *****
101+
102+ The tax has a fixed amount in the default currency. The amount remains the same per unit,
103+ regardless of the sales price.
104+
105+ The computation is :math: `\text {tax amount} = \text {fixed tax amount} \times \text {quantity}`.
89106
90107.. example ::
91- A product has a sales price of $1000, and we apply a $10 * fixed * tax. We then have:
108+ A product has a sales price of $1000, and we apply a $10 :guilabel: ` Fixed ` tax. We then have:
92109
93110 +-------------+-------------+----------+----------+
94111 | Product | Price | Tax | Total |
@@ -97,46 +114,136 @@ Tax computation
97114 | 1,000 | 1,000 | 10 | 1,010.00 |
98115 +-------------+-------------+----------+----------+
99116
100- - ** Percentage of price**
117+ .. _ taxes/computation/percentage-of- price:
101118
102- The * sales price * is the taxable basis: the tax amount is computed by multiplying the sales price
103- by the tax percentage.
119+ Percentage of Price
120+ *******************
104121
105- .. example ::
106- A product has a sales price of $1000, and we apply a *10% of Price * tax. We then have:
122+ The tax rate is a percentage of the **tax-excluded ** subtotal.
107123
108- +-------------+-------------+----------+----------+
109- | Product | Price | Tax | Total |
110- | sales price | without tax | | |
111- +=============+=============+==========+==========+
112- | 1,000 | 1,000 | 100 | 1,100.00 |
113- +-------------+-------------+----------+----------+
124+ The exact tax computation depends on the :ref: `taxes/included-in-price ` field, which determines
125+ whether the sales price should be treated as tax-excluded or tax-included:
126+
127+ .. tabs ::
128+ .. tab :: Tax-excluded
129+
130+ If :guilabel: `Included in Price ` is disabled, the computation is :math: `\text {tax amount}
131+ = \text {sales price} \times \text {tax rate}`.
132+
133+ .. example ::
134+ A product has a sales price of $1000, and we apply a 10% :guilabel: `Percentage of Price `
135+ tax that is not :guilabel: `Included in Price `. We then have:
136+
137+ +-------------+-------------+----------+----------+
138+ | Product | Price | Tax | Total |
139+ | sales price | without tax | | |
140+ +=============+=============+==========+==========+
141+ | 1,000 | 1,000 | 100 | 1,100.00 |
142+ +-------------+-------------+----------+----------+
143+
144+ .. tab :: Tax-included
145+
146+ If :guilabel: `Included in Price ` is enabled, the computation is :math: `\text {tax amount} =
147+ \text {sales price} \times \frac {\text {tax rate}}{1 + \text {tax rate}}`.
148+
149+ .. example ::
150+ A product has a sales price of $1000, and we apply a 10% :guilabel: `Percentage of Price `
151+ tax that is :guilabel: `Included in Price `. We then have:
152+
153+ +-------------+-------------+----------+----------+
154+ | Product | Price | Tax | Total |
155+ | sales price | without tax | | |
156+ +=============+=============+==========+==========+
157+ | 1,000 | 909.09 | 90.91 | 1,000.00 |
158+ +-------------+-------------+----------+----------+
159+
160+ .. _taxes/computation/percentage-of-price-tax-included :
161+
162+ Percentage of Price Tax Included
163+ ********************************
164+
165+ The tax rate is a percentage of the **tax-included ** total.
166+
167+ The exact tax computation depends on the :ref: `taxes/included-in-price ` field, which determines
168+ whether the sales price should be treated as tax-excluded or tax-included:
114169
115- - **Percentage of Price Tax Included **
170+ .. tabs ::
171+ .. tab :: Tax-excluded
172+ If :guilabel: `Included in Price ` is disabled, the computation is :math: `\text {tax amount}
173+ = \text {sales price} \times \frac {\text {tax rate}}{1 - \text {tax rate}}`.
116174
117- The **total ** is the taxable basis: the tax amount is a percentage of the total.
175+ .. example ::
176+ A product has a sales price of $1000, and we apply a 10% :guilabel: `Percentage of Price
177+ Tax Included ` tax that is not :guilabel: `Included in Price `. We then have:
178+
179+ +-------------+-------------+----------+----------+
180+ | Product | Price | Tax | Total |
181+ | sales price | without tax | | |
182+ +=============+=============+==========+==========+
183+ | 1,000 | 1,000 | 111.11 | 1,111.11 |
184+ +-------------+-------------+----------+----------+
185+
186+ Note that the real tax rate in terms of the tax-excluded price is
187+ :math: `\frac {111.11 }{1000 } = 11.111 \%`.
188+
189+ .. tab :: Tax-included
190+
191+ If :guilabel: `Included in Price ` is enabled, the computation is :math: `\text {tax amount} =
192+ \text {sales price} \times \text {tax rate}`.
193+
194+ .. example ::
195+ A product has a sales price of $1000, and we apply a 10%
196+ :guilabel: `Percentage of Price Tax Included ` tax that is :guilabel: `Included in Price `.
197+ We then have:
198+
199+ +-------------+-------------+----------+----------+
200+ | Product | Price | Tax | Total |
201+ | sales price | without tax | | |
202+ +=============+=============+==========+==========+
203+ | 1,000 | 900 | 100 | 1,000.00 |
204+ +-------------+-------------+----------+----------+
205+
206+ Note that the real tax rate in terms of the tax-excluded price is
207+ :math: `\frac {100 }{900 } = 11.111 \%`.
208+
209+ .. warning ::
210+ This tax computation is rarely used and only useful in countries (e.g. Brazil, Bolivia) that
211+ quote tax rates as a percentage of the tax-included total.
212+ For the more common need to compute tax amounts from a tax-included price, use the
213+ :ref: `taxes/computation/percentage-of-price ` tax computation with the
214+ :ref: `taxes/included-in-price ` option.
215+
216+ .. _taxes/computation/python-code :
217+
218+ Python Code
219+ ***********
220+
221+ A tax defined as :guilabel: `Python Code ` consists of two snippets of Python code that are executed
222+ in a local environment that can access the unit price, quantity, product, and partner.
223+ :guilabel: `Python Code ` defines the amount of the tax, and :guilabel: `Applicable Code ` defines
224+ whether the tax is applied. Enter a formula for each field at the bottom of the
225+ :guilabel: `Definition ` tab.
118226
119227.. example ::
120- A product has a Sales Price of $1000, and we apply a *10% of Price Tax Included * tax. We then
121- have:
228+ A product has a sales price of $1000, and we apply a :guilabel: `Python Code ` tax with the
229+ following configuration:
230+
231+ - :guilabel: `Python Code `: `result = price_unit * 0.10 ` and
232+ - :guilabel: `Applicable Code `: `result = True `.
233+
234+ We then have:
122235
123236 +-------------+-------------+----------+----------+
124237 | Product | Price | Tax | Total |
125238 | sales price | without tax | | |
126239 +=============+=============+==========+==========+
127- | 1,000 | 1,000 | 111.11 | 1,111.11 |
240+ | 1,000 | 1,000 | 100 | 1,100.00 |
128241 +-------------+-------------+----------+----------+
129242
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 `
243+ .. warning ::
244+ In general, if a tax can be expressed as a multiple of the sales price or of the product
245+ quantity, it is preferable to define it as a :ref: `taxes/computation/percentage-of-price ` or
246+ :ref: `taxes/computation/fixed ` tax.
140247
141248.. _taxes/active :
142249
@@ -256,28 +363,31 @@ invoice line.
256363Included in price
257364~~~~~~~~~~~~~~~~~
258365
259- With this option activated, the total (including the tax) equals the **sales price **.
366+ With this option activated, the tax will treat the sales price on which it is applied as a total
367+ including the tax amount. The tax computation will split the sales price into a base amount and a
368+ tax amount. This makes it suitable for B2C sales in most countries where prices are quoted
369+ tax-inclusive.
260370
261371`Total = Sales Price = Computed Tax-Excluded price + Tax `
262372
263373.. example ::
264- A product has a sales price of $1000, and we apply a * 10% of Price * tax, which is * included in
265- the price * . We then have:
374+ A product has a sales price of $1000, and we apply a 10% :guilabel: ` Percentage of Price` tax
375+ with :guilabel: ` Included in Price ` . We then have:
266376
267377 +-------------+-------------+----------+----------+
268378 | Product | Price | Tax | Total |
269379 | sales price | without tax | | |
270380 +=============+=============+==========+==========+
271- | 1,000 | 900.10 | 90.9 | 1,000.00 |
381+ | 1,000 | 909.09 | 90.91 | 1,000.00 |
272382 +-------------+-------------+----------+----------+
273383
274384.. note ::
275- If you need to define prices accurately, both tax-included and tax-excluded, please refer to the
276- following documentation: :doc: `taxes/B2B_B2C `.
385+ For a guide on configuring tax-excluded and tax-included prices for B2B and B2C customers,
386+ see :doc: `taxes/B2B_B2C `.
277387
278388.. note ::
279389 By default, only the :guilabel: `Tax excluded ` column is displayed on invoices. To display the
280- :guilabel: `Tax included ` column, click the **dropdown toggle ** button and check
390+ :guilabel: `Tax included ` column, click the **dropdown toggle ** button and enable
281391 :guilabel: `Tax incl. `.
282392
283393 .. image :: taxes/toggle-button.png
@@ -287,11 +397,36 @@ With this option activated, the total (including the tax) equals the **sales pri
287397Affect base of subsequent taxes
288398~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
289399
290- With this option, the total tax-included becomes the taxable basis for the other taxes applied to
291- the same product.
292-
293- You can configure a new :ref: `group of taxes <taxes/computation >` to include this tax or add it
294- directly to a product line.
400+ If this setting is enabled, any subsequent tax applied on the same product line that has
401+ :ref: `taxes/base-affected ` will be based on a modified sales price. The exact behavior depends on
402+ whether the tax with :guilabel: `Affect base of subsequent taxes ` is :ref: `taxes/included-in-price `
403+ or not.
404+
405+ .. tabs ::
406+ .. tab :: Tax-excluded
407+ If :guilabel: `Included in Price ` is disabled, subsequent taxes with :guilabel: `Base affected
408+ by preceding taxes ` will be based on a modified sales price equal to the original sales price
409+ plus the tax amount.
410+
411+ .. example ::
412+ A product has a sales price of $1000, and we apply a 10% :guilabel: `Percentage of Price `
413+ tax with :guilabel: `Affect base of subsequent taxes `. Any subsequent tax with
414+ :guilabel: `Base affected by preceding taxes ` will be based on a modified sales price of
415+ $1100.
416+
417+ .. tab :: Tax-included
418+ If :guilabel: `Included in Price ` is enabled, subsequent taxes with :guilabel: `Base affected
419+ by preceding taxes ` will be based on a modified sales price equal to the original sales price
420+ minus the tax amount.
421+
422+ .. example ::
423+ A product has a sales price of $1100, and we apply a 10% :guilabel: `Percentage of Price `
424+ tax with :guilabel: `Included in Price ` and :guilabel: `Affect base of subsequent taxes `.
425+ Any subsequent tax with :guilabel: `Base affected by preceding taxes ` will be based on a
426+ modified sales price of $1000.
427+
428+ This setting is considered any time multiple taxes are applied to the same product line, whether
429+ via a :ref: `group of taxes <taxes/computation >` or multiple taxes added directly to a product line.
295430
296431.. image :: taxes/subsequent-line.png
297432 :alt: The eco-tax is taken into the basis of the 21% VAT tax
@@ -307,6 +442,18 @@ directly to a product line.
307442 .. image :: taxes/list-sequence.png
308443 :alt: The taxes' sequence in Odoo determines which tax is applied first
309444
445+ .. _taxes/base-affected :
446+
447+ Base affected by preceding taxes
448+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
449+
450+ This setting (which is only visible in :doc: `developer mode <../../general/developer_mode >`)
451+ determines whether any previous tax with :ref: `taxes/base-subsequent ` will modify the sales price
452+ that this tax is based on.
453+
454+ .. note ::
455+ Taxes with :ref: `taxes/included-in-price ` always behave as if this setting is enabled.
456+
310457Extra taxes
311458===========
312459
@@ -320,7 +467,7 @@ imposed by governments. These extra taxes can be **luxury** taxes, **environment
320467
321468To compute an extra tax in Odoo, :ref: `create a tax <taxes/configuration >`, enter a tax name, select
322469a :ref: `Tax Computation <taxes/configuration >`, set an :guilabel: `Amount `, and in the
323- :guilabel: `Advanced Options ` tab, check :guilabel: `Affect Base of Subsequent Taxes `. Then, drag and
470+ :guilabel: `Advanced Options ` tab, enable :guilabel: `Affect Base of Subsequent Taxes `. Then, drag and
324471drop the taxes in the :ref: `order they should be computed <taxes/base-subsequent >`.
325472
326473.. example ::
0 commit comments