-
Notifications
You must be signed in to change notification settings - Fork 10.6k
[IMP] Taxes: improve tax configuration doc #15059
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 18.0
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -72,23 +72,42 @@ The **tax name** is displayed for backend users in the :guilabel:`Taxes` field i | |||||
| Tax computation | ||||||
| ~~~~~~~~~~~~~~~ | ||||||
|
|
||||||
| - **Group of Taxes** | ||||||
| The :guilabel:`Tax Computation` field determines how the tax amount is computed from the sales | ||||||
| price. The following options are available: | ||||||
|
|
||||||
| - :ref:`Group of Taxes <taxes/computation/group-of-taxes>`: a combination of several other taxes | ||||||
| - :ref:`Fixed <taxes/computation/fixed>`: a fixed amount | ||||||
| - :ref:`Percentage of Price <taxes/computation/percentage-of-price>`: a percentage of the | ||||||
| tax-excluded sales price | ||||||
| - :ref:`Percentage of Price Tax Included <taxes/computation/percentage-of-price-tax-included>`: a | ||||||
| percentage of the tax-included total | ||||||
| - :ref:`Custom Formula <taxes/computation/python-code>`: a custom, user-defined formula | ||||||
|
|
||||||
| .. _taxes/computation/group-of-taxes: | ||||||
|
|
||||||
| Group of taxes | ||||||
| ************** | ||||||
|
|
||||||
| The tax is a combination of multiple sub-taxes. You can add as many taxes as you want, in the | ||||||
| order you want them to be applied. | ||||||
|
|
||||||
| .. important:: | ||||||
| Make sure that the tax sequence is correct, as the order in which they are may impact the | ||||||
| taxes' amounts computation, especially if one of the taxes :ref:`affects the base of the | ||||||
| subsequent ones <taxes/base-subsequent>`. | ||||||
| .. important:: | ||||||
| Make sure the tax sequence is correct, as the display order determines the application order and | ||||||
| may affect tax computation, particularly if a tax :ref:`affects the base of subsequent taxes | ||||||
| <taxes/base-subsequent>`. | ||||||
|
|
||||||
| .. _taxes/computation/fixed: | ||||||
|
|
||||||
| - **Fixed** | ||||||
| Fixed | ||||||
| ***** | ||||||
|
|
||||||
| The tax has a fixed amount in the default currency. The amount remains the same, regardless of the | ||||||
| sales price. | ||||||
| The tax has a fixed amount in the default currency. The amount remains the same per unit, | ||||||
| regardless of the sales price. | ||||||
|
|
||||||
| The computation is :math:`\text{tax amount} = \text{fixed tax amount} \times \text{quantity}`. | ||||||
|
|
||||||
| .. example:: | ||||||
| A product has a sales price of $1000, and we apply a $10 *fixed* tax. We then have: | ||||||
| A product has a sales price of $1000, and we apply a $10 :guilabel:`Fixed` tax. We then have: | ||||||
|
|
||||||
| +-------------+-------------+----------+----------+ | ||||||
| | Product | Price | Tax | Total | | ||||||
|
|
@@ -97,47 +116,150 @@ Tax computation | |||||
| | 1,000 | 1,000 | 10 | 1,010.00 | | ||||||
| +-------------+-------------+----------+----------+ | ||||||
|
|
||||||
| - **Percentage of price** | ||||||
| .. _taxes/computation/percentage-of-price: | ||||||
|
|
||||||
| The *sales price* is the taxable basis: the tax amount is computed by multiplying the sales price | ||||||
| by the tax percentage. | ||||||
| Percentage of price | ||||||
| ******************* | ||||||
|
|
||||||
| .. example:: | ||||||
| A product has a sales price of $1000, and we apply a *10% of Price* tax. We then have: | ||||||
| The tax rate is a percentage of the **tax-excluded** subtotal. | ||||||
|
|
||||||
| +-------------+-------------+----------+----------+ | ||||||
| | Product | Price | Tax | Total | | ||||||
| | sales price | without tax | | | | ||||||
| +=============+=============+==========+==========+ | ||||||
| | 1,000 | 1,000 | 100 | 1,100.00 | | ||||||
| +-------------+-------------+----------+----------+ | ||||||
| The exact tax computation depends on the :ref:`Included in Price <taxes/included-in-price>` field, | ||||||
| which determines whether the sales price should be treated as tax-excluded or tax-included: | ||||||
|
|
||||||
| .. tabs:: | ||||||
| .. tab:: Tax-excluded | ||||||
|
|
||||||
| If :guilabel:`Included in Price` is :guilabel:`Tax Excluded`, the computation is | ||||||
| :math:`\text{tax amount} = \text{sales price} \times \text{tax rate}`. | ||||||
|
|
||||||
| .. example:: | ||||||
| A product has a sales price of $1000, and we apply a 10% :guilabel:`Percentage of Price` | ||||||
| tax that is :guilabel:`Tax Excluded`. We then have: | ||||||
|
|
||||||
| +-------------+-------------+----------+----------+ | ||||||
| | Product | Price | Tax | Total | | ||||||
| | sales price | without tax | | | | ||||||
| +=============+=============+==========+==========+ | ||||||
| | 1,000 | 1,000 | 100 | 1,100.00 | | ||||||
| +-------------+-------------+----------+----------+ | ||||||
|
|
||||||
| .. tab:: Tax-included | ||||||
|
|
||||||
| If :guilabel:`Included in Price` is :guilabel:`Tax Included`, the computation is | ||||||
| :math:`\text{tax amount} = \text{sales price} \times \frac{\text{tax rate}}{1 + | ||||||
| \text{tax rate}}`. | ||||||
|
|
||||||
| .. example:: | ||||||
| A product has a sales price of $1000, and we apply a 10% :guilabel:`Percentage of Price` | ||||||
| tax that is :guilabel:`Tax Included`. We then have: | ||||||
|
|
||||||
| +-------------+-------------+----------+----------+ | ||||||
| | Product | Price | Tax | Total | | ||||||
| | sales price | without tax | | | | ||||||
| +=============+=============+==========+==========+ | ||||||
| | 1,000 | 909.09 | 90.91 | 1,000.00 | | ||||||
| +-------------+-------------+----------+----------+ | ||||||
|
|
||||||
| .. _taxes/computation/percentage-of-price-tax-included: | ||||||
|
|
||||||
| Percentage of price tax included | ||||||
| ******************************** | ||||||
|
|
||||||
| .. important:: | ||||||
| This tax computation is rarely used and only useful in countries (e.g., Brazil, Bolivia) that | ||||||
| quote tax rates as a percentage of the tax-included total. | ||||||
| For the more common need to compute tax amounts from a tax-included price, use the | ||||||
| :ref:`Percentage of Price <taxes/computation/percentage-of-price>` tax computation with | ||||||
| :ref:`Included in Price <taxes/included-in-price>` set to :guilabel:`Tax Included`. | ||||||
|
|
||||||
| The tax rate is a percentage of the **tax-included** total. | ||||||
|
|
||||||
| The exact tax computation depends on the :ref:`Included in Price <taxes/included-in-price>` field, | ||||||
| which determines whether the sales price should be treated as tax-excluded or tax-included: | ||||||
|
|
||||||
| .. tabs:: | ||||||
| .. tab:: Tax-excluded | ||||||
| If :guilabel:`Included in Price` is set to :guilabel:`Tax Excluded`, the computation is | ||||||
| :math:`\text{tax amount} = \text{sales price} \times \frac{\text{tax rate}}{1 - | ||||||
| \text{tax rate}}`. | ||||||
|
|
||||||
| .. example:: | ||||||
| A product has a sales price of $1000, and we apply a 10% :guilabel:`Percentage of Price | ||||||
| Tax Included` tax that is :guilabel:`Tax Excluded`. We then have: | ||||||
|
|
||||||
| +-------------+-------------+----------+----------+ | ||||||
| | Product | Price | Tax | Total | | ||||||
| | sales price | without tax | | | | ||||||
| +=============+=============+==========+==========+ | ||||||
| | 1,000 | 1,000 | 111.11 | 1,111.11 | | ||||||
| +-------------+-------------+----------+----------+ | ||||||
|
|
||||||
| Note that the real tax rate in terms of the tax-excluded price is | ||||||
| :math:`\frac{111.11}{1000} = 11.111\%`. | ||||||
|
|
||||||
| .. tab:: Tax-included | ||||||
|
|
||||||
| If :guilabel:`Included in Price` is set to :guilabel:`Tax Included`, the computation is | ||||||
| :math:`\text{tax amount} = \text{sales price} \times \text{tax rate}`. | ||||||
|
|
||||||
| .. example:: | ||||||
| A product has a sales price of $1000, and we apply a 10% | ||||||
| :guilabel:`Percentage of Price Tax Included` tax that is :guilabel:`Tax Included`. | ||||||
| We then have: | ||||||
|
|
||||||
| +-------------+-------------+----------+----------+ | ||||||
| | Product | Price | Tax | Total | | ||||||
| | sales price | without tax | | | | ||||||
| +=============+=============+==========+==========+ | ||||||
| | 1,000 | 900 | 100 | 1,000.00 | | ||||||
| +-------------+-------------+----------+----------+ | ||||||
|
|
||||||
| - **Percentage of Price Tax Included** | ||||||
| Note that the real tax rate in terms of the tax-excluded price is | ||||||
| :math:`\frac{100}{900} = 11.111\%`. | ||||||
|
|
||||||
| The **total** is the taxable basis: the tax amount is a percentage of the total. | ||||||
| .. _taxes/computation/python-code: | ||||||
|
|
||||||
| Custom formula | ||||||
| ************** | ||||||
|
|
||||||
| .. important:: | ||||||
| If a tax can be expressed as a multiple of the quantity of the product to which it applies, it | ||||||
| can be defined as a :ref:`Fixed <taxes/computation/fixed>` tax. Doing so is strongly recommended | ||||||
| over defining a :guilabel:`Custom Formula` tax. | ||||||
|
|
||||||
| .. note:: | ||||||
| To use :guilabel:`Custom Formula` taxes, :ref:`install <general/install>` the :guilabel:`Define | ||||||
| Taxes as Python Code` (`account_python_tax`) module. | ||||||
|
|
||||||
| For a :guilabel:`Custom Formula` tax, the tax amount is computed according to a Python expression | ||||||
| defined in the :guilabel:`Formula` field. The Python expression may contain the following tokens: | ||||||
|
|
||||||
| - any of the following variables: | ||||||
|
|
||||||
| - `price_unit`: the unit price of the product | ||||||
| - `base`: the taxable basis on which the tax is applied - may differ from the `price_unit` if | ||||||
| other taxes are applied first | ||||||
| - `quantity`: the quantity of the product | ||||||
| - `product`: the product record - product fields can also be accessed | ||||||
|
|
||||||
| - integers and floating-point numbers | ||||||
|
|
||||||
| - the following permitted tokens: `(`, `)`, `+`, `-`, `*`, `/`, `,`, `<`, `>`, `<=`, `>=`, `and`, | ||||||
| `or`, `None`, `min`, and `max` | ||||||
|
|
||||||
| .. example:: | ||||||
| A product has a Sales Price of $1000, and we apply a *10% of Price Tax Included* tax. We then | ||||||
| have: | ||||||
| A product has a sales price of $1000, and we apply a :guilabel:`Custom Formula` tax with a | ||||||
| :guilabel:`Formula` of `min(base, 500) * 0.10 + max(base - 500, 0) * 0.20` | ||||||
|
|
||||||
| We then have: | ||||||
|
|
||||||
| +-------------+-------------+----------+----------+ | ||||||
| | Product | Price | Tax | Total | | ||||||
| | sales price | without tax | | | | ||||||
| +=============+=============+==========+==========+ | ||||||
| | 1,000 | 1,000 | 111.11 | 1,111.11 | | ||||||
| | 1,000 | 1,000 | 150 | 1,150.00 | | ||||||
| +-------------+-------------+----------+----------+ | ||||||
|
|
||||||
| - **Python code** | ||||||
|
|
||||||
| A tax defined as **Python code** consists of two snippets of Python code that are executed in a | ||||||
| local environment containing data such as the unit price, product or partner. | ||||||
| :guilabel:`Python Code` defines the amount of the tax, and :guilabel:`Applicable Code` defines if | ||||||
| the tax is to be applied. The formula is found at the bottom of the :guilabel:`Definition` tab. | ||||||
|
|
||||||
| .. example:: | ||||||
| :guilabel:`Python Code`: `result = price_unit * 0.10` | ||||||
| :guilabel:`Applicable Code`: `result = true` | ||||||
|
|
||||||
| .. _taxes/active: | ||||||
|
|
||||||
| Active | ||||||
|
|
@@ -256,56 +378,112 @@ invoice line. | |||||
| Included in price | ||||||
| ~~~~~~~~~~~~~~~~~ | ||||||
|
|
||||||
| With this option activated, the total (including the tax) equals the **sales price**. | ||||||
| .. tip:: | ||||||
| To set a company-wide default for this setting, go to :menuselection:`Accounting --> | ||||||
| Configuration --> Settings`, find the :guilabel:`Taxes` section, and set the :guilabel:`Prices` | ||||||
| setting to :guilabel:`Tax Excluded` or :guilabel:`Tax Included`. This setting cannot be changed | ||||||
| once invoices have been created. | ||||||
|
|
||||||
| When set to :guilabel:`Default`, the company-wide default will be used. | ||||||
|
|
||||||
| `Total = Sales Price = Computed Tax-Excluded price + Tax` | ||||||
| When set to :guilabel:`Tax Excluded`, the tax will always treat the sales price on which it is | ||||||
| applied as a price excluding the tax amount. | ||||||
|
|
||||||
| When set to :guilabel:`Tax Included`, the tax will always treat the sales price on which it is | ||||||
| applied as a total including the tax amount. The tax computation will split the sales price into a | ||||||
| base amount and a tax amount. This makes it suitable for B2C sales in most countries, where prices | ||||||
| are quoted tax-inclusive. | ||||||
|
|
||||||
| .. example:: | ||||||
| A product has a sales price of $1000, and we apply a *10% of Price* tax, which is *included in | ||||||
| the price*. We then have: | ||||||
| A product has a sales price of $1000, and we apply a 10% :guilabel:`Percentage of Price` tax | ||||||
| with :guilabel:`Included in Price` set to :guilabel:`Tax Included`. We then have: | ||||||
|
|
||||||
| +-------------+-------------+----------+----------+ | ||||||
| | Product | Price | Tax | Total | | ||||||
| | sales price | without tax | | | | ||||||
| +=============+=============+==========+==========+ | ||||||
| | 1,000 | 900.10 | 90.9 | 1,000.00 | | ||||||
| | 1,000 | 909.09 | 90.91 | 1,000.00 | | ||||||
| +-------------+-------------+----------+----------+ | ||||||
|
|
||||||
| .. note:: | ||||||
| If you need to define prices accurately, both tax-included and tax-excluded, please refer to the | ||||||
| following documentation: :doc:`taxes/B2B_B2C`. | ||||||
|
|
||||||
| .. note:: | ||||||
| By default, only the :guilabel:`Tax excluded` column is displayed on invoices. To display the | ||||||
| :guilabel:`Tax included` column, click the **dropdown toggle** button and check | ||||||
| :guilabel:`Tax incl.`. | ||||||
|
|
||||||
| .. image:: taxes/toggle-button.png | ||||||
| For a guide on configuring tax-excluded and tax-included prices for B2B and B2C customers, | ||||||
| see :doc:`taxes/B2B_B2C`. | ||||||
|
|
||||||
| .. _taxes/base-subsequent: | ||||||
|
|
||||||
| Affect base of subsequent taxes | ||||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||||
|
|
||||||
| With this option, the total tax-included becomes the taxable basis for the other taxes applied to | ||||||
| the same product. | ||||||
|
|
||||||
| You can configure a new :ref:`group of taxes <taxes/computation>` to include this tax or add it | ||||||
| directly to a product line. | ||||||
|
|
||||||
| .. image:: taxes/subsequent-line.png | ||||||
| :alt: The eco-tax is taken into the basis of the 21% VAT tax | ||||||
| If this setting is enabled, any subsequent tax applied on the same product line that has its | ||||||
| :ref:`taxes/base-affected` will be based on a modified sales price. The exact behavior depends on | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| the :ref:`Included in Price <taxes/included-in-price>` setting. | ||||||
|
|
||||||
| .. tabs:: | ||||||
| .. tab:: Tax-excluded | ||||||
| If :guilabel:`Included in Price` is set to :guilabel:`Tax Excluded`, subsequent taxes with | ||||||
| :guilabel:`Base affected by preceding taxes` will be based on a modified sales price equal to | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| the original sales price plus the tax amount. | ||||||
|
|
||||||
| .. example:: | ||||||
| A product has a sales price of $1000, and we apply a 10% :guilabel:`Percentage of Price` | ||||||
| tax where the :guilabel:`Included in Price` setting is set to :guilabel:`Tax Excluded` and | ||||||
| the :guilabel:`Affect base of subsequent taxes` setting is enabled. Any subsequent tax with | ||||||
| its :guilabel:`Base affected by preceding taxes` will be based on a modified sales price of | ||||||
| $1100. | ||||||
|
|
||||||
| .. tab:: Tax-included | ||||||
| If :guilabel:`Included in Price` is set to :guilabel:`Tax Included`, subsequent taxes with | ||||||
| :guilabel:`Base affected by preceding taxes` will be based on a modified sales price equal to | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| the original sales price minus the tax amount. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here the subsequent taxes are based on the original sales price, not a modified sales price. |
||||||
|
|
||||||
| .. example:: | ||||||
| A product has a sales price of $1100, and we apply a 10% :guilabel:`Percentage of Price` | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Asked discussed in DM, let's use the same sales price across our examples here instead of trying to set the same base price. This will highlight the differences in how each setting works instead of trying to change our numerical inputs to try to get the same results across the different settings. |
||||||
| tax where the :guilabel:`Included in Price` setting is set to :guilabel:`Tax Included` and | ||||||
| the :guilabel:`Affect base of subsequent taxes` setting is enabled. Any subsequent tax with | ||||||
| its :guilabel:`Base affected by preceding taxes` will be based on a modified sales price of | ||||||
| $1000. | ||||||
|
|
||||||
| This setting is considered any time multiple taxes are applied to the same product line, whether | ||||||
| via a :ref:`group of taxes <taxes/computation>` or multiple taxes added directly to a product line. | ||||||
|
|
||||||
| .. warning:: | ||||||
| The order in which you add the taxes on a product line has no effect on how amounts are computed. | ||||||
| If you add taxes directly on a product line, only the tax sequence determines the order in which | ||||||
| they are applied. | ||||||
| The order in which taxes are applied depends only on the order in which they appear in the | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's change the warning to a note and include the info you found regarding how when calculating the taxes, it first applies the fixed taxes, then tax-included taxes, then tax-excluded taxes, and that when multiple taxes of the same type are used, the sequence determines their order. |
||||||
| :guilabel:`Taxes` list, not on the order in which they are added to a product line. | ||||||
|
|
||||||
| To reorder the sequence, go to :menuselection:`Accounting --> Configuration --> Taxes`, and drag | ||||||
| and drop the lines with the handles next to the tax names. | ||||||
| To modify the order, go to :menuselection:`Accounting --> Configuration --> Taxes`, and drag and | ||||||
| drop taxes using the handles to the left of the tax names. | ||||||
|
|
||||||
| .. image:: taxes/list-sequence.png | ||||||
| :alt: The taxes' sequence in Odoo determines which tax is applied first | ||||||
| :alt: The order of appearance of taxes in the Taxes list determines which tax is applied first | ||||||
|
|
||||||
| .. example:: | ||||||
| In the following example: | ||||||
|
|
||||||
| - the Ecotax is a :guilabel:`Fixed` tax of €0.90 per unit, with the :guilabel:`Affect base of | ||||||
| subsequent taxes` setting enabled. | ||||||
| - The 21% VAT tax is a 21% :guilabel:`Percentage of Price` tax with the :guilabel:`Base affected | ||||||
| by preceding taxes` setting enabled. | ||||||
| - In the :guilabel:`Taxes` list, the 21% VAT tax comes after the Ecotax, as shown in the | ||||||
| configuration above. | ||||||
|
Comment on lines
+466
to
+467
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that we know fixed taxes apply first, let's change this or remove it entirely so that we're not creating more confusion about what's the first factor to be considered. |
||||||
|
|
||||||
| When applying both taxes to a product line, the Ecotax amount is added to the basis of the 21% | ||||||
| VAT tax. | ||||||
|
|
||||||
| .. image:: taxes/subsequent-line.png | ||||||
| :alt: The Ecotax is added to the basis of the 21% VAT tax | ||||||
|
|
||||||
| .. _taxes/base-affected: | ||||||
|
|
||||||
| Base affected by preceding taxes | ||||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||||
|
|
||||||
| This setting, which is only visible in :doc:`developer mode <../../general/developer_mode>`, | ||||||
| determines whether any previous tax that :ref:`affects the base of subsequent taxes | ||||||
| <taxes/base-subsequent>` will modify the sales price that this tax is based on. | ||||||
|
|
||||||
| .. note:: | ||||||
| Taxes with :ref:`Included in Price <taxes/included-in-price>` always behave as if this setting is | ||||||
| enabled. | ||||||
|
|
||||||
| Extra taxes | ||||||
| =========== | ||||||
|
|
@@ -320,7 +498,7 @@ imposed by governments. These extra taxes can be **luxury** taxes, **environment | |||||
|
|
||||||
| To compute an extra tax in Odoo, :ref:`create a tax <taxes/configuration>`, enter a tax name, select | ||||||
| a :ref:`Tax Computation <taxes/configuration>`, set an :guilabel:`Amount`, and in the | ||||||
| :guilabel:`Advanced Options` tab, check :guilabel:`Affect Base of Subsequent Taxes`. Then, drag and | ||||||
| :guilabel:`Advanced Options` tab, enable :guilabel:`Affect Base of Subsequent Taxes`. Then, drag and | ||||||
| drop the taxes in the :ref:`order they should be computed <taxes/base-subsequent>`. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is also affected by the revelation of tax type affecting the application order. |
||||||
|
|
||||||
| .. example:: | ||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.