Merge lp:~vauxoo/addons-vauxoo/7.0-purchaser_id_order-dev-yani into lp:~vauxoo/addons-vauxoo/addons-vauxoo-cicsa
- 7.0-purchaser_id_order-dev-yani
- Merge into addons-vauxoo-cicsa
Proposed by
Yanina Aular (Vauxoo)
Status: | Merged |
---|---|
Merged at revision: | 1150 |
Proposed branch: | lp:~vauxoo/addons-vauxoo/7.0-purchaser_id_order-dev-yani |
Merge into: | lp:~vauxoo/addons-vauxoo/addons-vauxoo-cicsa |
Diff against target: |
302 lines (+249/-0) 6 files modified
purchase_order_contract_analyst/__init__.py (+27/-0) purchase_order_contract_analyst/__openerp__.py (+54/-0) purchase_order_contract_analyst/model/__init__.py (+26/-0) purchase_order_contract_analyst/model/purchase_order.py (+59/-0) purchase_order_contract_analyst/view/purchase_order_view.xml (+59/-0) purchase_order_contract_analyst/wizard/__init__.py (+24/-0) |
To merge this branch: | bzr merge lp:~vauxoo/addons-vauxoo/7.0-purchaser_id_order-dev-yani |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Yanina Aular (Vauxoo) | Approve | ||
hbto [Vauxoo] http://www.vauxoo.com | Pending | ||
Review via email:
|
Commit message
Description of the change
purchaser_id is added in purchase order.
To post a comment you must log in.
- 1149. By Yanina Aular (Vauxoo)
-
[ADD] purchase_
order_contract_ analyst module added - 1150. By Yanina Aular (Vauxoo)
-
[IMP] pass purchaser_id from PR to PO
- 1151. By Yanina Aular (Vauxoo)
-
[ADD] merge from trunk
- 1152. By Yanina Aular (Vauxoo)
-
[ADD] default in purchaser_id
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Yanina Aular (Vauxoo) (yanina-aular) : | # |
review:
Approve
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Yanina Aular (Vauxoo) (yanina-aular) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added directory 'purchase_order_contract_analyst' |
2 | === added file 'purchase_order_contract_analyst/__init__.py' |
3 | --- purchase_order_contract_analyst/__init__.py 1970-01-01 00:00:00 +0000 |
4 | +++ purchase_order_contract_analyst/__init__.py 2014-11-28 03:17:17 +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: Yanina Aular <yanina.aular@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 | +from . import model |
32 | +from . import wizard |
33 | |
34 | === added file 'purchase_order_contract_analyst/__openerp__.py' |
35 | --- purchase_order_contract_analyst/__openerp__.py 1970-01-01 00:00:00 +0000 |
36 | +++ purchase_order_contract_analyst/__openerp__.py 2014-11-28 03:17:17 +0000 |
37 | @@ -0,0 +1,54 @@ |
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: Yanina Aular <yanina.aular@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 | + "name": "Purchase Order Contract Analyst", |
64 | + "version": "1.0", |
65 | + "author": "Vauxoo", |
66 | + "category": "purchase", |
67 | + "description": """ |
68 | +Purchase Order Contract Analyst |
69 | +=============================== |
70 | + |
71 | +Extend the purchase order document to add an contract analyst that will |
72 | +be responsible for evaluate the purchase order. |
73 | +""", |
74 | + "website": "http://www.vauxoo.com/", |
75 | + "license": "", |
76 | + "depends": [ |
77 | + "purchase", |
78 | + "purchase_requisition_contract_analyst", |
79 | + ], |
80 | + "demo": [], |
81 | + "data": [ |
82 | + "view/purchase_order_view.xml", |
83 | + ], |
84 | + "test": [], |
85 | + "js": [], |
86 | + "css": [], |
87 | + "qweb": [], |
88 | + "installable": True, |
89 | + "auto_install": False, |
90 | + "active": False |
91 | +} |
92 | |
93 | === added directory 'purchase_order_contract_analyst/data' |
94 | === added directory 'purchase_order_contract_analyst/demo' |
95 | === added directory 'purchase_order_contract_analyst/doc' |
96 | === added directory 'purchase_order_contract_analyst/doc/images' |
97 | === added directory 'purchase_order_contract_analyst/i18n' |
98 | === added directory 'purchase_order_contract_analyst/model' |
99 | === added file 'purchase_order_contract_analyst/model/__init__.py' |
100 | --- purchase_order_contract_analyst/model/__init__.py 1970-01-01 00:00:00 +0000 |
101 | +++ purchase_order_contract_analyst/model/__init__.py 2014-11-28 03:17:17 +0000 |
102 | @@ -0,0 +1,26 @@ |
103 | +#!/usr/bin/python |
104 | +# -*- encoding: utf-8 -*- |
105 | +############################################################################### |
106 | +# Module Writen to OpenERP, Open Source Management Solution |
107 | +# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). |
108 | +# All Rights Reserved |
109 | +############# Credits ######################################################### |
110 | +# Coded by: Yanina Aular <yanina.aular@vauxoo.com> |
111 | +# Planified by: Humberto Arocha <hbto@vauxoo.com> |
112 | +# Audited by: Humberto Arocha <hbto@vauxoo.com> |
113 | +############################################################################### |
114 | +# This program is free software: you can redistribute it and/or modify |
115 | +# it under the terms of the GNU Affero General Public License as published |
116 | +# by the Free Software Foundation, either version 3 of the License, or |
117 | +# (at your option) any later version. |
118 | +# |
119 | +# This program is distributed in the hope that it will be useful, |
120 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
121 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
122 | +# GNU Affero General Public License for more details. |
123 | +# |
124 | +# You should have received a copy of the GNU Affero General Public License |
125 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
126 | +############################################################################### |
127 | + |
128 | +from . import purchase_order |
129 | |
130 | === added file 'purchase_order_contract_analyst/model/purchase_order.py' |
131 | --- purchase_order_contract_analyst/model/purchase_order.py 1970-01-01 00:00:00 +0000 |
132 | +++ purchase_order_contract_analyst/model/purchase_order.py 2014-11-28 03:17:17 +0000 |
133 | @@ -0,0 +1,59 @@ |
134 | +#!/usr/bin/python |
135 | +# -*- encoding: utf-8 -*- |
136 | +############################################################################### |
137 | +# Module Writen to OpenERP, Open Source Management Solution |
138 | +# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). |
139 | +# All Rights Reserved |
140 | +############# Credits ######################################################### |
141 | +# Coded by: Yanina Aular <yanina.aular@vauxoo.com |
142 | +# Planified by: Humberto Arocha <hbto@vauxoo.com> |
143 | +# Audited by: Humberto Arocha <hbto@vauxoo.com> |
144 | +############################################################################### |
145 | +# This program is free software: you can redistribute it and/or modify |
146 | +# it under the terms of the GNU Affero General Public License as published |
147 | +# by the Free Software Foundation, either version 3 of the License, or |
148 | +# (at your option) any later version. |
149 | +# |
150 | +# This program is distributed in the hope that it will be useful, |
151 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
152 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
153 | +# GNU Affero General Public License for more details. |
154 | +# |
155 | +# You should have received a copy of the GNU Affero General Public License |
156 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
157 | +############################################################################### |
158 | + |
159 | +from openerp.osv import osv, fields |
160 | + |
161 | + |
162 | +class purchase_order(osv.Model): |
163 | + |
164 | + _inherit = 'purchase.order' |
165 | + _columns = { |
166 | + 'purchaser_id': fields.many2one( |
167 | + 'res.users', |
168 | + 'P&C Analyst', |
169 | + domain=[('is_purchaser', '=', True)], |
170 | + help=('Contract Analyst responsible to evaluate the current' |
171 | + ' purchase order.')), |
172 | + } |
173 | + _defaults = { |
174 | + 'purchaser_id': lambda s, c, u, ctx: u, |
175 | + } |
176 | + |
177 | +class purchase_requisition(osv.Model): |
178 | + |
179 | + _inherit = 'purchase.requisition' |
180 | + |
181 | + def make_purchase_order(self, cr, uid, ids, partner_id, |
182 | + context=None): |
183 | + if context is None: |
184 | + context = {} |
185 | + res = super(purchase_requisition, self).make_purchase_order(cr, uid, ids, partner_id, context=context) |
186 | + |
187 | + po_obj = self.pool.get('purchase.order') |
188 | + for requisition in self.browse(cr, uid, ids, context=context): |
189 | + po_req = po_obj.search(cr, uid, [('requisition_id', '=', requisition.id)], context=context) |
190 | + for po_id in po_req: |
191 | + po_obj.write(cr, uid, [po_id], {'purchaser_id': requisition.purchaser_id}, context=context) |
192 | + return res |
193 | |
194 | === added directory 'purchase_order_contract_analyst/report' |
195 | === added directory 'purchase_order_contract_analyst/security' |
196 | === added directory 'purchase_order_contract_analyst/static' |
197 | === added directory 'purchase_order_contract_analyst/static/description' |
198 | === added file 'purchase_order_contract_analyst/static/description/index.html' |
199 | === added directory 'purchase_order_contract_analyst/static/src' |
200 | === added directory 'purchase_order_contract_analyst/static/src/css' |
201 | === added directory 'purchase_order_contract_analyst/static/src/img' |
202 | === added file 'purchase_order_contract_analyst/static/src/img/icon.png' |
203 | Binary files purchase_order_contract_analyst/static/src/img/icon.png 1970-01-01 00:00:00 +0000 and purchase_order_contract_analyst/static/src/img/icon.png 2014-11-28 03:17:17 +0000 differ |
204 | === added directory 'purchase_order_contract_analyst/static/src/js' |
205 | === added directory 'purchase_order_contract_analyst/static/src/xml' |
206 | === added directory 'purchase_order_contract_analyst/test' |
207 | === added directory 'purchase_order_contract_analyst/view' |
208 | === added file 'purchase_order_contract_analyst/view/purchase_order_view.xml' |
209 | --- purchase_order_contract_analyst/view/purchase_order_view.xml 1970-01-01 00:00:00 +0000 |
210 | +++ purchase_order_contract_analyst/view/purchase_order_view.xml 2014-11-28 03:17:17 +0000 |
211 | @@ -0,0 +1,59 @@ |
212 | +<?xml version="1.0"?> |
213 | +<openerp> |
214 | + <data> |
215 | + |
216 | + <record id="purchase_order_ca_form" model="ir.ui.view"> |
217 | + <field name="name">purchase.order.contract.analyst.form</field> |
218 | + <field name="model">purchase.order</field> |
219 | + <field name="inherit_id" ref="purchase.purchase_order_form"/> |
220 | + <field name="arch" type="xml"> |
221 | + <xpath expr="//field[@name='journal_id']" position="after"> |
222 | + <field name="purchaser_id"/> |
223 | + </xpath> |
224 | + </field> |
225 | + </record> |
226 | + <!-- |
227 | + <record id="purchase_order_ca_tree" model="ir.ui.view"> |
228 | + <field name="name">purchase.order.contract.analyst.tree</field> |
229 | + <field name="model">purchase.order</field> |
230 | + <field name="inherit_id" ref="purchase.purchase_order_tree"/> |
231 | + <field name="arch" type="xml"> |
232 | + <xpath expr="//field[@name='user_id']" position="before"> |
233 | + <field name="purchaser_id"/> |
234 | + </xpath> |
235 | + </field> |
236 | + </record> |
237 | + --> |
238 | + |
239 | + <!-- |
240 | + <record id="purchase_order_ca_search" model="ir.ui.view"> |
241 | + <field name="name">purchase.order.contract.analyst.search</field> |
242 | + <field name="model">purchase.order</field> |
243 | + <field name="inherit_id" ref="purchase_order.view_purchase_order_filter"/> |
244 | + <field name="arch" type="xml"> |
245 | + |
246 | + <xpath expr="//field[@name='exclusive']" position="after"> |
247 | + <field name="purchaser_id"/> |
248 | + </xpath> |
249 | + |
250 | + <xpath expr="//group" position="inside"> |
251 | + <filter string="P&C Analyst" icon="terp-personal" context="{'group_by':'purchaser_id'}"/> |
252 | + </xpath> |
253 | + |
254 | + </field> |
255 | + </record> |
256 | + |
257 | + <record id="res_users_purchaser_form" model="ir.ui.view"> |
258 | + <field name="name">res.users.purchaser.form</field> |
259 | + <field name="model">res.users</field> |
260 | + <field name="inherit_id" ref="base.view_users_form"/> |
261 | + <field name="arch" type="xml"> |
262 | + <xpath expr="//field[@name='tz']" position="after"> |
263 | + <field name="is_purchaser"/> |
264 | + </xpath> |
265 | + </field> |
266 | + </record> |
267 | + --> |
268 | + |
269 | + </data> |
270 | +</openerp> |
271 | |
272 | === added directory 'purchase_order_contract_analyst/wizard' |
273 | === added file 'purchase_order_contract_analyst/wizard/__init__.py' |
274 | --- purchase_order_contract_analyst/wizard/__init__.py 1970-01-01 00:00:00 +0000 |
275 | +++ purchase_order_contract_analyst/wizard/__init__.py 2014-11-28 03:17:17 +0000 |
276 | @@ -0,0 +1,24 @@ |
277 | +#!/usr/bin/python |
278 | +# -*- encoding: utf-8 -*- |
279 | +############################################################################### |
280 | +# Module Writen to OpenERP, Open Source Management Solution |
281 | +# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). |
282 | +# All Rights Reserved |
283 | +############# Credits ######################################################### |
284 | +# Coded by: Yanina Aular <yanina.aular@vauxoo.com> |
285 | +# Planified by: Humberto Arocha <hbto@vauxoo.com> |
286 | +# Audited by: Humberto Arocha <hbto@vauxoo.com> |
287 | +############################################################################### |
288 | +# This program is free software: you can redistribute it and/or modify |
289 | +# it under the terms of the GNU Affero General Public License as published |
290 | +# by the Free Software Foundation, either version 3 of the License, or |
291 | +# (at your option) any later version. |
292 | +# |
293 | +# This program is distributed in the hope that it will be useful, |
294 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
295 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
296 | +# GNU Affero General Public License for more details. |
297 | +# |
298 | +# You should have received a copy of the GNU Affero General Public License |
299 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
300 | +############################################################################### |
301 | |
302 | === added directory 'purchase_order_contract_analyst/workflow' |
Runbot is running, but will be merged.