← Back to team overview

openerp-expert-localization team mailing list archive

[Merge] lp:~rvora/openobject-addons/partner_exemption_us into lp:openobject-addons/extra-trunk

 

You have been requested to review the proposed merge of lp:~rvora/openobject-addons/partner_exemption_us into lp:openobject-addons/extra-trunk.

For more details, see:
https://code.launchpad.net/~rvora/openobject-addons/partner_exemption_us/+merge/75291

Added a module for tracking exemption certificate for USA.

-- 
https://code.launchpad.net/~rvora/openobject-addons/partner_exemption_us/+merge/75291
Your team OpenERP Localization Experts is requested to review the proposed merge of lp:~rvora/openobject-addons/partner_exemption_us into lp:openobject-addons/extra-trunk.
=== added directory 'partner_exemption_us'
=== added file 'partner_exemption_us/__init__.py'
--- partner_exemption_us/__init__.py	1970-01-01 00:00:00 +0000
+++ partner_exemption_us/__init__.py	2011-09-14 02:18:23 +0000
@@ -0,0 +1,26 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>)
+#    Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>)
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+import partner
+import partner_exemption_us
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file

=== added file 'partner_exemption_us/__openerp__.py'
--- partner_exemption_us/__openerp__.py	1970-01-01 00:00:00 +0000
+++ partner_exemption_us/__openerp__.py	2011-09-14 02:18:23 +0000
@@ -0,0 +1,87 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>)
+#    Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>)
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+{
+    "name" : "Tax Exemption Management",
+    "version" : "1.0",
+    "author" : 'Novapoint Group LLC',
+    "description": """
+This module helps manage and track sales tax exemptions at the partner level. The module has the following
+capabilities:
+• Individual states/or other tax jurisdictions certificate of exemptions are tracked
+• Exemption reasons are tracked for each entry
+• The exemption identification number is tracked for each entry
+• Effective dates are tracked if available for each entry since exemptions must be renewed from time to
+time and expire
+• The “State” (aka status) of an exemption is tracked.
+• Allows historical exemption numbers (multi-entries per state) to be tracked over time to support audit
+activities.
+• Each entry can be pointed to the image of the Certificate either held in a third party document system
+or in OpenERP if document management is installed (Auditors will want to see the signed certificate
+provided by the customer to the company during an audit)
+• The name of the exemption form used to validate the exemption
+• Track the name of the signer of the certificate for a buying company
+
+This module is modeled after the fields from the “Streamlined Sales and Use Tax Agreement” multi-state
+Certificate of Exemption form.
+
+This adds additional fields to the partner record.
+
+General Rules (see your tax advisor and accountant)
+As a general rule, sellers are required to maintain proper records for exempt transactions and provide those
+records to member states and auditors when requested. These certificates may be provided in paper or
+electronic form. A seller is typically relieved of the responsibility for collecting and remitting sales tax on the
+sale or sales that a purchaser provided a seller an exemption certificate. These are based on certain condition
+which the seller should investigate. Each State/Tax jurisdiction has different rules and a customer may be
+exempt from sales taxes (for resale goods) in one tax jurisdiction and non-exempt in the other. Over time
+this module builds exemption histories and helps when a company is audited for their historical sales tax
+compliance. Accounting Auditors look at accurate tracking of exemptions to validate if taxes have been charged
+appropriately.
+
+Any company in the US that sells goods and services B2B should track exemptions. And companies themselves
+should track their own exemption status. This module is designed to help monitor and track exemption
+certificates for both customers and for a “Sellers” own accounts.
+
+*** Future development plans *** (Feel free to enhance this module – or donate funds to
+www.novapointgroup.com to enhance it for you).
+1. Improve the module to incorporate workflow and notifications to help improve management of
+certificate. Phase I – is setup to allow tracking of exemption certificates. Phase II – will help to facilitate
+requesting exemption certificates. Including tracking the interactions/correspondence.
+2. Create and track applicable exemption status options at the individual state/tax jurisdiction level. Each
+state may not support the full list of “exemption reasons”.""",
+    "category" : "Generic Modules/Accounting",
+    "website" : "http://www.novapointgroup.com/";,
+    "depends" : ["base"],
+    "init_xml" : [],
+    "demo_xml" : [
+        "partner_exemption_us_demo.xml"
+    ],
+    "update_xml" : [
+        "partner_exemption_us_view.xml",
+        "partner_view.xml",
+#        "security/ir.model.access.csv",
+    ],
+    "test" : [],
+    "active": False,
+    "installable": True,
+}
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'partner_exemption_us/partner.py'
--- partner_exemption_us/partner.py	1970-01-01 00:00:00 +0000
+++ partner_exemption_us/partner.py	2011-09-14 02:18:23 +0000
@@ -0,0 +1,32 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>)
+#    Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>)
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+from osv import osv, fields
+
+class res_partner(osv.osv):
+    _inherit = 'res.partner'
+    _columns = {
+        'exemption_ids': fields.one2many('res.partner.exemption', 'partner_id', help="Exemption Certificates for each partner")
+    }
+
+res_partner()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file

