Merge lp:~vauxoo/addons-vauxoo/addons-vauxoo-cicsa into lp:addons-vauxoo/7.0
- addons-vauxoo-cicsa
- Merge into 7.0
Proposed by
hbto [Vauxoo] http://www.vauxoo.com
Status: | Merged |
---|---|
Merged at revision: | 1066 |
Proposed branch: | lp:~vauxoo/addons-vauxoo/addons-vauxoo-cicsa |
Merge into: | lp:addons-vauxoo/7.0 |
Diff against target: |
1055 lines (+835/-2) 25 files modified
account_amortization/__openerp__.py (+1/-0) purchase_order_department/__init__.py (+27/-0) purchase_order_department/__openerp__.py (+59/-0) purchase_order_department/i18n/purchase_order_department.pot (+38/-0) purchase_order_department/model/__init__.py (+26/-0) purchase_order_department/model/purchase_order.py (+53/-0) purchase_order_department/view/purchase_order_view.xml (+48/-0) purchase_order_department/wizard/__init__.py (+25/-0) purchase_requisition_contract_analyst/i18n/purchase_requisition_contract_analyst.pot (+33/-0) purchase_requisition_contract_analyst/model/purchase_requisition.py (+1/-1) purchase_requisition_contract_analyst/view/purchase_requisition_view.xml (+1/-1) purchase_requisition_line_plan/__openerp__.py (+1/-0) purchase_requisition_line_price_unit/__init__.py (+27/-0) purchase_requisition_line_price_unit/__openerp__.py (+53/-0) purchase_requisition_line_price_unit/model/__init__.py (+26/-0) purchase_requisition_line_price_unit/model/purchase_requisition_line.py (+86/-0) purchase_requisition_line_price_unit/view/purchase_requisition_view.xml (+26/-0) purchase_requisition_line_price_unit/wizard/__init__.py (+25/-0) purchase_requisition_supplier_list/__init__.py (+28/-0) purchase_requisition_supplier_list/__openerp__.py (+54/-0) purchase_requisition_supplier_list/i18n/purchase_requisition_supplier_list.pot (+42/-0) purchase_requisition_supplier_list/model/__init__.py (+27/-0) purchase_requisition_supplier_list/model/purchase_requisition.py (+69/-0) purchase_requisition_supplier_list/view/purchase_requisition_view.xml (+33/-0) purchase_requisition_supplier_list/wizard/__init__.py (+26/-0) |
To merge this branch: | bzr merge lp:~vauxoo/addons-vauxoo/addons-vauxoo-cicsa |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
hbto [Vauxoo] http://www.vauxoo.com | Approve | ||
Review via email:
|
Commit message
Description of the change
Weekly Merge from Addons-vauxoo-cicsa
To post a comment you must log in.
- 1059. By hbto [Vauxoo] http://www.vauxoo.com
-
[MERGE] From Trunk
- 1060. By hbto [Vauxoo] http://www.vauxoo.com
-
[FIX] Missing Dependency "decimal_precision" on account_
amortization - 1061. By Katherine Zaoral (Vauxoo)
-
[MERGE] add a generic module named purchase_
requisition_ supplier_ list (separate
and bug fixed from the cicsa trunk repo). - 1062. By hbto [Vauxoo] http://www.vauxoo.com
-
[MERGE] Missing Dependencies
- 1063. By hbto [Vauxoo] http://www.vauxoo.com
-
[MERGE] From Trunk
- 1064. By hbto [Vauxoo] http://www.vauxoo.com
-
[MERGE] Missing Dependencies
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'account_amortization/__openerp__.py' |
2 | --- account_amortization/__openerp__.py 2014-05-09 21:51:34 +0000 |
3 | +++ account_amortization/__openerp__.py 2014-06-27 16:28:31 +0000 |
4 | @@ -28,6 +28,7 @@ |
5 | "name": "Vauxoo Account Amortization", |
6 | "version": "0.1", |
7 | "depends": [ |
8 | + "decimal_precision", |
9 | "account_asset", |
10 | "account_asset_date", |
11 | ], |
12 | |
13 | === added directory 'purchase_order_department' |
14 | === added file 'purchase_order_department/__init__.py' |
15 | --- purchase_order_department/__init__.py 1970-01-01 00:00:00 +0000 |
16 | +++ purchase_order_department/__init__.py 2014-06-27 16:28:31 +0000 |
17 | @@ -0,0 +1,27 @@ |
18 | +#!/usr/bin/python |
19 | +# -*- encoding: utf-8 -*- |
20 | +############################################################################### |
21 | +# Module Writen to OpenERP, Open Source Management Solution |
22 | +# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). |
23 | +# All Rights Reserved |
24 | +############# Credits ######################################################### |
25 | +# Coded by: Katherine Zaoral <kathy@vauxoo.com> |
26 | +# Planified by: Humberto Arocha <hbto@vauxoo.com> |
27 | +# Audited by: Humberto Arocha <hbto@vauxoo.com> |
28 | +############################################################################### |
29 | +# This program is free software: you can redistribute it and/or modify |
30 | +# it under the terms of the GNU Affero General Public License as published |
31 | +# by the Free Software Foundation, either version 3 of the License, or |
32 | +# (at your option) any later version. |
33 | +# |
34 | +# This program is distributed in the hope that it will be useful, |
35 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
36 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
37 | +# GNU Affero General Public License for more details. |
38 | +# |
39 | +# You should have received a copy of the GNU Affero General Public License |
40 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
41 | +############################################################################### |
42 | + |
43 | +import model |
44 | +import wizard |
45 | |
46 | === added file 'purchase_order_department/__openerp__.py' |
47 | --- purchase_order_department/__openerp__.py 1970-01-01 00:00:00 +0000 |
48 | +++ purchase_order_department/__openerp__.py 2014-06-27 16:28:31 +0000 |
49 | @@ -0,0 +1,59 @@ |
50 | +#!/usr/bin/python |
51 | +# -*- encoding: utf-8 -*- |
52 | +############################################################################### |
53 | +# Module Writen to OpenERP, Open Source Management Solution |
54 | +# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). |
55 | +# All Rights Reserved |
56 | +############# Credits ######################################################### |
57 | +# Coded by: Katherine Zaoral <kathy@vauxoo.com> |
58 | +# Planified by: Humberto Arocha <hbto@vauxoo.com> |
59 | +# Audited by: Humberto Arocha <hbto@vauxoo.com> |
60 | +############################################################################### |
61 | +# This program is free software: you can redistribute it and/or modify |
62 | +# it under the terms of the GNU Affero General Public License as published |
63 | +# by the Free Software Foundation, either version 3 of the License, or |
64 | +# (at your option) any later version. |
65 | +# |
66 | +# This program is distributed in the hope that it will be useful, |
67 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
68 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
69 | +# GNU Affero General Public License for more details. |
70 | +# |
71 | +# You should have received a copy of the GNU Affero General Public License |
72 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
73 | +############################################################################### |
74 | + |
75 | +{ |
76 | + 'name': 'Purchase Order Department', |
77 | + 'version': '1.0', |
78 | + 'author': 'Vauxoo', |
79 | + 'website': 'http://www.vauxoo.com/', |
80 | + 'category': 'purchase', |
81 | + 'description': ''' |
82 | +Purchase Order Department |
83 | +========================= |
84 | + |
85 | +Add a department field to the purchase order model. This check the purchase |
86 | +order requisitor (user) and fill the department field with the requisitor |
87 | +employee info. Also add a search filter by text to search the department name |
88 | +and a gruop by filter by department. |
89 | + |
90 | +Note: this module do not work propertly for users with multiple employees. |
91 | +''', |
92 | + |
93 | + 'depends': [ |
94 | + 'purchase', |
95 | + 'hr', |
96 | + 'purchase_order_requisitor', |
97 | + ], |
98 | + 'data': [ |
99 | + 'view/purchase_order_view.xml', |
100 | + ], |
101 | + 'demo': [], |
102 | + 'test': [], |
103 | + 'qweb': [], |
104 | + 'js': [], |
105 | + 'css': [], |
106 | + 'active': False, |
107 | + 'installable': True, |
108 | +} |
109 | |
110 | === added directory 'purchase_order_department/data' |
111 | === added directory 'purchase_order_department/demo' |
112 | === added directory 'purchase_order_department/doc' |
113 | === added directory 'purchase_order_department/doc/images' |
114 | === added directory 'purchase_order_department/i18n' |
115 | === added file 'purchase_order_department/i18n/purchase_order_department.pot' |
116 | --- purchase_order_department/i18n/purchase_order_department.pot 1970-01-01 00:00:00 +0000 |
117 | +++ purchase_order_department/i18n/purchase_order_department.pot 2014-06-27 16:28:31 +0000 |
118 | @@ -0,0 +1,38 @@ |
119 | +# Translation of OpenERP Server. |
120 | +# This file contains the translation of the following modules: |
121 | +# * purchase_order_department |
122 | +# |
123 | +msgid "" |
124 | +msgstr "" |
125 | +"Project-Id-Version: OpenERP Server 7.0\n" |
126 | +"Report-Msgid-Bugs-To: \n" |
127 | +"POT-Creation-Date: 2014-06-18 21:28+0000\n" |
128 | +"PO-Revision-Date: 2014-06-18 21:28+0000\n" |
129 | +"Last-Translator: <>\n" |
130 | +"Language-Team: \n" |
131 | +"MIME-Version: 1.0\n" |
132 | +"Content-Type: text/plain; charset=UTF-8\n" |
133 | +"Content-Transfer-Encoding: \n" |
134 | +"Plural-Forms: \n" |
135 | + |
136 | +#. module: purchase_order_department |
137 | +#: view:purchase.order:0 |
138 | +#: field:purchase.order,department_id:0 |
139 | +msgid "Department" |
140 | +msgstr "" |
141 | + |
142 | +#. module: purchase_order_department |
143 | +#: view:purchase.order:0 |
144 | +msgid "onchange_user_id(rfq_user_id)" |
145 | +msgstr "" |
146 | + |
147 | +#. module: purchase_order_department |
148 | +#: help:purchase.order,department_id:0 |
149 | +msgid "The department where this purchase order belongs" |
150 | +msgstr "" |
151 | + |
152 | +#. module: purchase_order_department |
153 | +#: model:ir.model,name:purchase_order_department.model_purchase_order |
154 | +msgid "Purchase Order" |
155 | +msgstr "" |
156 | + |
157 | |
158 | === added directory 'purchase_order_department/model' |
159 | === added file 'purchase_order_department/model/__init__.py' |
160 | --- purchase_order_department/model/__init__.py 1970-01-01 00:00:00 +0000 |
161 | +++ purchase_order_department/model/__init__.py 2014-06-27 16:28:31 +0000 |
162 | @@ -0,0 +1,26 @@ |
163 | +#!/usr/bin/python |
164 | +# -*- encoding: utf-8 -*- |
165 | +############################################################################### |
166 | +# Module Writen to OpenERP, Open Source Management Solution |
167 | +# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). |
168 | +# All Rights Reserved |
169 | +############# Credits ######################################################### |
170 | +# Coded by: Katherine Zaoral <kathy@vauxoo.com> |
171 | +# Planified by: Humberto Arocha <hbto@vauxoo.com> |
172 | +# Audited by: Humberto Arocha <hbto@vauxoo.com> |
173 | +############################################################################### |
174 | +# This program is free software: you can redistribute it and/or modify |
175 | +# it under the terms of the GNU Affero General Public License as published |
176 | +# by the Free Software Foundation, either version 3 of the License, or |
177 | +# (at your option) any later version. |
178 | +# |
179 | +# This program is distributed in the hope that it will be useful, |
180 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
181 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
182 | +# GNU Affero General Public License for more details. |
183 | +# |
184 | +# You should have received a copy of the GNU Affero General Public License |
185 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
186 | +############################################################################### |
187 | + |
188 | +import purchase_order |
189 | |
190 | === added file 'purchase_order_department/model/purchase_order.py' |
191 | --- purchase_order_department/model/purchase_order.py 1970-01-01 00:00:00 +0000 |
192 | +++ purchase_order_department/model/purchase_order.py 2014-06-27 16:28:31 +0000 |
193 | @@ -0,0 +1,53 @@ |
194 | +#!/usr/bin/python |
195 | +# -*- encoding: utf-8 -*- |
196 | +############################################################################### |
197 | +# Module Writen to OpenERP, Open Source Management Solution |
198 | +# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). |
199 | +# All Rights Reserved |
200 | +############# Credits ######################################################### |
201 | +# Coded by: Katherine Zaoral <kathy@vauxoo.com> |
202 | +# Planified by: Humberto Arocha <hbto@vauxoo.com> |
203 | +# Audited by: Humberto Arocha <hbto@vauxoo.com> |
204 | +############################################################################### |
205 | +# This program is free software: you can redistribute it and/or modify |
206 | +# it under the terms of the GNU Affero General Public License as published |
207 | +# by the Free Software Foundation, either version 3 of the License, or |
208 | +# (at your option) any later version. |
209 | +# |
210 | +# This program is distributed in the hope that it will be useful, |
211 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
212 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
213 | +# GNU Affero General Public License for more details. |
214 | +# |
215 | +# You should have received a copy of the GNU Affero General Public License |
216 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
217 | +############################################################################### |
218 | + |
219 | +from openerp.osv import fields, osv, orm |
220 | +from openerp.tools.translate import _ |
221 | +from openerp import tools |
222 | + |
223 | +class purchase_order(osv.Model): |
224 | + |
225 | + _inherit = 'purchase.order' |
226 | + _columns = { |
227 | + 'department_id': fields.many2one( |
228 | + 'hr.department', |
229 | + string='Department', |
230 | + help='The department where this purchase order belongs'), |
231 | + } |
232 | + |
233 | + def onchange_user_id(self, cr, uid, ids, user_id, context=None): |
234 | + """ Return the department depending of the user. |
235 | + @param user_id: user id |
236 | + """ |
237 | + context = context or {} |
238 | + res = {} |
239 | + ru_obj = self.pool.get('res.users') |
240 | + if user_id: |
241 | + ru_brw = ru_obj.browse(cr, uid, user_id, context=context) |
242 | + department_id = (ru_brw.employee_ids |
243 | + and ru_brw.employee_ids[0].department_id |
244 | + and ru_brw.employee_ids[0].department_id.id or False) |
245 | + res.update({'value': {'department_id': department_id}}) |
246 | + return res |
247 | |
248 | === added directory 'purchase_order_department/report' |
249 | === added directory 'purchase_order_department/security' |
250 | === added directory 'purchase_order_department/static' |
251 | === added directory 'purchase_order_department/static/description' |
252 | === added file 'purchase_order_department/static/description/index.html' |
253 | === added directory 'purchase_order_department/static/src' |
254 | === added directory 'purchase_order_department/static/src/css' |
255 | === added directory 'purchase_order_department/static/src/img' |
256 | === added file 'purchase_order_department/static/src/img/icon.png' |
257 | Binary files purchase_order_department/static/src/img/icon.png 1970-01-01 00:00:00 +0000 and purchase_order_department/static/src/img/icon.png 2014-06-27 16:28:31 +0000 differ |
258 | === added directory 'purchase_order_department/static/src/js' |
259 | === added directory 'purchase_order_department/static/src/xml' |
260 | === added directory 'purchase_order_department/test' |
261 | === added directory 'purchase_order_department/view' |
262 | === added file 'purchase_order_department/view/purchase_order_view.xml' |
263 | --- purchase_order_department/view/purchase_order_view.xml 1970-01-01 00:00:00 +0000 |
264 | +++ purchase_order_department/view/purchase_order_view.xml 2014-06-27 16:28:31 +0000 |
265 | @@ -0,0 +1,48 @@ |
266 | +<?xml version="1.0"?> |
267 | +<openerp> |
268 | + <data> |
269 | + |
270 | + <record id="purchase_order_department_form" model="ir.ui.view"> |
271 | + <field name="name">purchase.order.department.form</field> |
272 | + <field name="model">purchase.order</field> |
273 | + <field name="inherit_id" ref="purchase_order_requisitor.inherit_purchase_order_view2"/> |
274 | + <field name="arch" type="xml"> |
275 | + <xpath expr="//field[@name='rfq_user_id']" position="after"> |
276 | + <field name="department_id"/> |
277 | + </xpath> |
278 | + <xpath expr="//field[@name='rfq_user_id']" position="attributes"> |
279 | + <attribute name="on_change">onchange_user_id(rfq_user_id)</attribute> |
280 | + </xpath> |
281 | + </field> |
282 | + </record> |
283 | + |
284 | + <record id="purchase_order_department_tree" model="ir.ui.view"> |
285 | + <field name="name">purchase.order.department.tree</field> |
286 | + <field name="model">purchase.order</field> |
287 | + <field name="inherit_id" ref="purchase.purchase_order_tree"/> |
288 | + <field name="arch" type="xml"> |
289 | + <xpath expr="//field[@name='date_order']" position="after"> |
290 | + <field name="department_id"/> |
291 | + </xpath> |
292 | + </field> |
293 | + </record> |
294 | + |
295 | + <record id="purchase_order_department_search" model="ir.ui.view"> |
296 | + <field name="name">purchase.order.department.search</field> |
297 | + <field name="model">purchase.order</field> |
298 | + <field name="inherit_id" ref="purchase.view_purchase_order_filter"/> |
299 | + <field name="arch" type="xml"> |
300 | + |
301 | + <xpath expr="//field[@name='product_id']" position="after"> |
302 | + <field name="department_id"/> |
303 | + </xpath> |
304 | + |
305 | + <xpath expr="//group" position="inside"> |
306 | + <filter string="Department" icon="terp-personal" context="{'group_by':'department_id'}"/> |
307 | + </xpath> |
308 | + |
309 | + </field> |
310 | + </record> |
311 | + |
312 | + </data> |
313 | +</openerp> |
314 | |
315 | === added directory 'purchase_order_department/wizard' |
316 | === added file 'purchase_order_department/wizard/__init__.py' |
317 | --- purchase_order_department/wizard/__init__.py 1970-01-01 00:00:00 +0000 |
318 | +++ purchase_order_department/wizard/__init__.py 2014-06-27 16:28:31 +0000 |
319 | @@ -0,0 +1,25 @@ |
320 | +#!/usr/bin/python |
321 | +# -*- encoding: utf-8 -*- |
322 | +############################################################################### |
323 | +# Module Writen to OpenERP, Open Source Management Solution |
324 | +# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). |
325 | +# All Rights Reserved |
326 | +############# Credits ######################################################### |
327 | +# Coded by: Katherine Zaoral <kathy@vauxoo.com> |
328 | +# Planified by: Humberto Arocha <hbto@vauxoo.com> |
329 | +# Audited by: Humberto Arocha <hbto@vauxoo.com> |
330 | +############################################################################### |
331 | +# This program is free software: you can redistribute it and/or modify |
332 | +# it under the terms of the GNU Affero General Public License as published |
333 | +# by the Free Software Foundation, either version 3 of the License, or |
334 | +# (at your option) any later version. |
335 | +# |
336 | +# This program is distributed in the hope that it will be useful, |
337 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
338 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
339 | +# GNU Affero General Public License for more details. |
340 | +# |
341 | +# You should have received a copy of the GNU Affero General Public License |
342 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
343 | +############################################################################### |
344 | + |
345 | |
346 | === added directory 'purchase_order_department/workflow' |
347 | === added file 'purchase_requisition_contract_analyst/i18n/purchase_requisition_contract_analyst.pot' |
348 | --- purchase_requisition_contract_analyst/i18n/purchase_requisition_contract_analyst.pot 1970-01-01 00:00:00 +0000 |
349 | +++ purchase_requisition_contract_analyst/i18n/purchase_requisition_contract_analyst.pot 2014-06-27 16:28:31 +0000 |
350 | @@ -0,0 +1,33 @@ |
351 | +# Translation of OpenERP Server. |
352 | +# This file contains the translation of the following modules: |
353 | +# * purchase_requisition_contract_analyst |
354 | +# |
355 | +msgid "" |
356 | +msgstr "" |
357 | +"Project-Id-Version: OpenERP Server 7.0\n" |
358 | +"Report-Msgid-Bugs-To: \n" |
359 | +"POT-Creation-Date: 2014-06-17 16:12+0000\n" |
360 | +"PO-Revision-Date: 2014-06-17 16:12+0000\n" |
361 | +"Last-Translator: <>\n" |
362 | +"Language-Team: \n" |
363 | +"MIME-Version: 1.0\n" |
364 | +"Content-Type: text/plain; charset=UTF-8\n" |
365 | +"Content-Transfer-Encoding: \n" |
366 | +"Plural-Forms: \n" |
367 | + |
368 | +#. module: purchase_requisition_contract_analyst |
369 | +#: help:purchase.requisition,purchaser_id:0 |
370 | +msgid "Contract Analyst responsible to evaluate the current purchase requisition." |
371 | +msgstr "" |
372 | + |
373 | +#. module: purchase_requisition_contract_analyst |
374 | +#: view:purchase.requisition:0 |
375 | +#: field:purchase.requisition,purchaser_id:0 |
376 | +msgid "P&C Analyst" |
377 | +msgstr "" |
378 | + |
379 | +#. module: purchase_requisition_contract_analyst |
380 | +#: model:ir.model,name:purchase_requisition_contract_analyst.model_purchase_requisition |
381 | +msgid "Purchase Requisition" |
382 | +msgstr "" |
383 | + |
384 | |
385 | === modified file 'purchase_requisition_contract_analyst/model/purchase_requisition.py' |
386 | --- purchase_requisition_contract_analyst/model/purchase_requisition.py 2014-05-29 17:11:02 +0000 |
387 | +++ purchase_requisition_contract_analyst/model/purchase_requisition.py 2014-06-27 16:28:31 +0000 |
388 | @@ -33,7 +33,7 @@ |
389 | _columns = { |
390 | 'purchaser_id': fields.many2one( |
391 | 'res.users', |
392 | - 'Contract Analyst', |
393 | + 'P&C Analyst', |
394 | help=('Contract Analyst responsible to evaluate the current' |
395 | ' purchase requisition.')), |
396 | } |
397 | |
398 | === modified file 'purchase_requisition_contract_analyst/view/purchase_requisition_view.xml' |
399 | --- purchase_requisition_contract_analyst/view/purchase_requisition_view.xml 2014-05-29 19:13:06 +0000 |
400 | +++ purchase_requisition_contract_analyst/view/purchase_requisition_view.xml 2014-06-27 16:28:31 +0000 |
401 | @@ -35,7 +35,7 @@ |
402 | </xpath> |
403 | |
404 | <xpath expr="//group" position="inside"> |
405 | - <filter string="Contract Analyst" icon="terp-personal" context="{'group_by':'purchaser_id'}"/> |
406 | + <filter string="P&C Analyst" icon="terp-personal" context="{'group_by':'purchaser_id'}"/> |
407 | </xpath> |
408 | |
409 | </field> |
410 | |
411 | === modified file 'purchase_requisition_line_plan/__openerp__.py' |
412 | --- purchase_requisition_line_plan/__openerp__.py 2014-06-13 14:00:03 +0000 |
413 | +++ purchase_requisition_line_plan/__openerp__.py 2014-06-27 16:28:31 +0000 |
414 | @@ -40,6 +40,7 @@ |
415 | 'purchase_requisition', |
416 | 'purchase_requisition_line_view', |
417 | 'pr_line_related_po_line', |
418 | + 'purchase_analytic_plans', |
419 | ], |
420 | 'data': [ |
421 | 'view/purchase_requisition_view.xml', |
422 | |
423 | === added directory 'purchase_requisition_line_price_unit' |
424 | === added file 'purchase_requisition_line_price_unit/__init__.py' |
425 | --- purchase_requisition_line_price_unit/__init__.py 1970-01-01 00:00:00 +0000 |
426 | +++ purchase_requisition_line_price_unit/__init__.py 2014-06-27 16:28:31 +0000 |
427 | @@ -0,0 +1,27 @@ |
428 | +#!/usr/bin/python |
429 | +# -*- encoding: utf-8 -*- |
430 | +############################################################################### |
431 | +# Module Writen to OpenERP, Open Source Management Solution |
432 | +# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). |
433 | +# All Rights Reserved |
434 | +############# Credits ######################################################### |
435 | +# Coded by: Yanina Aular <yani@vauxoo.com> |
436 | +# Planified by: Humberto Arocha <hbto@vauxoo.com> |
437 | +# Audited by: Humberto Arocha <hbto@vauxoo.com> |
438 | +############################################################################### |
439 | +# This program is free software: you can redistribute it and/or modify |
440 | +# it under the terms of the GNU Affero General Public License as published |
441 | +# by the Free Software Foundation, either version 3 of the License, or |
442 | +# (at your option) any later version. |
443 | +# |
444 | +# This program is distributed in the hope that it will be useful, |
445 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
446 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
447 | +# GNU Affero General Public License for more details. |
448 | +# |
449 | +# You should have received a copy of the GNU Affero General Public License |
450 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
451 | +############################################################################### |
452 | + |
453 | +import model |
454 | +import wizard |
455 | |
456 | === added file 'purchase_requisition_line_price_unit/__openerp__.py' |
457 | --- purchase_requisition_line_price_unit/__openerp__.py 1970-01-01 00:00:00 +0000 |
458 | +++ purchase_requisition_line_price_unit/__openerp__.py 2014-06-27 16:28:31 +0000 |
459 | @@ -0,0 +1,53 @@ |
460 | +#!/usr/bin/python |
461 | +# -*- encoding: utf-8 -*- |
462 | +############################################################################### |
463 | +# Module Writen to OpenERP, Open Source Management Solution |
464 | +# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). |
465 | +# All Rights Reserved |
466 | +############# Credits ######################################################### |
467 | +# Coded by: Yanina Aular <yani@vauxoo.com> |
468 | +# Planified by: Humberto Arocha <hbto@vauxoo.com> |
469 | +# Audited by: Humberto Arocha <hbto@vauxoo.com> |
470 | +############################################################################### |
471 | +# This program is free software: you can redistribute it and/or modify |
472 | +# it under the terms of the GNU Affero General Public License as published |
473 | +# by the Free Software Foundation, either version 3 of the License, or |
474 | +# (at your option) any later version. |
475 | +# |
476 | +# This program is distributed in the hope that it will be useful, |
477 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
478 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
479 | +# GNU Affero General Public License for more details. |
480 | +# |
481 | +# You should have received a copy of the GNU Affero General Public License |
482 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
483 | +############################################################################### |
484 | + |
485 | +{ |
486 | + 'name': 'Purchase Requisition Line Price Unit', |
487 | + 'version': '1.0', |
488 | + 'author': 'Vauxoo', |
489 | + 'website': 'http://www.vauxoo.com/', |
490 | + 'category': '', |
491 | + 'description': ''' |
492 | +Purchase Requisition Line Price Unit |
493 | +==================================== |
494 | + |
495 | +An estimated unit price per line in the purchase requisition, a subtotal for each line |
496 | +of the purchase requisition and a total of all lines is added. |
497 | +''', |
498 | + 'depends': [ |
499 | + 'purchase_requisition_currency', |
500 | + 'purchase_requisition', |
501 | + ], |
502 | + 'data': [ |
503 | + 'view/purchase_requisition_view.xml' |
504 | + ], |
505 | + 'demo': [], |
506 | + 'test': [], |
507 | + 'qweb': [], |
508 | + 'js': [], |
509 | + 'css': [], |
510 | + 'active': False, |
511 | + 'installable': True, |
512 | +} |
513 | |
514 | === added directory 'purchase_requisition_line_price_unit/data' |
515 | === added directory 'purchase_requisition_line_price_unit/demo' |
516 | === added directory 'purchase_requisition_line_price_unit/doc' |
517 | === added directory 'purchase_requisition_line_price_unit/doc/images' |
518 | === added directory 'purchase_requisition_line_price_unit/i18n' |
519 | === added directory 'purchase_requisition_line_price_unit/model' |
520 | === added file 'purchase_requisition_line_price_unit/model/__init__.py' |
521 | --- purchase_requisition_line_price_unit/model/__init__.py 1970-01-01 00:00:00 +0000 |
522 | +++ purchase_requisition_line_price_unit/model/__init__.py 2014-06-27 16:28:31 +0000 |
523 | @@ -0,0 +1,26 @@ |
524 | +#!/usr/bin/python |
525 | +# -*- encoding: utf-8 -*- |
526 | +############################################################################### |
527 | +# Module Writen to OpenERP, Open Source Management Solution |
528 | +# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). |
529 | +# All Rights Reserved |
530 | +############# Credits ######################################################### |
531 | +# Coded by: Yanina Aular <yani@vauxoo.com> |
532 | +# Planified by: Humberto Arocha <hbto@vauxoo.com> |
533 | +# Audited by: Humberto Arocha <hbto@vauxoo.com> |
534 | +############################################################################### |
535 | +# This program is free software: you can redistribute it and/or modify |
536 | +# it under the terms of the GNU Affero General Public License as published |
537 | +# by the Free Software Foundation, either version 3 of the License, or |
538 | +# (at your option) any later version. |
539 | +# |
540 | +# This program is distributed in the hope that it will be useful, |
541 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
542 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
543 | +# GNU Affero General Public License for more details. |
544 | +# |
545 | +# You should have received a copy of the GNU Affero General Public License |
546 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
547 | +############################################################################### |
548 | + |
549 | +import purchase_requisition_line |
550 | |
551 | === added file 'purchase_requisition_line_price_unit/model/purchase_requisition_line.py' |
552 | --- purchase_requisition_line_price_unit/model/purchase_requisition_line.py 1970-01-01 00:00:00 +0000 |
553 | +++ purchase_requisition_line_price_unit/model/purchase_requisition_line.py 2014-06-27 16:28:31 +0000 |
554 | @@ -0,0 +1,86 @@ |
555 | +# -*- encoding: utf-8 -*- |
556 | +######################################################################## |
557 | +# |
558 | +# OpenERP, Open Source Management Solution |
559 | +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved |
560 | +# $Id$ |
561 | +# |
562 | +# This program is free software: you can redistribute it and/or modify |
563 | +# it under the terms of the GNU Affero General Public License as published by |
564 | +# the Free Software Foundation, either version 3 of the License, or |
565 | +# (at your option) any later version. |
566 | +# |
567 | +# This program is distributed in the hope that it will be useful, |
568 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
569 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
570 | +# GNU Affero General Public License for more details. |
571 | +# |
572 | +# You should have received a copy of the GNU Affero General Public License |
573 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
574 | +# |
575 | +######################################################################## |
576 | +from datetime import datetime |
577 | +from dateutil.relativedelta import relativedelta |
578 | +import time |
579 | +from openerp import netsvc |
580 | + |
581 | +from openerp.osv import fields, osv |
582 | +from openerp.tools.translate import _ |
583 | +import openerp.addons.decimal_precision as dp |
584 | +from openerp import tools |
585 | + |
586 | +class purchase_requisition(osv.Model): |
587 | + _inherit = "purchase.requisition" |
588 | + |
589 | + def _get_requisition(self, cr, uid, ids, context=None): |
590 | + result = {} |
591 | + for line in self.pool.get('purchase.requisition.line').browse(cr, uid, ids, context=context): |
592 | + result[line.requisition_id.id] = True |
593 | + return result.keys() |
594 | + |
595 | + def _amount_all(self, cr, uid, ids, field_name, arg, context=None): |
596 | + res = {} |
597 | + cur_obj=self.pool.get('res.currency') |
598 | + for requisition in self.browse(cr, uid, ids, context=context): |
599 | + res[requisition.id] = { |
600 | + 'amount_untaxed': 0.0, |
601 | + 'amount_tax': 0.0, |
602 | + 'amount_total': 0.0, |
603 | + } |
604 | + val = val1 = 0.0 |
605 | + cur = requisition.currency_id |
606 | + for line in requisition.line_ids: |
607 | + val1 += line.price_subtotal |
608 | + for c in self.pool.get('account.tax').compute_all(cr, uid, [], line.price_unit, line.product_qty, line.product_id)['taxes']: |
609 | + val += c.get('amount', 0.0) |
610 | + #res[requisition.id]['amount_tax']=cur_obj.round(cr, uid, cur, val) |
611 | + amount_untaxed =cur_obj.round(cr, uid, cur, val1) |
612 | + res[requisition.id]['amount_total']= amount_untaxed # + res[requisition.id]['amount_tax'] |
613 | + return res |
614 | + |
615 | + _columns = { |
616 | + 'amount_total': fields.function(_amount_all, digits_compute= dp.get_precision('Account'), string='Total', |
617 | + store={ |
618 | + 'purchase.requisition.line': (_get_requisition, None, 10), |
619 | + }, multi="sums",help="The total amount"), |
620 | + } |
621 | + |
622 | +class purchase_requisition_line(osv.Model): |
623 | + _inherit = "purchase.requisition.line" |
624 | + |
625 | + def _amount_line(self, cr, uid, ids, prop, arg, context=None): |
626 | + res = {} |
627 | + cur_obj=self.pool.get('res.currency') |
628 | + tax_obj = self.pool.get('account.tax') |
629 | + for line in self.browse(cr, uid, ids, context=context): |
630 | + taxes = tax_obj.compute_all(cr, uid, [], line.price_unit, line.product_qty, line.product_id) |
631 | + #cur = line.requisition_id.pricelist_id.currency_id |
632 | + cur = line.requisition_id.currency_id |
633 | + res[line.id] = cur_obj.round(cr, uid, cur, taxes['total']) |
634 | + return res |
635 | + |
636 | + _columns = { |
637 | + 'price_unit': fields.float('Unit Price', digits_compute= dp.get_precision('Product Price')), |
638 | + 'price_subtotal': fields.function(_amount_line, string='Subtotal', digits_compute= dp.get_precision('Account')), |
639 | + } |
640 | + |
641 | |
642 | === added directory 'purchase_requisition_line_price_unit/report' |
643 | === added directory 'purchase_requisition_line_price_unit/security' |
644 | === added directory 'purchase_requisition_line_price_unit/static' |
645 | === added directory 'purchase_requisition_line_price_unit/static/description' |
646 | === added file 'purchase_requisition_line_price_unit/static/description/index.html' |
647 | === added directory 'purchase_requisition_line_price_unit/static/src' |
648 | === added directory 'purchase_requisition_line_price_unit/static/src/css' |
649 | === added directory 'purchase_requisition_line_price_unit/static/src/img' |
650 | === added file 'purchase_requisition_line_price_unit/static/src/img/icon.png' |
651 | Binary files purchase_requisition_line_price_unit/static/src/img/icon.png 1970-01-01 00:00:00 +0000 and purchase_requisition_line_price_unit/static/src/img/icon.png 2014-06-27 16:28:31 +0000 differ |
652 | === added directory 'purchase_requisition_line_price_unit/static/src/js' |
653 | === added directory 'purchase_requisition_line_price_unit/static/src/xml' |
654 | === added directory 'purchase_requisition_line_price_unit/test' |
655 | === added directory 'purchase_requisition_line_price_unit/view' |
656 | === added file 'purchase_requisition_line_price_unit/view/purchase_requisition_view.xml' |
657 | --- purchase_requisition_line_price_unit/view/purchase_requisition_view.xml 1970-01-01 00:00:00 +0000 |
658 | +++ purchase_requisition_line_price_unit/view/purchase_requisition_view.xml 2014-06-27 16:28:31 +0000 |
659 | @@ -0,0 +1,26 @@ |
660 | +<?xml version="1.0"?> |
661 | +<openerp> |
662 | + <data> |
663 | + <record id="view_purchase_requisition_form_inherit_price_unit" model="ir.ui.view"> |
664 | + <field name="name">purchase.requisition.form.inherit.price_unit</field> |
665 | + <field name="model">purchase.requisition</field> |
666 | + <field name="inherit_id" ref="purchase_requisition.view_purchase_requisition_form"/> |
667 | + <field name="arch" type="xml"> |
668 | + <xpath expr="//field[@name='line_ids']//tree//field[@name='product_qty'][last()]" position="after"> |
669 | + <field name="price_unit" required="1"/> |
670 | + <field name="price_subtotal" required="1"/> |
671 | + </xpath> |
672 | + <xpath expr="//field[@name='line_ids']//form//field[@name='product_qty'][last()]" position="after"> |
673 | + <field name="price_unit" required="1"/> |
674 | + <field name="price_subtotal" required="1"/> |
675 | + </xpath> |
676 | + <xpath expr="//field[@name='line_ids']" position="after"> |
677 | + <group class="oe_subtotal_footer oe_right"> |
678 | + <field name="amount_total" class="oe_subtotal_footer_separator" widget="monetary" options="{'currency_field': 'currency_id'}"/> |
679 | + </group> |
680 | + </xpath> |
681 | + </field> |
682 | + </record> |
683 | + |
684 | + </data> |
685 | +</openerp> |
686 | |
687 | === added directory 'purchase_requisition_line_price_unit/wizard' |
688 | === added file 'purchase_requisition_line_price_unit/wizard/__init__.py' |
689 | --- purchase_requisition_line_price_unit/wizard/__init__.py 1970-01-01 00:00:00 +0000 |
690 | +++ purchase_requisition_line_price_unit/wizard/__init__.py 2014-06-27 16:28:31 +0000 |
691 | @@ -0,0 +1,25 @@ |
692 | +#!/usr/bin/python |
693 | +# -*- encoding: utf-8 -*- |
694 | +############################################################################### |
695 | +# Module Writen to OpenERP, Open Source Management Solution |
696 | +# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). |
697 | +# All Rights Reserved |
698 | +############# Credits ######################################################### |
699 | +# Coded by: Yanina Aular <yani@vauxoo.com> |
700 | +# Planified by: Humberto Arocha <hbto@vauxoo.com> |
701 | +# Audited by: Humberto Arocha <hbto@vauxoo.com> |
702 | +############################################################################### |
703 | +# This program is free software: you can redistribute it and/or modify |
704 | +# it under the terms of the GNU Affero General Public License as published |
705 | +# by the Free Software Foundation, either version 3 of the License, or |
706 | +# (at your option) any later version. |
707 | +# |
708 | +# This program is distributed in the hope that it will be useful, |
709 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
710 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
711 | +# GNU Affero General Public License for more details. |
712 | +# |
713 | +# You should have received a copy of the GNU Affero General Public License |
714 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
715 | +############################################################################### |
716 | + |
717 | |
718 | === added directory 'purchase_requisition_line_price_unit/workflow' |
719 | === added directory 'purchase_requisition_supplier_list' |
720 | === added file 'purchase_requisition_supplier_list/__init__.py' |
721 | --- purchase_requisition_supplier_list/__init__.py 1970-01-01 00:00:00 +0000 |
722 | +++ purchase_requisition_supplier_list/__init__.py 2014-06-27 16:28:31 +0000 |
723 | @@ -0,0 +1,28 @@ |
724 | +#!/usr/bin/python |
725 | +# -*- encoding: utf-8 -*- |
726 | +############################################################################### |
727 | +# Module Writen to OpenERP, Open Source Management Solution |
728 | +# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). |
729 | +# All Rights Reserved |
730 | +############# Credits ######################################################### |
731 | +# Coded by: Katherine Zaoral <kathy@vauxoo.com> |
732 | +# Planified by: Humberto Arocha <hbto@vauxoo.com>, |
733 | +# Katherine Zaoral <kathy@vauxoo.com> |
734 | +# Audited by: Humberto Arocha <hbto@vauxoo.com> |
735 | +############################################################################### |
736 | +# This program is free software: you can redistribute it and/or modify |
737 | +# it under the terms of the GNU Affero General Public License as published |
738 | +# by the Free Software Foundation, either version 3 of the License, or |
739 | +# (at your option) any later version. |
740 | +# |
741 | +# This program is distributed in the hope that it will be useful, |
742 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
743 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
744 | +# GNU Affero General Public License for more details. |
745 | +# |
746 | +# You should have received a copy of the GNU Affero General Public License |
747 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
748 | +############################################################################### |
749 | + |
750 | +import model |
751 | +import wizard |
752 | |
753 | === added file 'purchase_requisition_supplier_list/__openerp__.py' |
754 | --- purchase_requisition_supplier_list/__openerp__.py 1970-01-01 00:00:00 +0000 |
755 | +++ purchase_requisition_supplier_list/__openerp__.py 2014-06-27 16:28:31 +0000 |
756 | @@ -0,0 +1,54 @@ |
757 | +#!/usr/bin/python |
758 | +# -*- encoding: utf-8 -*- |
759 | +############################################################################### |
760 | +# Module Writen to OpenERP, Open Source Management Solution |
761 | +# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). |
762 | +# All Rights Reserved |
763 | +############# Credits ######################################################### |
764 | +# Coded by: Katherine Zaoral <kathy@vauxoo.com> |
765 | +# Planified by: Humberto Arocha <hbto@vauxoo.com>, |
766 | +# Katherine Zaoral <kathy@vauxoo.com> |
767 | +# Audited by: Humberto Arocha <hbto@vauxoo.com> |
768 | +############################################################################### |
769 | +# This program is free software: you can redistribute it and/or modify |
770 | +# it under the terms of the GNU Affero General Public License as published |
771 | +# by the Free Software Foundation, either version 3 of the License, or |
772 | +# (at your option) any later version. |
773 | +# |
774 | +# This program is distributed in the hope that it will be useful, |
775 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
776 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
777 | +# GNU Affero General Public License for more details. |
778 | +# |
779 | +# You should have received a copy of the GNU Affero General Public License |
780 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
781 | +############################################################################### |
782 | + |
783 | +{ |
784 | + 'name': 'Purchase Requisition Supplier List', |
785 | + 'version': '1.0', |
786 | + 'author': 'Vauxoo', |
787 | + 'website': 'http://www.vauxoo.com/', |
788 | + 'category': 'purchase', |
789 | + 'description': ''' |
790 | +Purchase Requisition Supplier List |
791 | +================================== |
792 | + |
793 | +This module add to the purchase requisition document a functionality to manage |
794 | +a list of suggested suppliers. |
795 | + |
796 | +''', |
797 | + 'depends': [ |
798 | + 'purchase_requisition' |
799 | + ], |
800 | + 'data': [ |
801 | + 'view/purchase_requisition_view.xml', |
802 | + ], |
803 | + 'demo': [], |
804 | + 'test': [], |
805 | + 'qweb': [], |
806 | + 'js': [], |
807 | + 'css': [], |
808 | + 'active': False, |
809 | + 'installable': True, |
810 | +} |
811 | |
812 | === added directory 'purchase_requisition_supplier_list/data' |
813 | === added directory 'purchase_requisition_supplier_list/demo' |
814 | === added directory 'purchase_requisition_supplier_list/doc' |
815 | === added directory 'purchase_requisition_supplier_list/doc/images' |
816 | === added directory 'purchase_requisition_supplier_list/i18n' |
817 | === added file 'purchase_requisition_supplier_list/i18n/purchase_requisition_supplier_list.pot' |
818 | --- purchase_requisition_supplier_list/i18n/purchase_requisition_supplier_list.pot 1970-01-01 00:00:00 +0000 |
819 | +++ purchase_requisition_supplier_list/i18n/purchase_requisition_supplier_list.pot 2014-06-27 16:28:31 +0000 |
820 | @@ -0,0 +1,42 @@ |
821 | +# Translation of OpenERP Server. |
822 | +# This file contains the translation of the following modules: |
823 | +# * purchase_requisition_supplier_list |
824 | +# |
825 | +msgid "" |
826 | +msgstr "" |
827 | +"Project-Id-Version: OpenERP Server 7.0\n" |
828 | +"Report-Msgid-Bugs-To: \n" |
829 | +"POT-Creation-Date: 2014-05-29 15:29+0000\n" |
830 | +"PO-Revision-Date: 2014-05-29 15:29+0000\n" |
831 | +"Last-Translator: <>\n" |
832 | +"Language-Team: \n" |
833 | +"MIME-Version: 1.0\n" |
834 | +"Content-Type: text/plain; charset=UTF-8\n" |
835 | +"Content-Transfer-Encoding: \n" |
836 | +"Plural-Forms: \n" |
837 | + |
838 | +#. module: purchase_requisition_supplier_list |
839 | +#: field:purchase.requisition,supplier_ids:0 |
840 | +msgid "Suppliers" |
841 | +msgstr "" |
842 | + |
843 | +#. module: purchase_requisition_supplier_list |
844 | +#: help:purchase.requisition,suggested_suppliers:0 |
845 | +msgid "The suppliers suggested to compete for the current purchase requisition." |
846 | +msgstr "" |
847 | + |
848 | +#. module: purchase_requisition_supplier_list |
849 | +#: model:ir.model,name:purchase_requisition_supplier_list.model_purchase_requisition |
850 | +msgid "Purchase Requisition" |
851 | +msgstr "" |
852 | + |
853 | +#. module: purchase_requisition_supplier_list |
854 | +#: help:purchase.requisition,supplier_ids:0 |
855 | +msgid "The Suppliers that will participate in the tender. This suppliers can only be defined by the purchase analyst in the phase of Prepare Tenderplan." |
856 | +msgstr "" |
857 | + |
858 | +#. module: purchase_requisition_supplier_list |
859 | +#: field:purchase.requisition,suggested_suppliers:0 |
860 | +msgid "Suggested Suppliers" |
861 | +msgstr "" |
862 | + |
863 | |
864 | === added directory 'purchase_requisition_supplier_list/model' |
865 | === added file 'purchase_requisition_supplier_list/model/__init__.py' |
866 | --- purchase_requisition_supplier_list/model/__init__.py 1970-01-01 00:00:00 +0000 |
867 | +++ purchase_requisition_supplier_list/model/__init__.py 2014-06-27 16:28:31 +0000 |
868 | @@ -0,0 +1,27 @@ |
869 | +#!/usr/bin/python |
870 | +# -*- encoding: utf-8 -*- |
871 | +############################################################################### |
872 | +# Module Writen to OpenERP, Open Source Management Solution |
873 | +# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). |
874 | +# All Rights Reserved |
875 | +############# Credits ######################################################### |
876 | +# Coded by: Katherine Zaoral <kathy@vauxoo.com> |
877 | +# Planified by: Humberto Arocha <hbto@vauxoo.com>, |
878 | +# Katherine Zaoral <kathy@vauxoo.com> |
879 | +# Audited by: Humberto Arocha <hbto@vauxoo.com> |
880 | +############################################################################### |
881 | +# This program is free software: you can redistribute it and/or modify |
882 | +# it under the terms of the GNU Affero General Public License as published |
883 | +# by the Free Software Foundation, either version 3 of the License, or |
884 | +# (at your option) any later version. |
885 | +# |
886 | +# This program is distributed in the hope that it will be useful, |
887 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
888 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
889 | +# GNU Affero General Public License for more details. |
890 | +# |
891 | +# You should have received a copy of the GNU Affero General Public License |
892 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
893 | +############################################################################### |
894 | + |
895 | +import purchase_requisition |
896 | |
897 | === added file 'purchase_requisition_supplier_list/model/purchase_requisition.py' |
898 | --- purchase_requisition_supplier_list/model/purchase_requisition.py 1970-01-01 00:00:00 +0000 |
899 | +++ purchase_requisition_supplier_list/model/purchase_requisition.py 2014-06-27 16:28:31 +0000 |
900 | @@ -0,0 +1,69 @@ |
901 | +#!/usr/bin/python |
902 | +# -*- encoding: utf-8 -*- |
903 | +############################################################################### |
904 | +# Module Writen to OpenERP, Open Source Management Solution |
905 | +# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). |
906 | +# All Rights Reserved |
907 | +############# Credits ######################################################### |
908 | +# Coded by: Katherine Zaoral <kathy@vauxoo.com> |
909 | +# Planified by: Humberto Arocha <hbto@vauxoo.com>, |
910 | +# Katherine Zaoral <kathy@vauxoo.com> |
911 | +# Audited by: Humberto Arocha <hbto@vauxoo.com> |
912 | +############################################################################### |
913 | +# This program is free software: you can redistribute it and/or modify |
914 | +# it under the terms of the GNU Affero General Public License as published |
915 | +# by the Free Software Foundation, either version 3 of the License, or |
916 | +# (at your option) any later version. |
917 | +# |
918 | +# This program is distributed in the hope that it will be useful, |
919 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
920 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
921 | +# GNU Affero General Public License for more details. |
922 | +# |
923 | +# You should have received a copy of the GNU Affero General Public License |
924 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
925 | +############################################################################### |
926 | + |
927 | +from openerp.osv import fields, osv, orm |
928 | +from openerp.tools.translate import _ |
929 | +from openerp import tools |
930 | + |
931 | +class purchase_requisition(osv.Model): |
932 | + """ |
933 | + This is an extension of the purchase requisition model to add the |
934 | + functionality to manage a suggested list of partners. |
935 | + """ |
936 | + |
937 | + _inherit = 'purchase.requisition' |
938 | + _columns = { |
939 | + 'suggested_supplier_ids': fields.many2many( |
940 | + 'res.partner', |
941 | + 'purchase_requisition_suggested_suppliers_rel', |
942 | + 'purchase_requisition_id', 'partner_id', |
943 | + 'Suggested Suppliers', |
944 | + help=('The suppliers suggested to compete for the current' |
945 | + ' purchase requisition.')), |
946 | + 'supplier_ids': fields.many2many( |
947 | + 'res.partner', |
948 | + 'purchase_requisition_suppliers', |
949 | + 'purchase_requisition_id', 'partner_id', |
950 | + 'Suppliers', |
951 | + help=('The Suppliers that will participate in the tender. This' |
952 | + ' suppliers can only be defined by the purchase analyst in' |
953 | + ' the phase of Prepare Tenderplan.')), |
954 | + } |
955 | + |
956 | + def create_orders(self, cr, uid, ids, context=None): |
957 | + """ |
958 | + This method create the quotations of the purchase requisition for all |
959 | + the partners given in the purchase requisition suggested partner. |
960 | + @return True |
961 | + """ |
962 | + context = context or {} |
963 | + ids = isinstance(ids, (int, long)) and [ids] or ids |
964 | + for req_brw in self.browse(cr, uid, ids, context=context): |
965 | + map( |
966 | + lambda partner_brw: self.make_purchase_order( |
967 | + cr, uid, [req_brw.id], partner_brw.id, context=context), |
968 | + req_brw.supplier_ids) |
969 | + return True |
970 | |
971 | === added directory 'purchase_requisition_supplier_list/report' |
972 | === added directory 'purchase_requisition_supplier_list/security' |
973 | === added directory 'purchase_requisition_supplier_list/static' |
974 | === added directory 'purchase_requisition_supplier_list/static/description' |
975 | === added file 'purchase_requisition_supplier_list/static/description/index.html' |
976 | === added directory 'purchase_requisition_supplier_list/static/src' |
977 | === added directory 'purchase_requisition_supplier_list/static/src/css' |
978 | === added directory 'purchase_requisition_supplier_list/static/src/img' |
979 | === added file 'purchase_requisition_supplier_list/static/src/img/icon.png' |
980 | Binary files purchase_requisition_supplier_list/static/src/img/icon.png 1970-01-01 00:00:00 +0000 and purchase_requisition_supplier_list/static/src/img/icon.png 2014-06-27 16:28:31 +0000 differ |
981 | === added directory 'purchase_requisition_supplier_list/static/src/js' |
982 | === added directory 'purchase_requisition_supplier_list/static/src/xml' |
983 | === added directory 'purchase_requisition_supplier_list/test' |
984 | === added directory 'purchase_requisition_supplier_list/view' |
985 | === added file 'purchase_requisition_supplier_list/view/purchase_requisition_view.xml' |
986 | --- purchase_requisition_supplier_list/view/purchase_requisition_view.xml 1970-01-01 00:00:00 +0000 |
987 | +++ purchase_requisition_supplier_list/view/purchase_requisition_view.xml 2014-06-27 16:28:31 +0000 |
988 | @@ -0,0 +1,33 @@ |
989 | +<?xml version="1.0" encoding="utf-8"?> |
990 | +<openerp> |
991 | + <data> |
992 | + |
993 | + <record model="ir.ui.view" id="purchase_requisition_suppliers_form_view"> |
994 | + <field name="name">purchase.requisition.suppliers.form</field> |
995 | + <field name="model">purchase.requisition</field> |
996 | + <field name="inherit_id" ref="purchase_requisition.view_purchase_requisition_form"/> |
997 | + <field name="arch" type="xml"> |
998 | + |
999 | + <xpath expr="//notebook" position="inside"> |
1000 | + <page string="Suppliers"> |
1001 | + <separator string="Suggested Suppliers"/> |
1002 | + <field name="suggested_supplier_ids"/> |
1003 | + <separator string="Suppliers"/> |
1004 | + <field name="supplier_ids"/> |
1005 | + </page> |
1006 | + </xpath> |
1007 | + |
1008 | + <xpath expr="//button[@string='Request a Quotation']" position="attributes"> |
1009 | + <attribute name="name">create_orders</attribute> |
1010 | + <attribute name="type">object</attribute> |
1011 | + <attribute name="string">Request Quotations</attribute> |
1012 | + </xpath> |
1013 | + |
1014 | + </field> |
1015 | + </record> |
1016 | + |
1017 | + </data> |
1018 | +</openerp> |
1019 | + |
1020 | + |
1021 | + |
1022 | |
1023 | === added directory 'purchase_requisition_supplier_list/wizard' |
1024 | === added file 'purchase_requisition_supplier_list/wizard/__init__.py' |
1025 | --- purchase_requisition_supplier_list/wizard/__init__.py 1970-01-01 00:00:00 +0000 |
1026 | +++ purchase_requisition_supplier_list/wizard/__init__.py 2014-06-27 16:28:31 +0000 |
1027 | @@ -0,0 +1,26 @@ |
1028 | +#!/usr/bin/python |
1029 | +# -*- encoding: utf-8 -*- |
1030 | +############################################################################### |
1031 | +# Module Writen to OpenERP, Open Source Management Solution |
1032 | +# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>). |
1033 | +# All Rights Reserved |
1034 | +############# Credits ######################################################### |
1035 | +# Coded by: Katherine Zaoral <kathy@vauxoo.com> |
1036 | +# Planified by: Humberto Arocha <hbto@vauxoo.com>, |
1037 | +# Katherine Zaoral <kathy@vauxoo.com> |
1038 | +# Audited by: Humberto Arocha <hbto@vauxoo.com> |
1039 | +############################################################################### |
1040 | +# This program is free software: you can redistribute it and/or modify |
1041 | +# it under the terms of the GNU Affero General Public License as published |
1042 | +# by the Free Software Foundation, either version 3 of the License, or |
1043 | +# (at your option) any later version. |
1044 | +# |
1045 | +# This program is distributed in the hope that it will be useful, |
1046 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1047 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1048 | +# GNU Affero General Public License for more details. |
1049 | +# |
1050 | +# You should have received a copy of the GNU Affero General Public License |
1051 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1052 | +############################################################################### |
1053 | + |
1054 | |
1055 | === added directory 'purchase_requisition_supplier_list/workflow' |
Orange Light
https:/ /docs.google. com/a/vauxoo. com/file/ d/0B1w9gokcJL9h bi1iTHcxNXFJeEE /edit?usp= drivesdk
Warning being show are unralated the features being merged
https:/ /docs.google. com/a/vauxoo. com/file/ d/0B1w9gokcJL9h NVd4RjVDemw3V1k /edit?usp= drivesdk