Package: odoo-addon-account-avatax-oca
Odoo provides integration with AvaTax, a tax solution software by Avalara
which includes sales tax calculation for all US states and territories
and all Canadian provinces and territories (including GST, PST, and HST).This module is capable of automatically detecting origin (Output Warehouse)
and destination (Client Address), then calculating and reporting taxes
to the user’s Avalara account as well as a recording the correct sales taxes
for the validated addresses within Odoo ERP.This module is compatible both with the Odoo Enterprise and Odoo Community
editions.An Avatax account is needed. Account information to access
the Avatax dashboard can be obtained through the Avalara website here:https://www.avalara.com/products/calculations.htmlOnce configured, the module operates in the background and performs
calculations and reporting seamlessly to the AvaTax server.This guide includes instructions for the following elements:Activating your organization’s AvaTax account and downloading the productEntering the AvaTax credentials into your Odoo database and configuring it
to use AvaTax services and features within OdooNote: Test the module before deploying in live environment.
All changes to the AvaTax settings must be performed by a user with
administrative access rights.IMPORTANT - resolving name conflict with Odoo EEAvatax support was added to Odoo EE 14 and 15.
Unfortunately the module names used are the same as the OCA ones,
and because of this name collision the OCA modules were forced to change name.The main module was renamed fromaccount_avatax(now used by Odoo EE) toaccount_avatax_oca.To apply this change in your odoo database and continue using the OCA Avalara certified
connector:Ensure you have the latest version from the OCA, and you seeaccount_avatax_ocain your Apps list.Install the newaccount_avatax_ocamoduleUnistall theaccount_avataxmoduleConfirm that your configurations were kept safe, in particular:Avatax API, “Avatax” default Fiscal Position, and “Avatax” default Tax record.Table of contentsInstallationConfigurationConfigure Avatax API ConnectionConfigure Company TaxesConfigure CustomersConfigure ProductsUsageCustomer InvoicesCreate New Customer InvoiceValidate InvoiceRegister PaymentCustomer RefundsSales OrdersKnown issues / RoadmapBug TrackerCreditsAuthorsContributorsOther creditsMaintainersInstallationBefore installing the Avatax app, the Avalara Python client
must be installed in your system.
It is available athttps://pypi.org/project/Avalara.Typically it can be installed in your system usinpip:pip3 install AvalaraThe base app,account_Avatax, adds Avatax support to Customer Invoices.
Inthe official app store:https://apps.odoo.com/apps/modules/15.0/account_avatax/Theaccount_avatax_saleextension adds support to Quotations / Sales Orders.
Inthe official app store:https://apps.odoo.com/apps/modules/15.0/account_avatax_sale/In most cases you will want to download and install both modules.To install the Avatax app:Download the AvaTax modulesExtract the downloaded filesUpload the extracted directories into your Odoo module/addons directoryLog into Odoo as an Administrator and enable the Developer Mode, in ‘Settings’Navigate to ‘Apps’, select the ‘Update Apps List’ menu, to have the new apps listed.In the Apps list, search for ‘AvaTax’Click on the Install button. If available, theaccount_avatax_salemodule will
also be installed automatically.ConfigurationTo configure an Odoo company to use Avatax, follow these steps.
Note tha tsome of them might be configured out of the box
for the Odoo default company.Configure AvaTax API ConnectionConfigure Company TaxesConfigure CustomersConfigure ProductsConfigure Avatax API ConnectionBefore you can configure the Odoo Avatax connector,
you will need some connection details ready:Login tohttps://home.avalara.com/Navigate to Settings >> All AvaTax Settings.
There you will see the company details.Take note of the Account ID and Company CodeNavigate to Settings >> License and API Keys.
In the “Reset License Key” tab, click on the “Generate License Key” button,
and take note of it.To configure AvaTax connector in Odoo:Navigate to: Accounting/Invoicing App >> Configuration >> AvaTax >> AvaTax APIClick on the Create buttonFill out the form with the elements collected from the AvaTax website:Account IDLicense KeyService URL: usually Production, or Sandox if you have that available.Company CodeClick the Test Connection buttonClick the Save buttonOther Avatax API advanced configurations:Tax Calculation tab:Disable Document Recording/Commiting: invoices will not be stored in AvalaraEnable UPC Taxability: this will transmit Odoo’s product ean13 number
instead of its Internal Reference. If there is no ean13
then the Internal Reference will be sent automatically.Hide Exemption & Tax Based on shipping address – this will give user ability
to hide or show Tax Exemption and Tax Based on shipping address fields
at the invoice level.Address Validation tab:Automatic Address Validation: automatically attempts
to validate on creation and update of customer record,
last validation date will be visible and storedRequire Validated Addresses: if validation for customer is required but not valid,
the validation will be forcedReturn validation results in upper case: validation results
will return in upper case formAdvanced tab:Automatically generate missing customer code: generates a customer code
on creation and update of customer profileLog API requests: enables detailed AvaTax transaction logging within applicationRequest Timeout: default is 300msCountries: countries where AvaTax can be used.Configure Company TaxesEach company linked to AvaTax and their associated warehouses
should be configured to ensure the correct tax is calculated
and applied for all transactions.Validate Company Address:On the AvTax API configuration form, click on the “Company Address” linkOn the company address form, click on the “validate” button
in the “AvaTax” tabValidate Warehouse Address:Navigate to: Inventory >> Configuration >> Warehouse Management >> WarehousesFor each warehouse, open the correspoding from viewOn the Warehouse form, click on the “Address” linkOn the warehouse address form, click on the “validate” button
in the “AvaTax” tabFiscal Positions is what tells the AvaTax connector if the AvaTax service
should be used for a particular Sales Order or Invoice.Configure Fiscal Position:Navigate to: Accounting/Invoicing App >> Configuration >> Accounting
>> Fiscal PositionsEnsure there is a Fiscal Position record for the Company,
with the “Use Avatax API” flag checkedWhen the appropriate Fiscal Position is being used, and a tax rate is retrieved form
AvaTax, then the corresponding Tax is automatically created in Odoo
using a template tax record, that should have the appropriate accounting configurations.Configure Taxes:Navigate to: Accounting/Invoicing App >> Configuration >> Accounting >> TaxesEnsure there is a Tax record for the Company, with the “Is Avatax” flag checked
(visible in the “Advanced Options” tab). This Tax should have:Tax Type: SalesTax Computation: Percentage of PriceAmount: 0.0%Distribution for Invoices: ensure correct account configurationDistribution for Credit Notes: ensure correct account configurationConfigure CustomersExemption codes are allowed for users where they may apply (ex. Government entities).Navigate to: Accounting or Invoicing App >> Configuration >> AvaTax >> Exemption CodeThe module is installed with 16 predefined exemption codes.You can add, remove, and modify exemption codes.Properly configuring each customer ensures the correct tax is calculated
and applied for all transactions.Create New CustomerNavigate to ContactsClick Create buttonConfigure and Validate Customer AddressEnter Customer AddressUnder AvaTax >> Validation, click Validate buttonAvaTax Module will attempt to match the address you entered
with a valid address in its database.
Click the Accept button if the address is valid.Tax Exemption StatusIf the customer is tax exempt, check the box under
AvaTax >> Tax Exemption >> Is Tax Exempt andSelect the desired Tax Exempt Code from the dropdown menu.Configure ProductsCreate product tax codes to assign to products and/or product categories.
Navigate to: Accounting or Invoicing App >> Configuration >> AvaTax >> Product Tax Codes.From here you can add, remove, and modify the product tax codes.Products in Odoo are typically assigned to product categories.
AvaTax settings can also be assigned to the product category
when a product category is created.Create New Product CategoryNavigate to: Inventory >> Configuration >> Products >> Product CategoriesClick Create buttonConfigure Product Category Tax CodeUnder AvaTax Properties >> Tax CodeSelect the desired Tax CodeUsageCustomer InvoicesThe AvaTax module is integrated into Sales Invoices
and is applied to each transaction.
The transaction log in the AvaTax dashboard shows the invoice details
and displays whether the transaction is in an uncommitted or committed status.A validated invoice will have a Committed status
and a cancelled invoice will have a Voided status.The module will check if there is a selected warehouse
and will automatically determine the address of the warehouse
and the origin location.
If no address is assigned to the warehouse, the company address is used.Discounts are handled when they are enabled in Odoo’s settings.
They are calculated as a net deduction on the line item cost
before the total is sent to AvaTax.Create New Customer InvoiceNavigate to: Accounting or Invoicing >> Customers >> Invoices.Click Create button.Validate InvoiceEnsure that Tax based on shipping address is checked.Line items should have AVATAX selected under Taxes for internal records.To complete the invoice, click the Validate button.The sale order will now appear in the AvaTax dashboard.Register PaymentClick the Register Payment button to finalize the invoice.Customer RefundsOdoo applies refunds as opposed to voids in its accounting module.
As with customer invoices, the AvaTax module is integrated
with customer refunds and is applied to each transaction.Refunded invoice transactions will be indicatedwith a negative total in the AvaTax interface.Initiate Customer RefundNavigate to: Accounting or Invoicing >> Customers >> InvoicesSelect the invoice you wish to refundClick Add Credit Note buttonCreate Credit NoteUnder Credit Method, select Create a draft credit note.Enter a reason.Click Add Credit Note button.Note: You will be taken to the Credit Notes list viewValidate RefundSelect the Credit Note you wish to validate, review and then click Validate button.Register Refund PaymentClick Register Payment button to complete a refundSales OrdersThe AvaTax module is integrated into Sales Orders and allows computation of taxes.
Sales order transactions do not appear in the in the AvaTax interface.The information placed in the sales order will automatically pass to the invoiceon the Avalara server and can be viewed in the AvaTax control panel.Discounts are handled when they are enabled in Odoo’s settings.
They will be reported as a net deduction on the line item cost.Create New Sales OrderNavigate to: Sales >> Orders >> OrdersClick Create buttonCompute Taxes with AvaTaxThe module will calculate tax when the sales order is confirmed,
or by navigating to Action >> Update taxes with Avatax.
At this step, the sales order will retrieve the tax amount from Avalara
but will not report the transaction to the AvaTax dashboard.
Only invoice, refund, and payment activity are reported to the dashboard.The module will check if there is a selected warehouse
and will automatically determine the address of the warehouse
and the origin location. If no address is assigned to the warehouse
the module will automatically use the address of the company as its origin.
Location code will automatically populate with the warehouse code
but can be modified if needed.Known issues / RoadmapThe development of this module was driven by US companies to compute Sales Tax.However the Avatax service supports more use cases, that could be added:Add support to EU VATAdd support to US Use Tax on Purchases / vendor BillsOther improvements that could be added:Detect and warn if customers State is not a nexus available for the current accountBug TrackerBugs are tracked onGitHub Issues.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomedfeedback.Do not contact contributors directly about support or help with technical issues.CreditsAuthorsOpen Source IntegratorsFabrice HenrionSodexisContributorsOdoo SAFabrice HenrionOpen Source Integrators (https://opensourceintegrators.com)Daniel Reis <dreis@opensourceintegrators.com>Bhavesh Odedra <bodedra@opensourceintegrators.com>Sandip Mangukiya <smangukiya@opensourceintegrators.com>Nikul Chaudhary <nchaudhary@opensourceintegrators.com>Serpent CSMurtuza SalehSodexisAtchuthan UbendranOther creditsThis module was originally developed by Fabrice Henrion at Odoo SA,
and maintained up to version 11.For version 12, Fabrice invited partners to migrate this modules to
later version, and maintain it.Open Source Integrators performed the migration to Odoo 12
, and later added support for the more up to date REST API
, alongside with the legacy SOAP API.With the addition of the REST API, a deep refactor was introduced,
changing the tax calculation approach, from just setting the total
tax amount, to instead adding the tax rates to each document line
and then having Odoo do all the other computations.For Odoo 13, the legacy SOAP support was supported, and
additional refactoring was done to contribute the module
to the Odoo Community Association.MaintainersThis module is maintained by the OCA.OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.Currentmaintainer:This module is part of theOCA/account-fiscal-ruleproject on GitHub.You are welcome to contribute. To learn how please visithttps://odoo-community.org/page/Contribute.