Merge lp:~vauxoo/addons-vauxoo/7.0-purchase_requisition_priority-dev-1470-kty into lp:addons-vauxoo/7.0

Proposed by Katherine Zaoral (Vauxoo)
Status: Merged
Merged at revision: 1024
Proposed branch: lp:~vauxoo/addons-vauxoo/7.0-purchase_requisition_priority-dev-1470-kty
Merge into: lp:addons-vauxoo/7.0
Diff against target: 276 lines (+223/-0)
6 files modified
purchase_requisition_priority/__init__.py (+27/-0)
purchase_requisition_priority/__openerp__.py (+52/-0)
purchase_requisition_priority/model/__init__.py (+26/-0)
purchase_requisition_priority/model/purchase_requisition.py (+44/-0)
purchase_requisition_priority/view/purchase_requisition_view.xml (+49/-0)
purchase_requisition_priority/wizard/__init__.py (+25/-0)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/7.0-purchase_requisition_priority-dev-1470-kty
Reviewer Review Type Date Requested Status
Katherine Zaoral (Vauxoo) Approve
hbto [Vauxoo] http://www.vauxoo.com Pending
Review via email: mp+221968@code.launchpad.net

Description of the change

[MERGE] add new module purchase_requisition_priority that allow filter a purchase requisition by priority emergency, urgent and normal.

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

