Merge lp:~vauxoo/addons-vauxoo/7.0-purchase_requisition_contract_analyst-dev-1482-kty into lp:addons-vauxoo/7.0

Proposed by Katherine Zaoral (Vauxoo)
Status: Merged
Merged at revision: 1021
Proposed branch: lp:~vauxoo/addons-vauxoo/7.0-purchase_requisition_contract_analyst-dev-1482-kty
Merge into: lp:addons-vauxoo/7.0
Diff against target: 287 lines (+229/-0)
7 files modified
purchase_requisition_contract_analyst/__init__.py (+27/-0)
purchase_requisition_contract_analyst/__openerp__.py (+53/-0)
purchase_requisition_contract_analyst/model/__init__.py (+26/-0)
purchase_requisition_contract_analyst/model/purchase_requisition.py (+39/-0)
purchase_requisition_contract_analyst/security/purchase_requisition_security.xml (+14/-0)
purchase_requisition_contract_analyst/view/purchase_requisition_view.xml (+45/-0)
purchase_requisition_contract_analyst/wizard/__init__.py (+25/-0)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/7.0-purchase_requisition_contract_analyst-dev-1482-kty
Reviewer Review Type Date Requested Status
Katherine Zaoral (Vauxoo) Approve
Review via email: mp+221456@code.launchpad.net

Description of the change

[MERGE] add new module purchase_requisition_contract_analyst that adds to the purchase requisition a contract analyst field with the security and the search filters needed.

