@@ -72,23 +72,42 @@ 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: `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
143252Active
@@ -256,29 +365,27 @@ invoice line.
256365Included in price
257366~~~~~~~~~~~~~~~~~
258367
259- With this option activated, the total (including the tax) equals the **sales price **.
368+ With this option activated, the tax will treat the sales price on which it is applied as a total
369+ including the tax amount. The tax computation will split the sales price into a base amount and a
370+ tax amount. This makes it suitable for B2C sales in most countries where prices are quoted
371+ tax-inclusive.
260372
261373`Total = Sales Price = Computed Tax-Excluded price + Tax `
262374
263375.. 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:
376+ A product has a sales price of $1000, and we apply a 10% :guilabel: ` Percentage of Price` tax
377+ with :guilabel: ` Included in Price ` . We then have:
266378
267379 +-------------+-------------+----------+----------+
268380 | Product | Price | Tax | Total |
269381 | sales price | without tax | | |
270382 +=============+=============+==========+==========+
271- | 1,000 | 900.10 | 90.9 | 1,000.00 |
383+ | 1,000 | 909.09 | 90.91 | 1,000.00 |
272384 +-------------+-------------+----------+----------+
273385
274386.. 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 `.
277-
278- .. note ::
279- 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
281- :guilabel: `Tax incl. `.
387+ For a guide on configuring tax-excluded and tax-included prices for B2B and B2C customers,
388+ see :doc: `taxes/B2B_B2C `.
282389
283390 .. image :: taxes/toggle-button.png
284391
@@ -287,11 +394,36 @@ With this option activated, the total (including the tax) equals the **sales pri
287394Affect base of subsequent taxes
288395~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
289396
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.
397+ If this setting is enabled, any subsequent tax applied on the same product line that has
398+ :ref: `taxes/base-affected ` will be based on a modified sales price. The exact behavior depends on
399+ whether the tax with :guilabel: `Affect base of subsequent taxes ` is :ref: `taxes/included-in-price `
400+ or not.
401+
402+ .. tabs ::
403+ .. tab :: Tax-excluded
404+ If :guilabel: `Included in Price ` is disabled, subsequent taxes with :guilabel: `Base affected
405+ by preceding taxes ` will be based on a modified sales price equal to the original sales price
406+ plus the tax amount.
407+
408+ .. example ::
409+ A product has a sales price of $1000, and we apply a 10% :guilabel: `Percentage of Price `
410+ tax with :guilabel: `Affect base of subsequent taxes `. Any subsequent tax with
411+ :guilabel: `Base affected by preceding taxes ` will be based on a modified sales price of
412+ $1100.
413+
414+ .. tab :: Tax-included
415+ If :guilabel: `Included in Price ` is enabled, subsequent taxes with :guilabel: `Base affected
416+ by preceding taxes ` will be based on a modified sales price equal to the original sales price
417+ minus the tax amount.
418+
419+ .. example ::
420+ A product has a sales price of $1100, and we apply a 10% :guilabel: `Percentage of Price `
421+ tax with :guilabel: `Included in Price ` and :guilabel: `Affect base of subsequent taxes `.
422+ Any subsequent tax with :guilabel: `Base affected by preceding taxes ` will be based on a
423+ modified sales price of $1000.
424+
425+ This setting is considered any time multiple taxes are applied to the same product line, whether
426+ via a :ref: `group of taxes <taxes/computation >` or multiple taxes added directly to a product line.
295427
296428.. image :: taxes/subsequent-line.png
297429 :alt: The eco-tax is taken into the basis of the 21% VAT tax
@@ -307,6 +439,19 @@ directly to a product line.
307439 .. image :: taxes/list-sequence.png
308440 :alt: The taxes' sequence in Odoo determines which tax is applied first
309441
442+ .. _taxes/base-affected :
443+
444+ Base affected by preceding taxes
445+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
446+
447+ This setting, which is only visible in :doc: `developer mode <../../general/developer_mode >`,
448+ determines whether any previous tax that :ref: `affects the base of subsequent taxes
449+ <taxes/base-subsequent>` will modify the sales price that this tax is based on.
450+
451+ .. note ::
452+ Taxes with :ref: `Included in Price <taxes/included-in-price >` always behave as if this setting is
453+ enabled.
454+
310455Extra taxes
311456===========
312457
@@ -320,7 +465,7 @@ imposed by governments. These extra taxes can be **luxury** taxes, **environment
320465
321466To compute an extra tax in Odoo, :ref: `create a tax <taxes/configuration >`, enter a tax name, select
322467a :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
468+ :guilabel: `Advanced Options ` tab, enable :guilabel: `Affect Base of Subsequent Taxes `. Then, drag and
324469drop the taxes in the :ref: `order they should be computed <taxes/base-subsequent >`.
325470
326471.. example ::
0 commit comments