=== added file 'partner_exemption_us/partner_exemption_us.py'
--- partner_exemption_us/partner_exemption_us.py	1970-01-01 00:00:00 +0000
+++ partner_exemption_us/partner_exemption_us.py	2011-09-14 02:18:23 +0000
@@ -0,0 +1,120 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>)
+#    Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>)
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+import time
+
+from osv import osv, fields
+
+class res_partner_exemption_rejection(osv.osv):
+    _name = "res.partner.exemption.rejection"
+    _description = "Exemption Rejection Code"
+    _columns = {
+        'name': fields.char('Reason', size=32, required=True),
+        'code': fields.char('code', size=32)
+    }
+
+    def name_get(self, cr, uid, ids, context=None):
+        if not ids:
+            return []
+        reads = self.read(cr, uid, ids, ['name', 'code'], context=context)
+        res = []
+        for record in reads:
+            name = record['name']
+            if record['code']:
+                name = '(' + record['code'] + ')' + ' ' + name
+            res.append((record['id'], name))
+        return res
+
+res_partner_exemption_rejection()
+
+class res_partner_exemption_reason(osv.osv):
+    _name = 'res.partner.exemption.reason'
+    _description = 'Exemption Reason Code'
+    _columns = {
+        'name': fields.char('Description', size=64, required=True),
+        'code': fields.char('Code', size=1)
+    }
+
+    def name_get(self, cr, uid, ids, context=None):
+        if not ids:
+            return []
+        reads = self.read(cr, uid, ids, ['name', 'code'], context=context)
+        res = []
+        for record in reads:
+            name = record['name']
+            if record['code']:
+                name = '(' + record['code'] + ')' + ' ' + name
+            res.append((record['id'], name))
+        return res
+
+res_partner_exemption_reason()
+
+class tax_jurisdiction(osv.osv):
+    _name = 'tax.jurisdiction'
+    _description = 'Tax Jurisdiction'
+    _columns = {
+        'name': fields.char('Name', size=32, required=True),
+        'country_id': fields.many2one('res.country', 'Country', help="The country that issued exemption"),
+        'state_id': fields.many2one('res.country.state', 'State', help="The state that issued exemption"),
+        'city': fields.char('City', size=64),
+    }
+
+tax_jurisdiction()
+
+class res_partner_exemption(osv.osv):
+    _name = 'res.partner.exemption'
+    _description = 'Partner Exemption'
+    _rec_name = 'number'
+    _columns = {
+        'description': fields.char('Decription', size=32, help="Describes the certificate"),
+        'partner_id': fields.many2one('res.partner', 'Partner'),
+        'number': fields.char('Exemption Number', size=32, help="Unique Identifier of an exemption certificate", required=True),
+        'number_type': fields.selection([('taxpayer', 'Exemption Number/Taxpayer ID'), ('fein', 'FEIN'), ('license', 'Driver License Number'), ('diplomat', 'Foreign Diplomat Number')], 'Exemption Number Type', required=True, help="Defines the type of the exemption number"),
+        'type': fields.selection([('blanket', 'Blanket'), ('single', 'Single')], 'Certificate Type', help="'Blanket' Certificates cover all the purchases and 'Single' Certificates are used for single invoice or purchase order"),
+        'invoice_purchase_no': fields.char('Invoice/Purchase No', size=32, help="Required if certificate type is /'single/' to be only used for single invoice/purchase order"),
+        'code_id': fields.many2one('res.partner.exemption.reason', 'Exemption Reason Code', help="Indicates the reason for exemption"),
+        'state': fields.selection([('draft', 'Draft'), ('active', 'Active'), ('pending', 'Pending Review'), ('expired', 'Expired'), ('rejected', 'Rejected')], 'Status', required=True, help="Defines the status of the certificate:'Active' certificates can be used to exempt partner from tax, 'Pending' certificates are without the copy of certificate received from the partner, 'Expired' certificate is the one in which ending date has passed in any of the issuing state, 'Rejected' certificate is the one which is rejected"),
+        'effective_date': fields.date('Effective Date', help="Issue date of the exemption certificate"),
+        'description_reason': fields.text('Description of Reason ', size=64, help="General description of exemption reason"),
+        'description_property': fields.text('Description of Tangible Property ', size=64, help="General description of tangible property or taxable services to be purchased by the partner"),
+        'country_id': fields.many2one('res.country', 'Issuing Country', help='The country which issued exemption certificate.'),
+        'source': fields.char('Source', size=32, help="Source of the certificate"),
+        'user_id': fields.many2one('res.users', 'Reviewed By', help='The user who reviewed the exemption certificate document'),
+        'rejection_id': fields.many2one('res.partner.exemption.rejection', 'Rejection Reason', help='The reason why a submitted certificate was rejected.'),
+        'expiration_date': fields.date('Expiration Date', help="Expiration date of the exemption certificate entry"),
+        'received_date': fields.date('Received Date', help="Date when the copy of exemption certificate document was received from the buyer."),
+        'not_expire':fields.boolean('Does Not Expire', help="Indicates if the certificate doesn't expires."),
+        'received':fields.boolean('Received', help="Indicates if a certificate document was received and is on file."),
+        'document_id': fields.many2one('ir.attachment', 'Document', help="The actual location of the the certificate document"),
+        'jurisdiction_id': fields.many2one('tax.jurisdiction', 'Jurisdiction', required=True, help='The Tax Jurisdiction for which the exemption is valid.'),
+        'review_state': fields.selection([('draft', 'Draft'), ('pending', 'Pending Review'), ('accepted', 'Accepted'), ('disputed', 'Disputed'), ('rejected', 'Rejected')], 'Review Status', required=True, help="The status of the review of the document"),
+        'active':fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the exemption without removing it.")
+    }
+
+    _defaults = {
+        'type': 'blanket',
+        'active': True,
+        'state': 'draft',
+        'review_state': 'draft'
+    }
+res_partner_exemption()
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

