-
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by dreispt
- Loading branch information
Showing
114 changed files
with
8,891 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from . import models | ||
from . import wizard | ||
from .hooks import pre_init_hook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"name": "Avalara Avatax Certified Connector", | ||
"version": "18.0.1.0.0", | ||
"author": "Open Source Integrators, Fabrice Henrion," | ||
"Sodexis, Odoo Community Association (OCA)", | ||
"summary": "Compute Sales Tax using the Avalara Avatax Service", | ||
"license": "AGPL-3", | ||
"category": "Accounting", | ||
"website": "https://github.com/OCA/account-fiscal-rule", | ||
"depends": ["sale_stock", "base_geolocalize"], | ||
"pre_init_hook": "pre_init_hook", | ||
"data": [ | ||
"security/avalara_salestax_security.xml", | ||
"security/ir.model.access.csv", | ||
"data/avalara_salestax_data.xml", | ||
"data/avalara_salestax_exemptions.xml", | ||
"wizard/avalara_get_company_code_view.xml", | ||
"wizard/avalara_salestax_address_validate_view.xml", | ||
"wizard/avalara_salestax_ping_view.xml", | ||
"views/avalara_salestax_view.xml", | ||
"views/partner_view.xml", | ||
"views/product_view.xml", | ||
"views/account_move_action.xml", | ||
"views/account_move_view.xml", | ||
"views/account_tax_view.xml", | ||
"views/account_fiscal_position_view.xml", | ||
], | ||
"demo": ["demo/avatax_demo.xml"], | ||
"images": ["static/description/avatax_icon.png"], | ||
"installable": True, | ||
"application": True, | ||
"external_dependencies": {"python": ["Avalara"]}, | ||
"development_status": "Production/Stable", | ||
"maintainers": ["dreispt"], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<odoo noupdate="1"> | ||
<record id="avatax_fiscal_position_us" model="account.fiscal.position"> | ||
<field name="name">Avatax Tax Mapping (US)</field> | ||
<field name="is_avatax" eval="True" /> | ||
<field name="auto_apply" eval="True" /> | ||
<field name="country_id" ref="base.us" /> | ||
</record> | ||
<record id="avatax_tax_group" model="account.tax.group"> | ||
<field name="name">AvaTax</field> | ||
</record> | ||
<!-- Used as template for automatic Tax records created --> | ||
<record id="avatax" model="account.tax"> | ||
<field name="name">AVATAX</field> | ||
<field name="description">Sales Tax</field> | ||
<field name="tax_group_id" ref="avatax_tax_group" /> | ||
<field name="amount_type">percent</field> | ||
<field name="amount" eval="0.00" /> | ||
<field name="type_tax_use">sale</field> | ||
<field name="is_avatax">True</field> | ||
<field name="country_id" ref="base.us" /> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<data noupdate="1"> | ||
<!-- | ||
Partner Exemption Code | ||
--> | ||
<record id="federal_government_type" model="exemption.code"> | ||
<field name="name">Federal Government</field> | ||
<field name="code">A</field> | ||
</record> | ||
<record id="state_government_type" model="exemption.code"> | ||
<field name="name">State Government</field> | ||
<field name="code">B</field> | ||
</record> | ||
<record id="tribe_indian_band_type" model="exemption.code"> | ||
<field name="name">Tribe / Status Indian / Indian Band</field> | ||
<field name="code">C</field> | ||
</record> | ||
<record id="foreign_diplomat_type" model="exemption.code"> | ||
<field name="name">Foreign Diplomat</field> | ||
<field name="code">D</field> | ||
</record> | ||
<record id="charitable_org_type" model="exemption.code"> | ||
<field name="name">Charitable or Benevolent Org</field> | ||
<field name="code">E</field> | ||
</record> | ||
<record id="religious_eductional_org_type" model="exemption.code"> | ||
<field name="name">Religious or Educational Org</field> | ||
<field name="code">F</field> | ||
</record> | ||
<record id="resale_type" model="exemption.code"> | ||
<field name="name">Resale</field> | ||
<field name="code">G</field> | ||
</record> | ||
<record id="commercial_agriculture_production_type" model="exemption.code"> | ||
<field name="name">Commercial Agricultural Production</field> | ||
<field name="code">H</field> | ||
</record> | ||
<record id="industrial_manufacturer_type" model="exemption.code"> | ||
<field name="name">Industrial Production / Manufacturer</field> | ||
<field name="code">I</field> | ||
</record> | ||
<record id="direct_pay_permit_type" model="exemption.code"> | ||
<field name="name">Direct Pay Permit</field> | ||
<field name="code">J</field> | ||
</record> | ||
<record id="direct_mail_type" model="exemption.code"> | ||
<field name="name">Direct Mail</field> | ||
<field name="code">K</field> | ||
</record> | ||
<record id="other_type" model="exemption.code"> | ||
<field name="name">Other</field> | ||
<field name="code">L</field> | ||
</record> | ||
<record id="local_government_type" model="exemption.code"> | ||
<field name="name">Local Government</field> | ||
<field name="code">N</field> | ||
</record> | ||
<record id="commercial_aquaculture_type" model="exemption.code"> | ||
<field name="name">Commercial Aquaculture</field> | ||
<field name="code">P</field> | ||
</record> | ||
<record id="commercial_fishery_type" model="exemption.code"> | ||
<field name="name">Commercial Fishery</field> | ||
<field name="code">Q</field> | ||
</record> | ||
<record id="non_resident_type" model="exemption.code"> | ||
<field name="name">Non-Resident</field> | ||
<field name="code">R</field> | ||
</record> | ||
</data> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<odoo> | ||
<!-- fake avatax API configuraation --> | ||
<record id="avatax_api_configuraation" model="avalara.salestax"> | ||
<field name="company_id" ref="base.main_company" /> | ||
<field name="account_number">123456789</field> | ||
<field name="license_key">avatax_key</field> | ||
</record> | ||
|
||
<record id="avatax_customer" model="res.partner"> | ||
<field name="name">Washington Customer</field> | ||
<field name="street">100 Ravine Ln Ne</field> | ||
<field name="city">Bainbridge Island</field> | ||
<field name="state_id" ref="base.state_us_48" /> | ||
<field name="country_id" ref="base.us" /> | ||
<field name="zip">98110-2687</field> | ||
</record> | ||
|
||
<record id="avatax_product_taxcodeP" model="product.tax.code"> | ||
<field name="name">P0000000</field> | ||
<field name="type">product</field> | ||
</record> | ||
<record id="avatax_product_taxcodeNT" model="product.tax.code"> | ||
<field name="name">NT</field> | ||
<field name="type">product</field> | ||
</record> | ||
<record id="avatax_product_taxcodeF" model="product.tax.code"> | ||
<field name="name">FR020100</field> | ||
<field name="type">freight</field> | ||
</record> | ||
|
||
<record id="avatax_product_sku1" model="product.product"> | ||
<field name="name">Test Item P0000000</field> | ||
<field name="type">consu</field> | ||
<field name="list_price">100.0</field> | ||
<field name="tax_code_id" ref="account_avatax_oca.avatax_product_taxcodeP" /> | ||
</record> | ||
<record id="avatax_product_sku2" model="product.product"> | ||
<field name="name">Test Item NT</field> | ||
<field name="type">consu</field> | ||
<field name="list_price">100.0</field> | ||
<field name="tax_code_id" ref="account_avatax_oca.avatax_product_taxcodeNT" /> | ||
</record> | ||
<record id="avatax_product_freight" model="product.product"> | ||
<field name="name">Common Carrier FR020100</field> | ||
<field name="type">service</field> | ||
<field name="list_price">50.0</field> | ||
<field name="tax_code_id" ref="account_avatax_oca.avatax_product_taxcodeF" /> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright (C) 2022 Open Source Integrators | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
|
||
def pre_init_hook(env): | ||
# Preserve key data when moving from account_avatax to account_avatax_oca | ||
# The process is to first install account_avatax_oca | ||
# and then uninstall account_avatax | ||
env.cr.execute( | ||
""" | ||
UPDATE ir_model_data | ||
SET module = 'account_avatax_oca' | ||
WHERE name in ('avatax_fiscal_position_us', 'account_avatax') | ||
""" | ||
) |
Oops, something went wrong.