Merge lp:~npg-team/openobject-addons/partner_exemption_us into lp:openobject-addons/extra-trunk

Proposed by Novapoint Group
Status: Needs review
Proposed branch: lp:~npg-team/openobject-addons/partner_exemption_us
Merge into: lp:openobject-addons/extra-trunk
Diff against target: 766 lines (+720/-0)
8 files modified
partner_exemption_us/__init__.py (+26/-0)
partner_exemption_us/__openerp__.py (+87/-0)
partner_exemption_us/partner.py (+32/-0)
partner_exemption_us/partner_exemption_us.py (+120/-0)
partner_exemption_us/partner_exemption_us_demo.xml (+174/-0)
partner_exemption_us/partner_exemption_us_view.xml (+244/-0)
partner_exemption_us/partner_view.xml (+24/-0)
partner_exemption_us/security/ir.model.access.csv (+13/-0)
To merge this branch: bzr merge lp:~npg-team/openobject-addons/partner_exemption_us
Reviewer Review Type Date Requested Status
Numérigraphe module naming convention (again) Needs Fixing
US Localization Team Pending
Gustavo Adrian Marino Pending
Review via email: mp+75291@code.launchpad.net

Commit message

[MERGE] New module "partner_exemption_us" to handle partner's tax exemptions, by NovaPoint Group LLC

Description of the change

Added a module for tracking exemption certificate for USA.

To post a comment you must log in.
Revision history for this message
Numérigraphe (numerigraphe) wrote :

Dear Rima Vora,
Thanks for your proposal.
Technically your module looks fine, I see no reason not to merge it. I appreciate the ample documentation.
May I only suggest you rename the module to something showing it's for the US only, like "l10n_us_exemption"?

Functionally I can make no judgment. I'll only add that if you think this is a module that most US companies should use, you should direct your proposal to the main addons instead - I know the core team enjoys contributions to the localization.

Lionel Sausin.

review: Needs Fixing (module naming convention)
Revision history for this message
Gustavo Adrian Marino (gamarino) wrote :

Dear Rima Vora,
Dear Lionel,

I agree with Lionel: technically is fine and I congratulate Rima for the documentation.
I wish we could manage to achieve the same level of documentation in many other modules (including my modules...)!

I don't agree in the suggestion to segregate the module as something only US related.
Technically, nothing prevents you to use this module in other country implementations (neither dependencies nor the way the module is coded). The only real point of contact where you can find something strongly US related is on demo data, which is correctly indicated as an US demo data, and thus really not critical.

The concept of tax exceptions can be found in almost all countries. Perhaps a different set of fields is needed, but that can be easilly added extending this module, and thus we provide a starting common module for an issue that for sure is touching every single localization.

I think is better to promote this module as a general base for a general exemption concept, and to promote extending it for local needs fullfilment

Gustavo Marino.

Revision history for this message
Numérigraphe (numerigraphe) wrote :

Approving after Gustavo Adrian Marino's comment.

review: Approve
Revision history for this message
Numérigraphe (numerigraphe) wrote :

Dear Gustavo Adrian Marino,
I see your point, but I think the module name is still wrong.
If this is a generic module, no mention of the US should be made: I suggest "partner_exemption".
Please let me know all if you agree - then I can rename it when I merge the branch.
Lionel.

review: Needs Fixing (module naming convention (again))
Revision history for this message
Numérigraphe (numerigraphe) wrote :

Dear Rima Vora,
Please let me suggest you to change your copyright notices too: you don't need to attribute copyrights to OpenERP SA (they suggested I don't do it on a module of ours recently).
Lionel.

Unmerged revisions

2. By Novapoint Group

[IMP]: Removed the dependency of account module

1. By Novapoint Group