To post a comment you must log in.
Revision history for this message
Katherine Zaoral (Vauxoo) (kathy-zaoral) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'purchase_requisition_contract_analyst'
2=== added file 'purchase_requisition_contract_analyst/__init__.py'
3--- purchase_requisition_contract_analyst/__init__.py 1970-01-01 00:00:00 +0000
4+++ purchase_requisition_contract_analyst/__init__.py 2014-05-29 20:01:25 +0000
5@@ -0,0 +1,27 @@
6+#!/usr/bin/python
7+# -*- encoding: utf-8 -*-
8+###############################################################################
9+# Module Writen to OpenERP, Open Source Management Solution
10+# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
11+# All Rights Reserved
12+############# Credits #########################################################
13+# Coded by: Katherine Zaoral <kathy@vauxoo.com>
14+# Planified by: Humberto Arocha <hbto@vauxoo.com>
15+# Audited by: Humberto Arocha <hbto@vauxoo.com>
16+###############################################################################
17+# This program is free software: you can redistribute it and/or modify
18+# it under the terms of the GNU Affero General Public License as published
19+# by the Free Software Foundation, either version 3 of the License, or
20+# (at your option) any later version.
21+#
22+# This program is distributed in the hope that it will be useful,
23+# but WITHOUT ANY WARRANTY; without even the implied warranty of
24+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25+# GNU Affero General Public License for more details.
26+#
27+# You should have received a copy of the GNU Affero General Public License
28+# along with this program. If not, see <http://www.gnu.org/licenses/>.
29+###############################################################################
30+
31+import model
32+import wizard
33
34=== added file 'purchase_requisition_contract_analyst/__openerp__.py'
35--- purchase_requisition_contract_analyst/__openerp__.py 1970-01-01 00:00:00 +0000
36+++ purchase_requisition_contract_analyst/__openerp__.py 2014-05-29 20:01:25 +0000
37@@ -0,0 +1,53 @@
38+#!/usr/bin/python
39+# -*- encoding: utf-8 -*-
40+###############################################################################
41+# Module Writen to OpenERP, Open Source Management Solution
42+# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
43+# All Rights Reserved
44+############# Credits #########################################################
45+# Coded by: Katherine Zaoral <kathy@vauxoo.com>
46+# Planified by: Humberto Arocha <hbto@vauxoo.com>
47+# Audited by: Humberto Arocha <hbto@vauxoo.com>
48+###############################################################################
49+# This program is free software: you can redistribute it and/or modify
50+# it under the terms of the GNU Affero General Public License as published
51+# by the Free Software Foundation, either version 3 of the License, or
52+# (at your option) any later version.
53+#
54+# This program is distributed in the hope that it will be useful,
55+# but WITHOUT ANY WARRANTY; without even the implied warranty of
56+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57+# GNU Affero General Public License for more details.
58+#
59+# You should have received a copy of the GNU Affero General Public License
60+# along with this program. If not, see <http://www.gnu.org/licenses/>.
61+###############################################################################
62+
63+{
64+ 'name': 'Purchase Requisition Contract Analyst',
65+ 'version': '1.0',
66+ 'author': 'Vauxoo',
67+ 'website': 'http://www.vauxoo.com/',
68+ 'category': 'purchase',
69+ 'description': '''
70+Purchase Requisition Contract Analyst
71+=====================================
72+
73+Extend the purchase requisition document to add an contract analyst that will
74+be responsible for evaluate the purchase requisition.
75+''',
76+ 'depends': [
77+ 'purchase_requisition'
78+ ],
79+ 'data': [
80+ 'view/purchase_requisition_view.xml',
81+ 'security/purchase_requisition_security.xml',
82+ ],
83+ 'demo': [],
84+ 'test': [],
85+ 'qweb': [],
86+ 'js': [],
87+ 'css': [],
88+ 'active': False,
89+ 'installable': True,
90+}
91
92=== added directory 'purchase_requisition_contract_analyst/data'
93=== added directory 'purchase_requisition_contract_analyst/demo'
94=== added directory 'purchase_requisition_contract_analyst/doc'
95=== added directory 'purchase_requisition_contract_analyst/doc/images'
96=== added directory 'purchase_requisition_contract_analyst/i18n'
97=== added directory 'purchase_requisition_contract_analyst/model'
98=== added file 'purchase_requisition_contract_analyst/model/__init__.py'
99--- purchase_requisition_contract_analyst/model/__init__.py 1970-01-01 00:00:00 +0000
100+++ purchase_requisition_contract_analyst/model/__init__.py 2014-05-29 20:01:25 +0000
101@@ -0,0 +1,26 @@
102+#!/usr/bin/python
103+# -*- encoding: utf-8 -*-
104+###############################################################################
105+# Module Writen to OpenERP, Open Source Management Solution
106+# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
107+# All Rights Reserved
108+############# Credits #########################################################
109+# Coded by: Katherine Zaoral <kathy@vauxoo.com>
110+# Planified by: Humberto Arocha <hbto@vauxoo.com>
111+# Audited by: Humberto Arocha <hbto@vauxoo.com>
112+###############################################################################
113+# This program is free software: you can redistribute it and/or modify
114+# it under the terms of the GNU Affero General Public License as published
115+# by the Free Software Foundation, either version 3 of the License, or
116+# (at your option) any later version.
117+#
118+# This program is distributed in the hope that it will be useful,
119+# but WITHOUT ANY WARRANTY; without even the implied warranty of
120+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
121+# GNU Affero General Public License for more details.
122+#
123+# You should have received a copy of the GNU Affero General Public License
124+# along with this program. If not, see <http://www.gnu.org/licenses/>.
125+###############################################################################
126+
127+import purchase_requisition
128
129=== added file 'purchase_requisition_contract_analyst/model/purchase_requisition.py'
130--- purchase_requisition_contract_analyst/model/purchase_requisition.py 1970-01-01 00:00:00 +0000
131+++ purchase_requisition_contract_analyst/model/purchase_requisition.py 2014-05-29 20:01:25 +0000
132@@ -0,0 +1,39 @@
133+#!/usr/bin/python
134+# -*- encoding: utf-8 -*-
135+###############################################################################
136+# Module Writen to OpenERP, Open Source Management Solution
137+# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
138+# All Rights Reserved
139+############# Credits #########################################################
140+# Coded by: Katherine Zaoral <kathy@vauxoo.com
141+# Planified by: Humberto Arocha <hbto@vauxoo.com>
142+# Audited by: Humberto Arocha <hbto@vauxoo.com>
143+###############################################################################
144+# This program is free software: you can redistribute it and/or modify
145+# it under the terms of the GNU Affero General Public License as published
146+# by the Free Software Foundation, either version 3 of the License, or
147+# (at your option) any later version.
148+#
149+# This program is distributed in the hope that it will be useful,
150+# but WITHOUT ANY WARRANTY; without even the implied warranty of
151+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
152+# GNU Affero General Public License for more details.
153+#
154+# You should have received a copy of the GNU Affero General Public License
155+# along with this program. If not, see <http://www.gnu.org/licenses/>.
156+###############################################################################
157+
158+from openerp.osv import fields, osv, orm
159+from openerp.tools.translate import _
160+from openerp import tools
161+
162+class purchase_requisition(osv.Model):
163+
164+ _inherit = 'purchase.requisition'
165+ _columns = {
166+ 'purchaser_id': fields.many2one(
167+ 'res.users',
168+ 'Contract Analyst',
169+ help=('Contract Analyst responsible to evaluate the current'
170+ ' purchase requisition.')),
171+ }
172
173=== added directory 'purchase_requisition_contract_analyst/report'
174=== added directory 'purchase_requisition_contract_analyst/security'
175=== added file 'purchase_requisition_contract_analyst/security/purchase_requisition_security.xml'
176--- purchase_requisition_contract_analyst/security/purchase_requisition_security.xml 1970-01-01 00:00:00 +0000
177+++ purchase_requisition_contract_analyst/security/purchase_requisition_security.xml 2014-05-29 20:01:25 +0000
178@@ -0,0 +1,14 @@
179+<?xml version="1.0" encoding="utf-8"?>
180+<openerp>
181+ <data noupdate="1">
182+
183+ <record model="ir.rule" id="purchase_requisition_user_rule">
184+ <field name="name">Purchase Requisition User Visibility</field>
185+ <field name="model_id" ref="model_purchase_requisition"/>
186+ <field name="global" eval="True"/>
187+ <field name="domain_force">['|',('user_id','=',user.id),('purchaser_id','in',[user.id, False])]</field>
188+ </record>
189+
190+
191+ </data>
192+</openerp>
193
194=== added directory 'purchase_requisition_contract_analyst/static'
195=== added directory 'purchase_requisition_contract_analyst/static/description'
196=== added file 'purchase_requisition_contract_analyst/static/description/index.html'
197=== added directory 'purchase_requisition_contract_analyst/static/src'
198=== added directory 'purchase_requisition_contract_analyst/static/src/css'
199=== added directory 'purchase_requisition_contract_analyst/static/src/img'
200=== added file 'purchase_requisition_contract_analyst/static/src/img/icon.png'
201Binary files purchase_requisition_contract_analyst/static/src/img/icon.png 1970-01-01 00:00:00 +0000 and purchase_requisition_contract_analyst/static/src/img/icon.png 2014-05-29 20:01:25 +0000 differ
202=== added directory 'purchase_requisition_contract_analyst/static/src/js'
203=== added directory 'purchase_requisition_contract_analyst/static/src/xml'
204=== added directory 'purchase_requisition_contract_analyst/test'
205=== added directory 'purchase_requisition_contract_analyst/view'
206=== added file 'purchase_requisition_contract_analyst/view/purchase_requisition_view.xml'
207--- purchase_requisition_contract_analyst/view/purchase_requisition_view.xml 1970-01-01 00:00:00 +0000
208+++ purchase_requisition_contract_analyst/view/purchase_requisition_view.xml 2014-05-29 20:01:25 +0000
209@@ -0,0 +1,45 @@
210+<?xml version="1.0"?>
211+<openerp>
212+ <data>
213+
214+ <record id="purchase_requisition_ca_form" model="ir.ui.view">
215+ <field name="name">purchase.requisition.contract.analyst.form</field>
216+ <field name="model">purchase.requisition</field>
217+ <field name="inherit_id" ref="purchase_requisition.view_purchase_requisition_form"/>
218+ <field name="arch" type="xml">
219+ <xpath expr="//field[@name='user_id']" position="after">
220+ <field name="purchaser_id"/>
221+ </xpath>
222+ </field>
223+ </record>
224+
225+ <record id="purchase_requisition_ca_tree" model="ir.ui.view">
226+ <field name="name">purchase.requisition.contract.analyst.tree</field>
227+ <field name="model">purchase.requisition</field>
228+ <field name="inherit_id" ref="purchase_requisition.view_purchase_requisition_tree"/>
229+ <field name="arch" type="xml">
230+ <xpath expr="//field[@name='user_id']" position="before">
231+ <field name="purchaser_id"/>
232+ </xpath>
233+ </field>
234+ </record>
235+
236+ <record id="purchase_requisition_ca_search" model="ir.ui.view">
237+ <field name="name">purchase.requisition.contract.analyst.search</field>
238+ <field name="model">purchase.requisition</field>
239+ <field name="inherit_id" ref="purchase_requisition.view_purchase_requisition_filter"/>
240+ <field name="arch" type="xml">
241+
242+ <xpath expr="//field[@name='exclusive']" position="after">
243+ <field name="purchaser_id"/>
244+ </xpath>
245+
246+ <xpath expr="//group" position="inside">
247+ <filter string="Contract Analyst" icon="terp-personal" context="{'group_by':'purchaser_id'}"/>
248+ </xpath>
249+
250+ </field>
251+ </record>
252+
253+ </data>
254+</openerp>
255
256=== added directory 'purchase_requisition_contract_analyst/wizard'
257=== added file 'purchase_requisition_contract_analyst/wizard/__init__.py'
258--- purchase_requisition_contract_analyst/wizard/__init__.py 1970-01-01 00:00:00 +0000
259+++ purchase_requisition_contract_analyst/wizard/__init__.py 2014-05-29 20:01:25 +0000
260@@ -0,0 +1,25 @@
261+#!/usr/bin/python
262+# -*- encoding: utf-8 -*-
263+###############################################################################
264+# Module Writen to OpenERP, Open Source Management Solution
265+# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
266+# All Rights Reserved
267+############# Credits #########################################################
268+# Coded by: Katherine Zaoral <kathy@vauxoo.com>
269+# Planified by: Humberto Arocha <hbto@vauxoo.com>
270+# Audited by: Humberto Arocha <hbto@vauxoo.com>
271+###############################################################################
272+# This program is free software: you can redistribute it and/or modify
273+# it under the terms of the GNU Affero General Public License as published
274+# by the Free Software Foundation, either version 3 of the License, or
275+# (at your option) any later version.
276+#
277+# This program is distributed in the hope that it will be useful,
278+# but WITHOUT ANY WARRANTY; without even the implied warranty of
279+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
280+# GNU Affero General Public License for more details.
281+#
282+# You should have received a copy of the GNU Affero General Public License
283+# along with this program. If not, see <http://www.gnu.org/licenses/>.
284+###############################################################################
285+
286
287=== added directory 'purchase_requisition_contract_analyst/workflow'