=== added file 'partner_exemption_us/partner_exemption_us_demo.xml'
--- partner_exemption_us/partner_exemption_us_demo.xml	1970-01-01 00:00:00 +0000
+++ partner_exemption_us/partner_exemption_us_demo.xml	2011-09-14 02:18:23 +0000
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+
+       <!--
+       Partner Exemption Reason
+       -->
+
+       <record id="federal_government_type" model="res.partner.exemption.reason">
+            <field name="name">Federal Government</field>
+            <field name="code">A</field>
+        </record>
+
+        <record id="state_government_type" model="res.partner.exemption.reason">
+            <field name="name">State Government</field>
+            <field name="code">B</field>
+        </record>
+
+        <record id="tribe_indian_band_type" model="res.partner.exemption.reason">
+            <field name="name">Tribe / Status Indian / Indian Band</field>
+            <field name="code">C</field>
+        </record>
+
+        <record id="foreign_diplomat_type" model="res.partner.exemption.reason">
+            <field name="name">Foreign Diplomat</field>
+            <field name="code">D</field>
+        </record>
+
+        <record id="charitable_org_type" model="res.partner.exemption.reason">
+            <field name="name">Charitable or Benevolent Org</field>
+            <field name="code">E</field>
+        </record>
+
+        <record id="religious_eductional_org_type" model="res.partner.exemption.reason">
+            <field name="name">Religious or Educational Org</field>
+            <field name="code">F</field>
+        </record>
+
+        <record id="resale_type" model="res.partner.exemption.reason">
+            <field name="name">Resale</field>
+            <field name="code">G</field>
+        </record>
+
+        <record id="commercial_agriculture_production_type" model="res.partner.exemption.reason">
+            <field name="name">Commercial Agricultural Production</field>
+            <field name="code">H</field>
+        </record>
+
+        <record id="industrial_manufacturer_type" model="res.partner.exemption.reason">
+            <field name="name">Industrial Production / Manufacturer</field>
+            <field name="code">I</field>
+        </record>
+
+      <record id="direct_pay_permit_type" model="res.partner.exemption.reason">
+            <field name="name">Direct Pay Permit</field>
+            <field name="code">J</field>
+        </record>
+
+        <record id="direct_mail_type" model="res.partner.exemption.reason">
+            <field name="name">Direct Mail</field>
+            <field name="code">K</field>
+        </record>
+
+        <record id="other_type" model="res.partner.exemption.reason">
+            <field name="name">Other</field>
+            <field name="code">L</field>
+        </record>
+
+        <record id="local_government_type" model="res.partner.exemption.reason">
+            <field name="name">Local Government</field>
+            <field name="code">N</field>
+        </record>
+
+        <record id="commercial_aquaculture_type" model="res.partner.exemption.reason">
+            <field name="name">Commercial Aquaculture</field>
+            <field name="code">P</field>
+        </record>
+
+        <record id="commercial_fishery_type" model="res.partner.exemption.reason">
+            <field name="name">Commercial Fishery</field>
+            <field name="code">Q</field>
+        </record>
+
+        <record id="non_resident_type" model="res.partner.exemption.reason">
+            <field name="name">Non-Resident</field>
+            <field name="code">R</field>
+        </record>
+
+        <!--
+        Partner Categories
+        -->
+
+        <record id="res_partner_category_accommodation" model="res.partner.category">
+            <field name="name">Accommodation and food services</field>
+        </record>
+
+        <record id="res_partner_category_agriculture" model="res.partner.category">
+            <field name="name">Agricultural, forestry, fishing and hunting</field>
+        </record>
+
+        <record id="res_partner_category_construction" model="res.partner.category">
+            <field name="name">Construction</field>
+        </record>
+
+        <record id="res_partner_category_finance" model="res.partner.category">
+            <field name="name">Finance and insurance</field>
+        </record>
+
+        <record id="res_partner_category_information" model="res.partner.category">
+            <field name="name">Information, publishing and communications</field>
+        </record>
+
+        <record id="res_partner_category_mining" model="res.partner.category">
+            <field name="name">Mining</field>
+        </record>
+
+        <record id="res_partner_category_real_estate" model="res.partner.category">
+            <field name="name">Real estate</field>
+        </record>
+
+        <record id="res_partner_category_rental" model="res.partner.category">
+            <field name="name">Rental and leasing</field>
+        </record>
+
+        <record id="res_partner_category_professional" model="res.partner.category">
+            <field name="name">Professional services</field>
+        </record>
+
+        <record id="res_partner_category_business" model="res.partner.category">
+            <field name="name">Business services</field>
+        </record>
+
+        <record id="res_partner_category_utilities" model="res.partner.category">
+            <field name="name">Utilities</field>
+        </record>
+
+        <record id="res_partner_category_transportation" model="res.partner.category">
+            <field name="name">Transportation and warehousing</field>
+        </record>
+
+        <record id="res_partner_category_wholesale" model="res.partner.category">
+            <field name="name">Wholesale trade</field>
+        </record>
+
+        <record id="res_partner_category_retail" model="res.partner.category">
+            <field name="name">Retail trade</field>
+        </record>
+
+        <record id="res_partner_category_manufacturing" model="res.partner.category">
+            <field name="name">Manufacturing</field>
+        </record>
+
+        <record id="res_partner_category_government" model="res.partner.category">
+            <field name="name">Government</field>
+        </record>
+
+        <record id="res_partner_category_not_business" model="res.partner.category">
+            <field name="name">Not a business</field>
+        </record>
+
+        <record id="res_partner_category_education" model="res.partner.category">
+            <field name="name">Education and health-care services</field>
+        </record>
+
+        <record id="res_partner_category_npo" model="res.partner.category">
+            <field name="name">Nonprofit organization</field>
+        </record>
+
+        <record id="res_partner_category_other" model="res.partner.category">
+            <field name="name">Other</field>
+        </record>
+
+  </data>
+</openerp>
\ No newline at end of file

