summaryrefslogtreecommitdiff
path: root/addons/l10n_us
diff options
context:
space:
mode:
authorMahendra barad <mba@openerp.com>2015-11-20 14:26:12 +0530
committerYannick Tivisse <yti@odoo.com>2016-06-28 12:12:30 +0200
commit6ba6213fa965d8935e6e8d62b2f481308167106f (patch)
tree547b0930f0df35a0dc3c17a08dd21f47c671f36c /addons/l10n_us
parent84b0fb5bbc392788f14184a893e1bdeabb51f92c (diff)
[ADD] account_taxcloud: Integrate TaxCloud API to get Sales Tax
- add a new checkbox on fiscal position: TaxCloud API - when computing this fiscal position, it will: - return an existing tax if one exists for the same tax percentage, state, zip and TIC Category - or create and return this tax if it does not exists yet - Create a data fiscal position: country U.S., tax cloud API - In l10n_us, add a settings in accounting: compute tax automatically using tax cloud. NB: - The signature of map_tax has been modified to optionally specify the product and the partner on which the tax is applied - The avoid the validationerrors that may occur while evaluation the tax with Taxcloud when a public user is on the frontend shop (website_sale), we have to execute the error silently by logging it.
Diffstat (limited to 'addons/l10n_us')
-rw-r--r--addons/l10n_us/__init__.py2
-rw-r--r--addons/l10n_us/__openerp__.py1
-rw-r--r--addons/l10n_us/models/__init__.py4
-rw-r--r--addons/l10n_us/models/res_config.py11
-rw-r--r--addons/l10n_us/views/res_config_view.xml18
5 files changed, 36 insertions, 0 deletions
diff --git a/addons/l10n_us/__init__.py b/addons/l10n_us/__init__.py
index 67dee8c60db..81fc81d29c9 100644
--- a/addons/l10n_us/__init__.py
+++ b/addons/l10n_us/__init__.py
@@ -1,2 +1,4 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+import models
diff --git a/addons/l10n_us/__openerp__.py b/addons/l10n_us/__openerp__.py
index 7d7daffaaf6..7b1c0929bca 100644
--- a/addons/l10n_us/__openerp__.py
+++ b/addons/l10n_us/__openerp__.py
@@ -11,6 +11,7 @@ United States - Chart of accounts.
'depends': ['l10n_generic_coa', 'report'],
'data': [
'data/res_company.xml',
+ 'views/res_config_view.xml'
],
'demo': [],
'test': [],
diff --git a/addons/l10n_us/models/__init__.py b/addons/l10n_us/models/__init__.py
new file mode 100644
index 00000000000..d330642bb78
--- /dev/null
+++ b/addons/l10n_us/models/__init__.py
@@ -0,0 +1,4 @@
+# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+import res_config
diff --git a/addons/l10n_us/models/res_config.py b/addons/l10n_us/models/res_config.py
new file mode 100644
index 00000000000..156061c7def
--- /dev/null
+++ b/addons/l10n_us/models/res_config.py
@@ -0,0 +1,11 @@
+# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+from odoo import fields, models
+
+class AccountConfigSettings(models.TransientModel):
+ _inherit = 'account.config.settings'
+
+ module_account_taxcloud = fields.Boolean("Compute sales tax automatically in the United States using TaxCloud.",
+ help='TaxCloud is an online provider that is committed to making it easy for retailers to collect sales tax online'
+ 'in the United States.')
diff --git a/addons/l10n_us/views/res_config_view.xml b/addons/l10n_us/views/res_config_view.xml
new file mode 100644
index 00000000000..491a9b64583
--- /dev/null
+++ b/addons/l10n_us/views/res_config_view.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+
+ <record id="account_config_settings_inherit_form_view" model="ir.ui.view">
+ <field name="name">account settings</field>
+ <field name="model">account.config.settings</field>
+ <field name="inherit_id" ref="account.view_account_config_settings"/>
+ <field name="arch" type="xml">
+ <xpath expr="//div[@name='invoice_taxes']" position="inside">
+ <div name="taxcloud_tax" class="o_row">
+ <field name="module_account_taxcloud"/>
+ <label for="module_account_taxcloud"/>
+ </div>
+ </xpath>
+ </field>
+ </record>
+
+</odoo>