The runbot is green
I will proceed to make the merge.
Cheers

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'purchase_requisition_priority'
2=== added file 'purchase_requisition_priority/__init__.py'
3--- purchase_requisition_priority/__init__.py 1970-01-01 00:00:00 +0000
4+++ purchase_requisition_priority/__init__.py 2014-06-03 22:30:44 +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_priority/__openerp__.py'
35--- purchase_requisition_priority/__openerp__.py 1970-01-01 00:00:00 +0000
36+++ purchase_requisition_priority/__openerp__.py 2014-06-03 22:30:44 +0000
37@@ -0,0 +1,52 @@
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 Priority',
65+ 'version': '1.0',
66+ 'author': 'Vauxoo',
67+ 'website': 'http://www.vauxoo.com/',
68+ 'category': 'purchase',
69+ 'description': '''
70+Purchase Requisition Priority
71+=============================
72+
73+Add a new field 'priority' over the purchase requisition that allows to filter
74+the purchase requisition by priority.
75+''',
76+ 'depends': [
77+ 'purchase_requisition',
78+ ],
79+ 'data': [
80+ 'view/purchase_requisition_view.xml',
81+ ],
82+ 'demo': [],
83+ 'test': [],
84+ 'qweb': [],
85+ 'js': [],
86+ 'css': [],
87+ 'active': False,
88+ 'installable': True,
89+}
90
91=== added directory 'purchase_requisition_priority/data'
92=== added directory 'purchase_requisition_priority/demo'
93=== added directory 'purchase_requisition_priority/doc'
94=== added directory 'purchase_requisition_priority/doc/images'
95=== added directory 'purchase_requisition_priority/i18n'
96=== added directory 'purchase_requisition_priority/model'
97=== added file 'purchase_requisition_priority/model/__init__.py'
98--- purchase_requisition_priority/model/__init__.py 1970-01-01 00:00:00 +0000
99+++ purchase_requisition_priority/model/__init__.py 2014-06-03 22:30:44 +0000
100@@ -0,0 +1,26 @@
101+#!/usr/bin/python
102+# -*- encoding: utf-8 -*-
103+###############################################################################
104+# Module Writen to OpenERP, Open Source Management Solution
105+# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
106+# All Rights Reserved
107+############# Credits #########################################################
108+# Coded by: Katherine Zaoral <kathy@vauxoo.com>
109+# Planified by: Humberto Arocha <hbto@vauxoo.com>
110+# Audited by: Humberto Arocha <hbto@vauxoo.com>
111+###############################################################################
112+# This program is free software: you can redistribute it and/or modify
113+# it under the terms of the GNU Affero General Public License as published
114+# by the Free Software Foundation, either version 3 of the License, or
115+# (at your option) any later version.
116+#
117+# This program is distributed in the hope that it will be useful,
118+# but WITHOUT ANY WARRANTY; without even the implied warranty of
119+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
120+# GNU Affero General Public License for more details.
121+#
122+# You should have received a copy of the GNU Affero General Public License
123+# along with this program. If not, see <http://www.gnu.org/licenses/>.
124+###############################################################################
125+
126+import purchase_requisition
127
128=== added file 'purchase_requisition_priority/model/purchase_requisition.py'
129--- purchase_requisition_priority/model/purchase_requisition.py 1970-01-01 00:00:00 +0000
130+++ purchase_requisition_priority/model/purchase_requisition.py 2014-06-03 22:30:44 +0000
131@@ -0,0 +1,44 @@
132+#!/usr/bin/python
133+# -*- encoding: utf-8 -*-
134+###############################################################################
135+# Module Writen to OpenERP, Open Source Management Solution
136+# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
137+# All Rights Reserved
138+############# Credits #########################################################
139+# Coded by: Katherine Zaoral <kathy@vauxoo.com>
140+# Planified by: Humberto Arocha <hbto@vauxoo.com>
141+# Audited by: Humberto Arocha <hbto@vauxoo.com>
142+###############################################################################
143+# This program is free software: you can redistribute it and/or modify
144+# it under the terms of the GNU Affero General Public License as published
145+# by the Free Software Foundation, either version 3 of the License, or
146+# (at your option) any later version.
147+#
148+# This program is distributed in the hope that it will be useful,
149+# but WITHOUT ANY WARRANTY; without even the implied warranty of
150+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
151+# GNU Affero General Public License for more details.
152+#
153+# You should have received a copy of the GNU Affero General Public License
154+# along with this program. If not, see <http://www.gnu.org/licenses/>.
155+###############################################################################
156+
157+from openerp.osv import fields, osv, orm
158+from openerp.tools.translate import _
159+from openerp import tools
160+
161+priority_options = [
162+ (05, 'emergency'),
163+ (10, 'urgent'),
164+ (15, 'normal')
165+]
166+
167+class purchase_requisition(osv.Model):
168+ _inherit = 'purchase.requisition'
169+ _order = 'priority asc'
170+ _columns = {
171+ 'priority': fields.selection(
172+ priority_options,
173+ 'Priority',
174+ help='The priority of the document.'),
175+ }
176
177=== added directory 'purchase_requisition_priority/report'
178=== added directory 'purchase_requisition_priority/security'
179=== added directory 'purchase_requisition_priority/static'
180=== added directory 'purchase_requisition_priority/static/description'
181=== added file 'purchase_requisition_priority/static/description/index.html'
182=== added directory 'purchase_requisition_priority/static/src'
183=== added directory 'purchase_requisition_priority/static/src/css'
184=== added directory 'purchase_requisition_priority/static/src/img'
185=== added file 'purchase_requisition_priority/static/src/img/icon.png'
186Binary files purchase_requisition_priority/static/src/img/icon.png 1970-01-01 00:00:00 +0000 and purchase_requisition_priority/static/src/img/icon.png 2014-06-03 22:30:44 +0000 differ
187=== added directory 'purchase_requisition_priority/static/src/js'
188=== added directory 'purchase_requisition_priority/static/src/xml'
189=== added directory 'purchase_requisition_priority/test'
190=== added directory 'purchase_requisition_priority/view'
191=== added file 'purchase_requisition_priority/view/purchase_requisition_view.xml'
192--- purchase_requisition_priority/view/purchase_requisition_view.xml 1970-01-01 00:00:00 +0000
193+++ purchase_requisition_priority/view/purchase_requisition_view.xml 2014-06-03 22:30:44 +0000
194@@ -0,0 +1,49 @@
195+<?xml version="1.0"?>
196+<openerp>
197+ <data>
198+
199+ <record id="purchase_requisition_priority_form" model="ir.ui.view">
200+ <field name="name">purchase.requisition.priority.form</field>
201+ <field name="model">purchase.requisition</field>
202+ <field name="inherit_id" ref="purchase_requisition.view_purchase_requisition_form"/>
203+ <field name="arch" type="xml">
204+ <xpath expr="//field[@name='exclusive']" position="after">
205+ <field name="priority"/>
206+ </xpath>
207+ </field>
208+ </record>
209+
210+ <record id="purchase_requisition_priority_tree" model="ir.ui.view">
211+ <field name="name">purchase.requisition.priority.tree</field>
212+ <field name="model">purchase.requisition</field>
213+ <field name="inherit_id" ref="purchase_requisition.view_purchase_requisition_tree"/>
214+ <field name="arch" type="xml">
215+ <xpath expr="//field[@name='state']" position="before">
216+ <field name="priority"/>
217+ </xpath>
218+ </field>
219+ </record>
220+
221+ <record id="purchase_requisition_priority_search" model="ir.ui.view">
222+ <field name="name">purchase.requisition.priority.search</field>
223+ <field name="model">purchase.requisition</field>
224+ <field name="inherit_id" ref="purchase_requisition.view_purchase_requisition_filter"/>
225+ <field name="arch" type="xml">
226+
227+ <xpath expr="//filter[@string='Unassigned']" position="after">
228+ <separator/>
229+ <field name="priority"/>
230+ <filter string="Emergency" domain="[('priority','=', 05)]"/>
231+ <filter string="Urgent" domain="[('priority','=', 10)]"/>
232+ <filter string="Normal" domain="[('priority','=', 15)]"/>
233+ </xpath>
234+
235+ <xpath expr="//group" position="inside">
236+ <filter string="Priority" icon="terp-personal" context="{'group_by':'priority'}"/>
237+ </xpath>
238+
239+ </field>
240+ </record>
241+
242+ </data>
243+</openerp>
244
245=== added directory 'purchase_requisition_priority/wizard'
246=== added file 'purchase_requisition_priority/wizard/__init__.py'
247--- purchase_requisition_priority/wizard/__init__.py 1970-01-01 00:00:00 +0000
248+++ purchase_requisition_priority/wizard/__init__.py 2014-06-03 22:30:44 +0000
249@@ -0,0 +1,25 @@
250+#!/usr/bin/python
251+# -*- encoding: utf-8 -*-
252+###############################################################################
253+# Module Writen to OpenERP, Open Source Management Solution
254+# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
255+# All Rights Reserved
256+############# Credits #########################################################
257+# Coded by: Katherine Zaoral <kathy@vauxoo.com>
258+# Planified by: Humberto Arocha <hbto@vauxoo.com>
259+# Audited by: Humberto Arocha <hbto@vauxoo.com>
260+###############################################################################
261+# This program is free software: you can redistribute it and/or modify
262+# it under the terms of the GNU Affero General Public License as published
263+# by the Free Software Foundation, either version 3 of the License, or
264+# (at your option) any later version.
265+#
266+# This program is distributed in the hope that it will be useful,
267+# but WITHOUT ANY WARRANTY; without even the implied warranty of
268+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
269+# GNU Affero General Public License for more details.
270+#
271+# You should have received a copy of the GNU Affero General Public License
272+# along with this program. If not, see <http://www.gnu.org/licenses/>.
273+###############################################################################
274+
275
276=== added directory 'purchase_requisition_priority/workflow'