Files
documentation/content/applications/finance/accounting/taxation/taxes/taxcloud.rst
T
Antoine Vandevenne (anv) 91c20a2c03 [MOV] content/*: move resource files into their related page's directory
Since odoo/documentation#903, the guideline for the location of new
resource (images, downloadable files, RST includes...) files is to place
those inside the directory of the RST page that references them.

For example, if `doc1.rst` has a reference to `image.png` and to
`download.zip`, the file structure should look like this:

├── parent_doc/
│     └── doc1/
│     │     └── image.png
│     │     └── download.zip
│     └── doc1.rst
│     └── doc2.rst
├── parent_doc.rst

Before this commit, most of the resource files were still located inside
'media' directories holding all the resource files referenced by RST
pages located at the same level as these directories. In the example
above, a single 'media' directory would hold all the resource files
referenced by both `doc1.rst` and `doc2.rst`. Doing so prevented us from
figuring out easily which resource file was referenced by which RST page
and, thus, lead to unused resource files piling up in the repository. It
also made it more complicated to define codeowners regex rules because a
team could not simply be assigned to `/some_page.*` but needed to be
assigned to both `/some_page\.rst` and to the location of 'media'.

In order to help new content writers figure out the guideline when
taking examples from other RST pages, this commit retroactively applies
the guideline to existing resource files and 'media' directories. The
left-over resource files that are not referenced by any RST page are
removed.

task-2497965

Part-of: odoo/documentation#2026
2022-05-20 14:03:47 +02:00

140 lines
6.1 KiB
ReStructuredText

=========================================================
Get correct tax rates in the United States using TaxCloud
=========================================================
The **TaxCloud** integration allows you to correctly calculate the sales
tax for every address in the United States and keeps track of which products
are exempt from sales tax and in which states each exemption applies.
TaxCloud calculates sales tax in real-time for every state, city, and
special jurisdiction in the United States.
Configuration
=============
In TaxCloud
-----------
* Create a free account on `TaxCloud
<https://taxcloud.com/#register>`__ website.
* Register your Odoo website on TaxCloud to get an *API ID* and an *API Key*.
.. image:: taxcloud/taxcloud01.png
:align: center
* In Settings on TaxCloud, click *Locations* to enter the location of your Office(s) & Warehouse(s).
* In Settings on TaxCloud, click *Manage Tax States* to verify the states where you collect sales tax.
In Odoo
-------
* Go to :menuselection:`Invoicing / Accounting --> Configuration --> Settings`
and check *TaxCloud - Compute tax rates based on U.S. ZIP codes* (note: actually uses complete street address).
* Enter your TaxCloud credentials.
* Click SAVE to store your credentials.
.. image:: taxcloud/taxcloud02.png
:align: center
* Click the Refresh Icon next to *Default Category* to import the TIC product categories
from TaxCloud (Taxability Information Codes). Some categories may imply specific rates or attract product/service type exemptions.
* Select your default *TIC Code*. This will apply to any new
product created.
* Set a specific TaxCloud TIC Category on the *General Information* tab of the Product,
or on the Product Category.
* Make sure your company address is complete (including the state
and the zip code). Go to :menuselection:`Settings --> Users & Companies --> Companies`
to open and edit your Company record.
Automatically post taxes to the correct Tax Payable account
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* For each one of your companies that uses TaxCloud, it might be necessary to create a
**User-Defined Default** so that the new taxes generated by the TaxCloud integration are created
with the correct Tax Payable account:
.. warning::
A User-Defined Default impacts all records at creation. It means that **every** new tax will be
set up to record income in the specified Tax Payable account, unless the tax is manually edited
to specify a different income account (or there exists another User-Defined Default that takes
precedence).
* In :menuselection:`Accounting --> Configuration --> Chart of Accounts`, select the Tax Payable
account for the company. Take note of the account's ``id`` in the URL string.
.. image:: taxcloud/user-default-find-account-id.png
:alt: The account's ID can be found in the URL string as 'id=...'.
:align: center
* Activate the :ref:`developer mode <developer-mode>`, then go to
:menuselection:`Settings --> Technical --> Actions --> User-Defined Defaults`, and
click on *Create*.
* Click on *Field*, then, in the drop-down menu, on *Search More*.
.. image:: taxcloud/user-default-search-field.png
:alt: Click on 'Search More' in the 'Field' drop-down menu.
:align: center
* In the pop-up's search box, filter on the model ``tax.repartition.line`` and the field ``account``.
Select the ``account`` field of the ``tax.repartition.line`` model.
.. image:: taxcloud/user-default-select-field.png
:alt: Select the 'account' field of the 'tax.repartition.line' model.
:align: center
* In the **Default Value** field, enter the ID of the company's Tax Payable account.
Select the company for which this configuration should apply in the *Company* field.
Click *Save*.
.. image:: taxcloud/user-default-enter-default-account-id.png
:alt: Enter the ID of the company's Tax Payable account.
:align: center
How it works
============
Salestax is calculated in Odoo based on fiscal positions
(see :doc:`fiscal_positions`).
A Fiscal Position for the United States is created when installing *TaxCloud*.
Everything works out-of-the-box.
You can configure Odoo to automatically detect which Customers should use this fiscal
position. Go to :menuselection:`Accounting --> Configuration --> Fiscal Positions`
to open and edit the record.
.. image:: taxcloud/taxcloud03.png
:align: center
Now, this fiscal position is automatically set on any sales order, web order, or invoice
when the customer country is *United States*. This triggers the
automated tax computation.
.. image:: taxcloud/taxcloud04.png
:align: center
Add your product(s). You have two options to get Sales Tax on the Order. You can confirm it,
or you can save it and from the *Action* Menu choose **Update Taxes with TaxCloud**.
Coupons & Promotions
====================
If you use the Coupon or Promotion Programs, the integration with Taxcloud might seem a bit odd.
The problem lies with the fact that Taxcloud does not accept lines with negative amounts as part of
the tax computation. This means that the amount of the lines added by the promotion program must be
deduced from the total of the lines it impacts. This means, amongst other complications, that orders
that use coupons or promotions with a Taxcloud fiscal position **must** be invoiced completely -
you cannot create invoices for partial deliveries, etc.
Another specific oddity is possible in the UI: imagine that you sell a product from the Taxcloud
category *[20110] Computers* and that you have a promotion program in place that provides a 50%
discount on this product. If the tax rate for this particular product is 7%, the tax rate that will
be computed from the Taxcloud integration will display 3.5%. This happens because the discount is
included in the price that is sent to Taxcloud, but in Odoo this discount is in another line
entirely. At the end of the day, your tax computation will be correct (since a 3.5% tax on the full
price is the equivalent of a 7% tax on half the price), but this might be surprising from a user
point of view.
.. seealso::
- :doc:`fiscal_positions`