=== added file 'partner_exemption_us/partner_exemption_us_view.xml'
--- partner_exemption_us/partner_exemption_us_view.xml	1970-01-01 00:00:00 +0000
+++ partner_exemption_us/partner_exemption_us_view.xml	2011-09-14 02:18:23 +0000
@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+
+        <menuitem id="exemption_config_main" name="Exemption" parent="base.menu_config_address_book" sequence="2"/>
+
+        <!--
+        Tax Jurisdiction
+        -->
+
+        <record id="view_tax_jurisdiction_tree" model="ir.ui.view">
+            <field name="name">view.tax.jurisdiction.tree</field>
+            <field name="model">tax.jurisdiction</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree string="Tax Jurisdiction" editable="bottom">
+                    <field name="name"/>
+                    <field name="country_id"/>
+                    <field name="state_id"/>
+                    <field name="city"/>
+                </tree>
+            </field>
+        </record>
+
+        <record id="view_tax_jurisdiction_form" model="ir.ui.view">
+            <field name="name">view.tax.jurisdiction.form</field>
+            <field name="model">tax.jurisdiction</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Tax Jurisdiction">
+                    <field name="name"/>
+                    <field name="country_id"/>
+                    <field name="state_id"/>
+                    <field name="city"/>
+                </form>
+            </field>
+        </record>
+
+        <record id="action_tax_jurisdiction" model="ir.actions.act_window">
+            <field name="name">Jurisdictions</field>
+            <field name="res_model">tax.jurisdiction</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+        </record>
+
+        <menuitem action="action_tax_jurisdiction" id="menu_tax_jurisdiction" parent="exemption_config_main" sequence="9"/>
+
+        <!--
+        Partner Rejection Code
+        -->
+
+        <record id="view_res_partner_exemption_rejection_tree" model="ir.ui.view">
+            <field name="name">res.partner.exemption.rejection.tree</field>
+            <field name="model">res.partner.exemption.rejection</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree string="Exemption Rejection Code" editable="bottom">
+                    <field name="name"/>
+                    <field name="code"/>
+                </tree>
+            </field>
+        </record>
+
+        <record id="view_res_partner_exemption_reason_form" model="ir.ui.view">
+            <field name="name">res.partner.exemption.reason.form</field>
+            <field name="model">res.partner.exemption.reason</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Exemption Rejection Code">
+                    <field name="name"/>
+                    <field name="code"/>
+                </form>
+            </field>
+        </record>
+
+        <record id="action_exemption_rejection" model="ir.actions.act_window">
+            <field name="name">Exemption Rejection Code</field>
+            <field name="res_model">res.partner.exemption.rejection</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+        </record>
+
+        <menuitem action="action_exemption_rejection" id="menu_exemption_rejection" parent="exemption_config_main"/>
+
+        <!--
+        Partner Exemption Code
+        -->
+
+        <record id="view_res_partner_exemption_reason_tree" model="ir.ui.view">
+            <field name="name">res.partner.exemption.reason.tree</field>
+            <field name="model">res.partner.exemption.reason</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree string="Exemption Reason Code" editable="bottom">
+                    <field name="name"/>
+                    <field name="code"/>
+                </tree>
+            </field>
+        </record>
+
+        <record id="view_res_partner_exemption_reason_form" model="ir.ui.view">
+            <field name="name">res.partner.exemption.reason.form</field>
+            <field name="model">res.partner.exemption.reason</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Exemption Reason Code">
+                    <field name="name"/>
+                    <field name="code"/>
+                </form>
+            </field>
+        </record>
+
+        <record id="action_exemption_reason" model="ir.actions.act_window">
+            <field name="name">Exemption Reason Code</field>
+            <field name="res_model">res.partner.exemption.reason</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+        </record>
+
+        <menuitem action="action_exemption_reason" id="menu_exemption_reason" parent="exemption_config_main"/>
+
+        <!--
+        Partner Exemption
+        -->
+
+         <record id="view_partner_exemption_filter" model="ir.ui.view">
+            <field name="name">res.partner.exemption.filter</field>
+            <field name="model">res.partner.exemption</field>
+            <field name="type">search</field>
+            <field name="arch" type="xml">
+                <search string="Search Exemption">
+                   <group col='10' colspan='4'>
+                        <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Exemptions that are Draft"/>
+                        <filter icon="terp-check" string="Active" domain="[('state','=','active')]" help="Exemptions that are Active"/>
+                        <filter icon="terp-gtk-media-pause" string="Pending Review" domain="[('state','=','pending')]" help="Exemptions whose review is pending"/>
+                        <filter icon="terp-dialog-close" string="Expired,Rejected" domain="[('state','in',['expired','rejected'])]" help="Exemptions that are Expired or Rejected"/>
+                        <separator orientation="vertical"/>
+                        <field name="number" select="1"/>
+                        <field name="jurisdiction_id" select="1"/>
+                        <field name="effective_date" select="1" string="Effective date" />
+                        <field name="expiration_date" select="1" string="Expiration date" />
+                        <field name="partner_id" select="1"/>
+                        <field name="user_id" select="1">
+                            <filter domain="[('user_id','=',uid)]" help="Exemptions reviwed by me" icon="terp-personal"/>
+                        </field>
+                   </group>
+                   <newline />
+                   <group expand="0" string="Group By...">
+                       <filter string="Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
+                       <filter string="Reviewer" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
+                       <separator orientation="vertical"/>
+                       <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
+                       <filter string="Review" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'review_state'}"/>
+                       <separator orientation="vertical"/>
+                       <filter string="Effective Date" icon="terp-go-month" domain="[]" context="{'group_by':'effective_date'}"/>
+                       <filter string="Expiration Date" icon="terp-go-month" domain="[]" context="{'group_by':'expiration_date'}"/>
+                       <separator orientation="vertical"/>
+                       <filter string="Jurisdiction" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'jurisdiction_id'}"/>
+                   </group>
+               </search>
+            </field>
+        </record>
+
+        <record id="view_partner_exemption_tree" model="ir.ui.view">
+            <field name="name">view.partner.exemption.tree</field>
+            <field name="model">res.partner.exemption</field>
+            <field name="type">tree</field>
+            <field name="arch" type="xml">
+                <tree string="Exemption" editable="bottom">
+                    <field name="number"/>
+                    <field name="jurisdiction_id"/>
+                    <field name="document_id"/>
+                    <field name="effective_date"/>
+                    <field name="expiration_date"/>
+                    <field name="state"/>
+                    <field name="review_state" invisible="1"/>
+                    <field name="user_id" invisible="1"/>
+                    <field name="partner_id" invisible="1"/>
+                </tree>
+            </field>
+        </record>
+
+        <record id="view_partner_exemption_form" model="ir.ui.view">
+            <field name="name">view.partner.exemption.form</field>
+            <field name="model">res.partner.exemption</field>
+            <field name="type">form</field>
+            <field name="arch" type="xml">
+                <form string="Exemption">
+                    <group col="2" colspan="2">
+                        <field name="number"/>
+                        <field name="number_type"/>
+                        <field name="description"/>
+                    </group>
+                    <group col="2" colspan="2">
+                        <field name="not_expire"/>
+                        <field name="effective_date"/>
+                        <field name="expiration_date"/>
+                    </group>
+                    <group col="2" colspan="2">
+                        <separator string="Certificate Information" colspan="2" col="2"/>
+                        <field name="type"/>
+                        <field name="invoice_purchase_no" attrs="{'invisible':[('type','=','blanket')],'required':[('type','=','single')]}"/>
+                        <field name="country_id" widget="selection"/>
+                        <field name="jurisdiction_id" widget="selection"/>
+                    </group>
+                    <group col="2" colspan="2">
+                        <separator string="Exemption Reason" colspan="2" col="2"/>
+                        <field name="code_id" widget="selection"/>
+                        <field name="description_reason"/>
+                        <field name="description_property"/>
+                     </group>
+                     <group col="2" colspan="2">
+                        <separator string="Document" colspan="2" col="2"/>
+                        <field name="received"/>
+                        <field name="received_date"/>
+                        <field name="document_id" string="Location"/>
+                        <field name="user_id" widget="selection"/>
+                        <field name="rejection_id" widget="selection"/>
+                        <field name="review_state"/>
+                     </group>
+                     <group col="2" colspan="2">
+                        <separator string="Miscellaneous" colspan="2" col="2"/>
+                        <field name="active" groups="base.group_extended"/>
+                        <field name="source"/>
+                     </group>
+                     <newline/>
+                     <group colspan="4">
+                        <field name="state" colspan="4"/>
+                    </group>
+                </form>
+              </field>
+          </record>
+
+        <record id="action_partner_exemption" model="ir.actions.act_window">
+            <field name="name">Exemptions</field>
+            <field name="res_model">res.partner.exemption</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+        </record>
+
+        <menuitem action="action_partner_exemption" id="menu_partner_exemption" parent="base.menu_address_book" sequence="31"/>
+
+    </data>
+</openerp>
\ No newline at end of file