Added module: partner_exemption_us: Tracking of Exemption Certificates

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'partner_exemption_us'
2=== added file 'partner_exemption_us/__init__.py'
3--- partner_exemption_us/__init__.py 1970-01-01 00:00:00 +0000
4+++ partner_exemption_us/__init__.py 2011-09-14 02:18:23 +0000
5@@ -0,0 +1,26 @@
6+# -*- coding: utf-8 -*-
7+##############################################################################
8+#
9+# OpenERP, Open Source Management Solution
10+# Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>)
11+# Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>)
12+#
13+# This program is free software: you can redistribute it and/or modify
14+# it under the terms of the GNU Affero General Public License as
15+# published by the Free Software Foundation, either version 3 of the
16+# License, or (at your option) any later version.
17+#
18+# This program is distributed in the hope that it will be useful,
19+# but WITHOUT ANY WARRANTY; without even the implied warranty of
20+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21+# GNU Affero General Public License for more details.
22+#
23+# You should have received a copy of the GNU Affero General Public License
24+# along with this program. If not, see <http://www.gnu.org/licenses/>.
25+#
26+##############################################################################
27+
28+import partner
29+import partner_exemption_us
30+
31+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
32\ No newline at end of file
33
34=== added file 'partner_exemption_us/__openerp__.py'
35--- partner_exemption_us/__openerp__.py 1970-01-01 00:00:00 +0000
36+++ partner_exemption_us/__openerp__.py 2011-09-14 02:18:23 +0000
37@@ -0,0 +1,87 @@
38+# -*- coding: utf-8 -*-
39+##############################################################################
40+#
41+# OpenERP, Open Source Management Solution
42+# Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>)
43+# Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>)
44+#
45+# This program is free software: you can redistribute it and/or modify
46+# it under the terms of the GNU Affero General Public License as
47+# published by the Free Software Foundation, either version 3 of the
48+# License, or (at your option) any later version.
49+#
50+# This program is distributed in the hope that it will be useful,
51+# but WITHOUT ANY WARRANTY; without even the implied warranty of
52+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
53+# GNU Affero General Public License for more details.
54+#
55+# You should have received a copy of the GNU Affero General Public License
56+# along with this program. If not, see <http://www.gnu.org/licenses/>.
57+#
58+##############################################################################
59+{
60+ "name" : "Tax Exemption Management",
61+ "version" : "1.0",
62+ "author" : 'Novapoint Group LLC',
63+ "description": """
64+This module helps manage and track sales tax exemptions at the partner level. The module has the following
65+capabilities:
66+• Individual states/or other tax jurisdictions certificate of exemptions are tracked
67+• Exemption reasons are tracked for each entry
68+• The exemption identification number is tracked for each entry
69+• Effective dates are tracked if available for each entry since exemptions must be renewed from time to
70+time and expire
71+• The “State” (aka status) of an exemption is tracked.
72+• Allows historical exemption numbers (multi-entries per state) to be tracked over time to support audit
73+activities.
74+• Each entry can be pointed to the image of the Certificate either held in a third party document system
75+or in OpenERP if document management is installed (Auditors will want to see the signed certificate
76+provided by the customer to the company during an audit)
77+• The name of the exemption form used to validate the exemption
78+• Track the name of the signer of the certificate for a buying company
79+
80+This module is modeled after the fields from the “Streamlined Sales and Use Tax Agreement” multi-state
81+Certificate of Exemption form.
82+
83+This adds additional fields to the partner record.
84+
85+General Rules (see your tax advisor and accountant)
86+As a general rule, sellers are required to maintain proper records for exempt transactions and provide those
87+records to member states and auditors when requested. These certificates may be provided in paper or
88+electronic form. A seller is typically relieved of the responsibility for collecting and remitting sales tax on the
89+sale or sales that a purchaser provided a seller an exemption certificate. These are based on certain condition
90+which the seller should investigate. Each State/Tax jurisdiction has different rules and a customer may be
91+exempt from sales taxes (for resale goods) in one tax jurisdiction and non-exempt in the other. Over time
92+this module builds exemption histories and helps when a company is audited for their historical sales tax
93+compliance. Accounting Auditors look at accurate tracking of exemptions to validate if taxes have been charged
94+appropriately.
95+
96+Any company in the US that sells goods and services B2B should track exemptions. And companies themselves
97+should track their own exemption status. This module is designed to help monitor and track exemption
98+certificates for both customers and for a “Sellers” own accounts.
99+
100+*** Future development plans *** (Feel free to enhance this module – or donate funds to
101+www.novapointgroup.com to enhance it for you).
102+1. Improve the module to incorporate workflow and notifications to help improve management of
103+certificate. Phase I – is setup to allow tracking of exemption certificates. Phase II – will help to facilitate
104+requesting exemption certificates. Including tracking the interactions/correspondence.
105+2. Create and track applicable exemption status options at the individual state/tax jurisdiction level. Each
106+state may not support the full list of “exemption reasons”.""",
107+ "category" : "Generic Modules/Accounting",
108+ "website" : "http://www.novapointgroup.com/",
109+ "depends" : ["base"],
110+ "init_xml" : [],
111+ "demo_xml" : [
112+ "partner_exemption_us_demo.xml"
113+ ],
114+ "update_xml" : [
115+ "partner_exemption_us_view.xml",
116+ "partner_view.xml",
117+# "security/ir.model.access.csv",
118+ ],
119+ "test" : [],
120+ "active": False,
121+ "installable": True,
122+}
123+
124+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
125
126=== added file 'partner_exemption_us/partner.py'
127--- partner_exemption_us/partner.py 1970-01-01 00:00:00 +0000
128+++ partner_exemption_us/partner.py 2011-09-14 02:18:23 +0000
129@@ -0,0 +1,32 @@
130+# -*- coding: utf-8 -*-
131+##############################################################################
132+#
133+# OpenERP, Open Source Management Solution
134+# Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>)
135+# Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>)
136+#
137+# This program is free software: you can redistribute it and/or modify
138+# it under the terms of the GNU Affero General Public License as
139+# published by the Free Software Foundation, either version 3 of the
140+# License, or (at your option) any later version.
141+#
142+# This program is distributed in the hope that it will be useful,
143+# but WITHOUT ANY WARRANTY; without even the implied warranty of
144+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
145+# GNU Affero General Public License for more details.
146+#
147+# You should have received a copy of the GNU Affero General Public License
148+# along with this program. If not, see <http://www.gnu.org/licenses/>.
149+#
150+##############################################################################
151+from osv import osv, fields
152+
153+class res_partner(osv.osv):
154+ _inherit = 'res.partner'
155+ _columns = {
156+ 'exemption_ids': fields.one2many('res.partner.exemption', 'partner_id', help="Exemption Certificates for each partner")
157+ }
158+
159+res_partner()
160+
161+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
162\ No newline at end of file
163
164=== added file 'partner_exemption_us/partner_exemption_us.py'
165--- partner_exemption_us/partner_exemption_us.py 1970-01-01 00:00:00 +0000
166+++ partner_exemption_us/partner_exemption_us.py 2011-09-14 02:18:23 +0000
167@@ -0,0 +1,120 @@
168+# -*- coding: utf-8 -*-
169+##############################################################################
170+#
171+# OpenERP, Open Source Management Solution
172+# Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>)
173+# Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>)
174+#
175+# This program is free software: you can redistribute it and/or modify
176+# it under the terms of the GNU Affero General Public License as
177+# published by the Free Software Foundation, either version 3 of the
178+# License, or (at your option) any later version.
179+#
180+# This program is distributed in the hope that it will be useful,
181+# but WITHOUT ANY WARRANTY; without even the implied warranty of
182+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
183+# GNU Affero General Public License for more details.
184+#
185+# You should have received a copy of the GNU Affero General Public License
186+# along with this program. If not, see <http://www.gnu.org/licenses/>.
187+#
188+##############################################################################
189+import time
190+
191+from osv import osv, fields
192+
193+class res_partner_exemption_rejection(osv.osv):
194+ _name = "res.partner.exemption.rejection"
195+ _description = "Exemption Rejection Code"
196+ _columns = {
197+ 'name': fields.char('Reason', size=32, required=True),
198+ 'code': fields.char('code', size=32)
199+ }
200+
201+ def name_get(self, cr, uid, ids, context=None):
202+ if not ids:
203+ return []
204+ reads = self.read(cr, uid, ids, ['name', 'code'], context=context)
205+ res = []
206+ for record in reads:
207+ name = record['name']
208+ if record['code']:
209+ name = '(' + record['code'] + ')' + ' ' + name
210+ res.append((record['id'], name))
211+ return res
212+
213+res_partner_exemption_rejection()
214+
215+class res_partner_exemption_reason(osv.osv):
216+ _name = 'res.partner.exemption.reason'
217+ _description = 'Exemption Reason Code'
218+ _columns = {
219+ 'name': fields.char('Description', size=64, required=True),
220+ 'code': fields.char('Code', size=1)
221+ }
222+
223+ def name_get(self, cr, uid, ids, context=None):
224+ if not ids:
225+ return []
226+ reads = self.read(cr, uid, ids, ['name', 'code'], context=context)
227+ res = []
228+ for record in reads:
229+ name = record['name']
230+ if record['code']:
231+ name = '(' + record['code'] + ')' + ' ' + name
232+ res.append((record['id'], name))
233+ return res
234+
235+res_partner_exemption_reason()
236+
237+class tax_jurisdiction(osv.osv):
238+ _name = 'tax.jurisdiction'
239+ _description = 'Tax Jurisdiction'
240+ _columns = {
241+ 'name': fields.char('Name', size=32, required=True),
242+ 'country_id': fields.many2one('res.country', 'Country', help="The country that issued exemption"),
243+ 'state_id': fields.many2one('res.country.state', 'State', help="The state that issued exemption"),
244+ 'city': fields.char('City', size=64),
245+ }
246+
247+tax_jurisdiction()
248+
249+class res_partner_exemption(osv.osv):
250+ _name = 'res.partner.exemption'
251+ _description = 'Partner Exemption'
252+ _rec_name = 'number'
253+ _columns = {
254+ 'description': fields.char('Decription', size=32, help="Describes the certificate"),
255+ 'partner_id': fields.many2one('res.partner', 'Partner'),
256+ 'number': fields.char('Exemption Number', size=32, help="Unique Identifier of an exemption certificate", required=True),
257+ '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"),
258+ '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"),
259+ '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"),
260+ 'code_id': fields.many2one('res.partner.exemption.reason', 'Exemption Reason Code', help="Indicates the reason for exemption"),
261+ '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"),
262+ 'effective_date': fields.date('Effective Date', help="Issue date of the exemption certificate"),
263+ 'description_reason': fields.text('Description of Reason ', size=64, help="General description of exemption reason"),
264+ '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"),
265+ 'country_id': fields.many2one('res.country', 'Issuing Country', help='The country which issued exemption certificate.'),
266+ 'source': fields.char('Source', size=32, help="Source of the certificate"),
267+ 'user_id': fields.many2one('res.users', 'Reviewed By', help='The user who reviewed the exemption certificate document'),
268+ 'rejection_id': fields.many2one('res.partner.exemption.rejection', 'Rejection Reason', help='The reason why a submitted certificate was rejected.'),
269+ 'expiration_date': fields.date('Expiration Date', help="Expiration date of the exemption certificate entry"),
270+ 'received_date': fields.date('Received Date', help="Date when the copy of exemption certificate document was received from the buyer."),
271+ 'not_expire':fields.boolean('Does Not Expire', help="Indicates if the certificate doesn't expires."),
272+ 'received':fields.boolean('Received', help="Indicates if a certificate document was received and is on file."),
273+ 'document_id': fields.many2one('ir.attachment', 'Document', help="The actual location of the the certificate document"),
274+ 'jurisdiction_id': fields.many2one('tax.jurisdiction', 'Jurisdiction', required=True, help='The Tax Jurisdiction for which the exemption is valid.'),
275+ '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"),
276+ 'active':fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the exemption without removing it.")
277+ }
278+
279+ _defaults = {
280+ 'type': 'blanket',
281+ 'active': True,
282+ 'state': 'draft',
283+ 'review_state': 'draft'
284+ }
285+res_partner_exemption()
286+
287+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
288
289=== added file 'partner_exemption_us/partner_exemption_us_demo.xml'
290--- partner_exemption_us/partner_exemption_us_demo.xml 1970-01-01 00:00:00 +0000
291+++ partner_exemption_us/partner_exemption_us_demo.xml 2011-09-14 02:18:23 +0000
292@@ -0,0 +1,174 @@
293+<?xml version="1.0" encoding="utf-8"?>
294+<openerp>
295+ <data>
296+
297+ <!--
298+ Partner Exemption Reason
299+ -->
300+
301+ <record id="federal_government_type" model="res.partner.exemption.reason">
302+ <field name="name">Federal Government</field>
303+ <field name="code">A</field>
304+ </record>
305+
306+ <record id="state_government_type" model="res.partner.exemption.reason">
307+ <field name="name">State Government</field>
308+ <field name="code">B</field>
309+ </record>
310+
311+ <record id="tribe_indian_band_type" model="res.partner.exemption.reason">
312+ <field name="name">Tribe / Status Indian / Indian Band</field>
313+ <field name="code">C</field>
314+ </record>
315+
316+ <record id="foreign_diplomat_type" model="res.partner.exemption.reason">
317+ <field name="name">Foreign Diplomat</field>
318+ <field name="code">D</field>
319+ </record>
320+
321+ <record id="charitable_org_type" model="res.partner.exemption.reason">
322+ <field name="name">Charitable or Benevolent Org</field>
323+ <field name="code">E</field>
324+ </record>
325+
326+ <record id="religious_eductional_org_type" model="res.partner.exemption.reason">
327+ <field name="name">Religious or Educational Org</field>
328+ <field name="code">F</field>
329+ </record>
330+
331+ <record id="resale_type" model="res.partner.exemption.reason">
332+ <field name="name">Resale</field>
333+ <field name="code">G</field>
334+ </record>
335+
336+ <record id="commercial_agriculture_production_type" model="res.partner.exemption.reason">
337+ <field name="name">Commercial Agricultural Production</field>
338+ <field name="code">H</field>
339+ </record>
340+
341+ <record id="industrial_manufacturer_type" model="res.partner.exemption.reason">
342+ <field name="name">Industrial Production / Manufacturer</field>
343+ <field name="code">I</field>
344+ </record>
345+
346+ <record id="direct_pay_permit_type" model="res.partner.exemption.reason">
347+ <field name="name">Direct Pay Permit</field>
348+ <field name="code">J</field>
349+ </record>
350+
351+ <record id="direct_mail_type" model="res.partner.exemption.reason">
352+ <field name="name">Direct Mail</field>
353+ <field name="code">K</field>
354+ </record>
355+
356+ <record id="other_type" model="res.partner.exemption.reason">
357+ <field name="name">Other</field>
358+ <field name="code">L</field>
359+ </record>
360+
361+ <record id="local_government_type" model="res.partner.exemption.reason">
362+ <field name="name">Local Government</field>
363+ <field name="code">N</field>
364+ </record>
365+
366+ <record id="commercial_aquaculture_type" model="res.partner.exemption.reason">
367+ <field name="name">Commercial Aquaculture</field>
368+ <field name="code">P</field>
369+ </record>
370+
371+ <record id="commercial_fishery_type" model="res.partner.exemption.reason">
372+ <field name="name">Commercial Fishery</field>
373+ <field name="code">Q</field>
374+ </record>
375+
376+ <record id="non_resident_type" model="res.partner.exemption.reason">
377+ <field name="name">Non-Resident</field>
378+ <field name="code">R</field>
379+ </record>
380+
381+ <!--
382+ Partner Categories
383+ -->
384+
385+ <record id="res_partner_category_accommodation" model="res.partner.category">
386+ <field name="name">Accommodation and food services</field>
387+ </record>
388+
389+ <record id="res_partner_category_agriculture" model="res.partner.category">
390+ <field name="name">Agricultural, forestry, fishing and hunting</field>
391+ </record>
392+
393+ <record id="res_partner_category_construction" model="res.partner.category">
394+ <field name="name">Construction</field>
395+ </record>
396+
397+ <record id="res_partner_category_finance" model="res.partner.category">
398+ <field name="name">Finance and insurance</field>
399+ </record>
400+
401+ <record id="res_partner_category_information" model="res.partner.category">
402+ <field name="name">Information, publishing and communications</field>
403+ </record>
404+
405+ <record id="res_partner_category_mining" model="res.partner.category">
406+ <field name="name">Mining</field>
407+ </record>
408+
409+ <record id="res_partner_category_real_estate" model="res.partner.category">
410+ <field name="name">Real estate</field>
411+ </record>
412+
413+ <record id="res_partner_category_rental" model="res.partner.category">
414+ <field name="name">Rental and leasing</field>
415+ </record>
416+
417+ <record id="res_partner_category_professional" model="res.partner.category">
418+ <field name="name">Professional services</field>
419+ </record>
420+
421+ <record id="res_partner_category_business" model="res.partner.category">
422+ <field name="name">Business services</field>
423+ </record>
424+
425+ <record id="res_partner_category_utilities" model="res.partner.category">
426+ <field name="name">Utilities</field>
427+ </record>
428+
429+ <record id="res_partner_category_transportation" model="res.partner.category">
430+ <field name="name">Transportation and warehousing</field>
431+ </record>
432+
433+ <record id="res_partner_category_wholesale" model="res.partner.category">
434+ <field name="name">Wholesale trade</field>
435+ </record>
436+
437+ <record id="res_partner_category_retail" model="res.partner.category">
438+ <field name="name">Retail trade</field>
439+ </record>
440+
441+ <record id="res_partner_category_manufacturing" model="res.partner.category">
442+ <field name="name">Manufacturing</field>
443+ </record>
444+
445+ <record id="res_partner_category_government" model="res.partner.category">
446+ <field name="name">Government</field>
447+ </record>
448+
449+ <record id="res_partner_category_not_business" model="res.partner.category">
450+ <field name="name">Not a business</field>
451+ </record>
452+
453+ <record id="res_partner_category_education" model="res.partner.category">
454+ <field name="name">Education and health-care services</field>
455+ </record>
456+
457+ <record id="res_partner_category_npo" model="res.partner.category">
458+ <field name="name">Nonprofit organization</field>
459+ </record>
460+
461+ <record id="res_partner_category_other" model="res.partner.category">
462+ <field name="name">Other</field>
463+ </record>
464+
465+ </data>
466+</openerp>
467\ No newline at end of file
468
469=== added file 'partner_exemption_us/partner_exemption_us_view.xml'
470--- partner_exemption_us/partner_exemption_us_view.xml 1970-01-01 00:00:00 +0000
471+++ partner_exemption_us/partner_exemption_us_view.xml 2011-09-14 02:18:23 +0000
472@@ -0,0 +1,244 @@
473+<?xml version="1.0" encoding="utf-8"?>
474+<openerp>
475+ <data>
476+
477+ <menuitem id="exemption_config_main" name="Exemption" parent="base.menu_config_address_book" sequence="2"/>
478+
479+ <!--
480+ Tax Jurisdiction
481+ -->
482+
483+ <record id="view_tax_jurisdiction_tree" model="ir.ui.view">
484+ <field name="name">view.tax.jurisdiction.tree</field>
485+ <field name="model">tax.jurisdiction</field>
486+ <field name="type">tree</field>
487+ <field name="arch" type="xml">
488+ <tree string="Tax Jurisdiction" editable="bottom">
489+ <field name="name"/>
490+ <field name="country_id"/>
491+ <field name="state_id"/>
492+ <field name="city"/>
493+ </tree>
494+ </field>
495+ </record>
496+
497+ <record id="view_tax_jurisdiction_form" model="ir.ui.view">
498+ <field name="name">view.tax.jurisdiction.form</field>
499+ <field name="model">tax.jurisdiction</field>
500+ <field name="type">form</field>
501+ <field name="arch" type="xml">
502+ <form string="Tax Jurisdiction">
503+ <field name="name"/>
504+ <field name="country_id"/>
505+ <field name="state_id"/>
506+ <field name="city"/>
507+ </form>
508+ </field>
509+ </record>
510+
511+ <record id="action_tax_jurisdiction" model="ir.actions.act_window">
512+ <field name="name">Jurisdictions</field>
513+ <field name="res_model">tax.jurisdiction</field>
514+ <field name="view_type">form</field>
515+ <field name="view_mode">tree,form</field>
516+ </record>
517+
518+ <menuitem action="action_tax_jurisdiction" id="menu_tax_jurisdiction" parent="exemption_config_main" sequence="9"/>
519+
520+ <!--
521+ Partner Rejection Code
522+ -->
523+
524+ <record id="view_res_partner_exemption_rejection_tree" model="ir.ui.view">
525+ <field name="name">res.partner.exemption.rejection.tree</field>
526+ <field name="model">res.partner.exemption.rejection</field>
527+ <field name="type">tree</field>
528+ <field name="arch" type="xml">
529+ <tree string="Exemption Rejection Code" editable="bottom">
530+ <field name="name"/>
531+ <field name="code"/>
532+ </tree>
533+ </field>
534+ </record>
535+
536+ <record id="view_res_partner_exemption_reason_form" model="ir.ui.view">
537+ <field name="name">res.partner.exemption.reason.form</field>
538+ <field name="model">res.partner.exemption.reason</field>
539+ <field name="type">form</field>
540+ <field name="arch" type="xml">
541+ <form string="Exemption Rejection Code">
542+ <field name="name"/>
543+ <field name="code"/>
544+ </form>
545+ </field>
546+ </record>
547+
548+ <record id="action_exemption_rejection" model="ir.actions.act_window">
549+ <field name="name">Exemption Rejection Code</field>
550+ <field name="res_model">res.partner.exemption.rejection</field>
551+ <field name="view_type">form</field>
552+ <field name="view_mode">tree,form</field>
553+ </record>
554+
555+ <menuitem action="action_exemption_rejection" id="menu_exemption_rejection" parent="exemption_config_main"/>
556+
557+ <!--
558+ Partner Exemption Code
559+ -->
560+
561+ <record id="view_res_partner_exemption_reason_tree" model="ir.ui.view">
562+ <field name="name">res.partner.exemption.reason.tree</field>
563+ <field name="model">res.partner.exemption.reason</field>
564+ <field name="type">tree</field>
565+ <field name="arch" type="xml">
566+ <tree string="Exemption Reason Code" editable="bottom">
567+ <field name="name"/>
568+ <field name="code"/>
569+ </tree>
570+ </field>
571+ </record>
572+
573+ <record id="view_res_partner_exemption_reason_form" model="ir.ui.view">
574+ <field name="name">res.partner.exemption.reason.form</field>
575+ <field name="model">res.partner.exemption.reason</field>
576+ <field name="type">form</field>
577+ <field name="arch" type="xml">
578+ <form string="Exemption Reason Code">
579+ <field name="name"/>
580+ <field name="code"/>
581+ </form>
582+ </field>
583+ </record>
584+
585+ <record id="action_exemption_reason" model="ir.actions.act_window">
586+ <field name="name">Exemption Reason Code</field>
587+ <field name="res_model">res.partner.exemption.reason</field>
588+ <field name="view_type">form</field>
589+ <field name="view_mode">tree,form</field>
590+ </record>
591+
592+ <menuitem action="action_exemption_reason" id="menu_exemption_reason" parent="exemption_config_main"/>
593+
594+ <!--
595+ Partner Exemption
596+ -->
597+
598+ <record id="view_partner_exemption_filter" model="ir.ui.view">
599+ <field name="name">res.partner.exemption.filter</field>
600+ <field name="model">res.partner.exemption</field>
601+ <field name="type">search</field>
602+ <field name="arch" type="xml">
603+ <search string="Search Exemption">
604+ <group col='10' colspan='4'>
605+ <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Exemptions that are Draft"/>
606+ <filter icon="terp-check" string="Active" domain="[('state','=','active')]" help="Exemptions that are Active"/>
607+ <filter icon="terp-gtk-media-pause" string="Pending Review" domain="[('state','=','pending')]" help="Exemptions whose review is pending"/>
608+ <filter icon="terp-dialog-close" string="Expired,Rejected" domain="[('state','in',['expired','rejected'])]" help="Exemptions that are Expired or Rejected"/>
609+ <separator orientation="vertical"/>
610+ <field name="number" select="1"/>
611+ <field name="jurisdiction_id" select="1"/>
612+ <field name="effective_date" select="1" string="Effective date" />
613+ <field name="expiration_date" select="1" string="Expiration date" />
614+ <field name="partner_id" select="1"/>
615+ <field name="user_id" select="1">
616+ <filter domain="[('user_id','=',uid)]" help="Exemptions reviwed by me" icon="terp-personal"/>
617+ </field>
618+ </group>
619+ <newline />
620+ <group expand="0" string="Group By...">
621+ <filter string="Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
622+ <filter string="Reviewer" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
623+ <separator orientation="vertical"/>
624+ <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
625+ <filter string="Review" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'review_state'}"/>
626+ <separator orientation="vertical"/>
627+ <filter string="Effective Date" icon="terp-go-month" domain="[]" context="{'group_by':'effective_date'}"/>
628+ <filter string="Expiration Date" icon="terp-go-month" domain="[]" context="{'group_by':'expiration_date'}"/>
629+ <separator orientation="vertical"/>
630+ <filter string="Jurisdiction" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'jurisdiction_id'}"/>
631+ </group>
632+ </search>
633+ </field>
634+ </record>
635+
636+ <record id="view_partner_exemption_tree" model="ir.ui.view">
637+ <field name="name">view.partner.exemption.tree</field>
638+ <field name="model">res.partner.exemption</field>
639+ <field name="type">tree</field>
640+ <field name="arch" type="xml">
641+ <tree string="Exemption" editable="bottom">
642+ <field name="number"/>
643+ <field name="jurisdiction_id"/>
644+ <field name="document_id"/>
645+ <field name="effective_date"/>
646+ <field name="expiration_date"/>
647+ <field name="state"/>
648+ <field name="review_state" invisible="1"/>
649+ <field name="user_id" invisible="1"/>
650+ <field name="partner_id" invisible="1"/>
651+ </tree>
652+ </field>
653+ </record>
654+
655+ <record id="view_partner_exemption_form" model="ir.ui.view">
656+ <field name="name">view.partner.exemption.form</field>
657+ <field name="model">res.partner.exemption</field>
658+ <field name="type">form</field>
659+ <field name="arch" type="xml">
660+ <form string="Exemption">
661+ <group col="2" colspan="2">
662+ <field name="number"/>
663+ <field name="number_type"/>
664+ <field name="description"/>
665+ </group>
666+ <group col="2" colspan="2">
667+ <field name="not_expire"/>
668+ <field name="effective_date"/>
669+ <field name="expiration_date"/>
670+ </group>
671+ <group col="2" colspan="2">
672+ <separator string="Certificate Information" colspan="2" col="2"/>
673+ <field name="type"/>
674+ <field name="invoice_purchase_no" attrs="{'invisible':[('type','=','blanket')],'required':[('type','=','single')]}"/>
675+ <field name="country_id" widget="selection"/>
676+ <field name="jurisdiction_id" widget="selection"/>
677+ </group>
678+ <group col="2" colspan="2">
679+ <separator string="Exemption Reason" colspan="2" col="2"/>
680+ <field name="code_id" widget="selection"/>
681+ <field name="description_reason"/>
682+ <field name="description_property"/>
683+ </group>
684+ <group col="2" colspan="2">
685+ <separator string="Document" colspan="2" col="2"/>
686+ <field name="received"/>
687+ <field name="received_date"/>
688+ <field name="document_id" string="Location"/>
689+ <field name="user_id" widget="selection"/>
690+ <field name="rejection_id" widget="selection"/>
691+ <field name="review_state"/>
692+ </group>
693+ <group col="2" colspan="2">
694+ <separator string="Miscellaneous" colspan="2" col="2"/>
695+ <field name="active" groups="base.group_extended"/>
696+ <field name="source"/>
697+ </group>
698+ <newline/>
699+ <group colspan="4">
700+ <field name="state" colspan="4"/>
701+ </group>
702+ </form>
703+ </field>
704+ </record>
705+
706+ <record id="action_partner_exemption" model="ir.actions.act_window">
707+ <field name="name">Exemptions</field>
708+ <field name="res_model">res.partner.exemption</field>
709+ <field name="view_type">form</field>
710+ <field name="view_mode">tree,form</field>
711+ </record>
712+
713+ <menuitem action="action_partner_exemption" id="menu_partner_exemption" parent="base.menu_address_book" sequence="31"/>
714+
715+ </data>
716+</openerp>
717\ No newline at end of file
718
719=== added file 'partner_exemption_us/partner_view.xml'
720--- partner_exemption_us/partner_view.xml 1970-01-01 00:00:00 +0000
721+++ partner_exemption_us/partner_view.xml 2011-09-14 02:18:23 +0000
722@@ -0,0 +1,24 @@
723+<?xml version="1.0" encoding="utf-8"?>
724+<openerp>
725+ <data>
726+
727+ <!--
728+ Partner
729+ -->
730+
731+ <record id="view_partner_exemption__form_inherit" model="ir.ui.view">
732+ <field name="name">view.partner.exemption.form.inherit</field>
733+ <field name="model">res.partner</field>
734+ <field name="type">form</field>
735+ <field name="inherit_id" ref="base.view_partner_form"/>
736+ <field name="arch" type="xml">
737+ <page string="History" position="before">
738+ <page string="Exemptions" attrs="{'invisible':[('supplier','=',True)]}">
739+ <field name="exemption_ids" colspan="4" nolabel="1" context="{''default_partner_id:partner_id}"/>
740+ </page>
741+ </page>
742+ </field>
743+ </record>
744+
745+ </data>
746+</openerp>
747\ No newline at end of file
748
749=== added directory 'partner_exemption_us/security'
750=== added file 'partner_exemption_us/security/ir.model.access.csv'
751--- partner_exemption_us/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
752+++ partner_exemption_us/security/ir.model.access.csv 2011-09-14 02:18:23 +0000
753@@ -0,0 +1,13 @@
754+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
755+"access_res_partner_exemption_account_user","res.partner.exemption.account.user","model_res_partner_exemption","account.group_account_user",1,1,1,1
756+"access_res_partner_exemption_account_manager","res.partner.exemption.account.manager","model_res_partner_exemption","account.group_account_manager",1,1,1,1
757+"access_res_partner_exemption_user","res.partner.exemption.user","model_res_partner_exemption","base.group_user",1,0,0,0
758+"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
759+"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
760+"access_res_partner_exemption_user","res.partner.exemption.reason.user","model_res_partner_exemption_reason","base.group_user",1,0,0,0
761+"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
762+"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
763+"access_res_partner_exemption_user","res.partner.exemption.rejection.user","model_res_partner_exemption_rejection","base.group_user",1,0,0,0
764+"access_tax_jurisdiction_account_user","tax.jurisdiction.account.user","model_tax_jurisdiction","account.group_account_user",1,1,1,1
765+"access_tax_jurisdiction_account_manager","tax.jurisdiction.account.manager","model_tax_jurisdiction","account.group_account_manager",1,1,1,1
766+"access_tax_jurisdiction_user","tax.jurisdiction.user","model_tax_jurisdiction","base.group_user",1,0,0,0

Subscribers

People subscribed via source and target branches