=== added file 'partner_exemption_us/partner_view.xml'
--- partner_exemption_us/partner_view.xml	1970-01-01 00:00:00 +0000
+++ partner_exemption_us/partner_view.xml	2011-09-14 02:18:23 +0000
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+
+        <!--
+        Partner
+        -->
+
+        <record id="view_partner_exemption__form_inherit" model="ir.ui.view">
+            <field name="name">view.partner.exemption.form.inherit</field>
+            <field name="model">res.partner</field>
+            <field name="type">form</field>
+            <field name="inherit_id" ref="base.view_partner_form"/>
+            <field name="arch" type="xml">
+                <page string="History" position="before">
+                    <page string="Exemptions" attrs="{'invisible':[('supplier','=',True)]}">
+                         <field name="exemption_ids" colspan="4" nolabel="1" context="{''default_partner_id:partner_id}"/>
+                    </page>
+                 </page>
+            </field>
+        </record>
+
+    </data>
+</openerp>
\ No newline at end of file

=== added directory 'partner_exemption_us/security'
=== added file 'partner_exemption_us/security/ir.model.access.csv'
--- partner_exemption_us/security/ir.model.access.csv	1970-01-01 00:00:00 +0000
+++ partner_exemption_us/security/ir.model.access.csv	2011-09-14 02:18:23 +0000
@@ -0,0 +1,13 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+"access_res_partner_exemption_account_user","res.partner.exemption.account.user","model_res_partner_exemption","account.group_account_user",1,1,1,1
+"access_res_partner_exemption_account_manager","res.partner.exemption.account.manager","model_res_partner_exemption","account.group_account_manager",1,1,1,1
+"access_res_partner_exemption_user","res.partner.exemption.user","model_res_partner_exemption","base.group_user",1,0,0,0
+"access_res_partner_exemption_account_user","res.partner.exemption.reason.account.user","model_res_partner_exemption_reason","account.group_account_user",1,1,1,1
+"access_res_partner_exemption_account_manager","res.partner.exemption.reason.account.manager","model_res_partner_exemption_reason","account.group_account_manager",1,1,1,1
+"access_res_partner_exemption_user","res.partner.exemption.reason.user","model_res_partner_exemption_reason","base.group_user",1,0,0,0
+"access_res_partner_exemption_account_user","res.partner.exemption.rejection.account.user","model_res_partner_exemption_rejection","account.group_account_user",1,1,1,1
+"access_res_partner_exemption_account_manager","res.partner.exemption.rejection.account.manager","model_res_partner_exemption_rejection","account.group_account_manager",1,1,1,1
+"access_res_partner_exemption_user","res.partner.exemption.rejection.user","model_res_partner_exemption_rejection","base.group_user",1,0,0,0
+"access_tax_jurisdiction_account_user","tax.jurisdiction.account.user","model_tax_jurisdiction","account.group_account_user",1,1,1,1
+"access_tax_jurisdiction_account_manager","tax.jurisdiction.account.manager","model_tax_jurisdiction","account.group_account_manager",1,1,1,1
+"access_tax_jurisdiction_user","tax.jurisdiction.user","model_tax_jurisdiction","base.group_user",1,0,0,0