Merge lp:~vauxoo/addons-vauxoo/mrp_production_make_confirm_wzd_dev_luis into lp:addons-vauxoo

Proposed by Luis Torres - http://www.vauxoo.com
Status: Needs review
Proposed branch: lp:~vauxoo/addons-vauxoo/mrp_production_make_confirm_wzd_dev_luis
Merge into: lp:addons-vauxoo
Diff against target: 104 lines (+70/-1)
4 files modified
mrp_production_make_wzd/wizard/__init__.py (+1/-0)
mrp_production_make_wzd/wizard/mrp_confirm.py (+43/-0)
mrp_production_make_wzd/wizard/wizard_production_make.py (+1/-1)
mrp_production_make_wzd/wizard/wizard_production_make.xml (+25/-0)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/mrp_production_make_confirm_wzd_dev_luis
Reviewer Review Type Date Requested Status
Moisés López - http://www.vauxoo.com Pending
Julio Serna-http://www.vauxoo.com Pending
Review via email: mp+119597@code.launchpad.net

Description of the change

Se agrega un wizard para confirmar las ordenes de produccion.

To post a comment you must log in.

Unmerged revisions

400. By Luis Torres - http://www.vauxoo.com

[IMP][mrp_production_make_wzd]will change the code to not display the wizard in the view form

399. By Luis Torres - http://www.vauxoo.com

[ADD][mrp_production_make_wzd]Add wizard for confirm manufacturing orders

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mrp_production_make_wzd/wizard/__init__.py'
2--- mrp_production_make_wzd/wizard/__init__.py 2012-08-13 19:17:48 +0000
3+++ mrp_production_make_wzd/wizard/__init__.py 2012-08-14 17:51:25 +0000
4@@ -24,3 +24,4 @@
5 #
6 ##############################################################################
7 import wizard_production_make
8+import mrp_confirm
9
10=== added file 'mrp_production_make_wzd/wizard/mrp_confirm.py'
11--- mrp_production_make_wzd/wizard/mrp_confirm.py 1970-01-01 00:00:00 +0000
12+++ mrp_production_make_wzd/wizard/mrp_confirm.py 2012-08-14 17:51:25 +0000
13@@ -0,0 +1,43 @@
14+# -*- encoding: utf-8 -*-
15+###########################################################################
16+# Module Writen to OpenERP, Open Source Management Solution
17+#
18+# Copyright (c) 2010 Vauxoo - http://www.vauxoo.com/
19+# All Rights Reserved.
20+# info Vauxoo (info@vauxoo.com)
21+############################################################################
22+# Coded by: Luis Torres (luis_t@vauxoo.com)
23+############################################################################
24+#
25+# This program is free software: you can redistribute it and/or modify
26+# it under the terms of the GNU Affero General Public License as
27+# published by the Free Software Foundation, either version 3 of the
28+# License, or (at your option) any later version.
29+#
30+# This program is distributed in the hope that it will be useful,
31+# but WITHOUT ANY WARRANTY; without even the implied warranty of
32+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33+# GNU Affero General Public License for more details.
34+#
35+# You should have received a copy of the GNU Affero General Public License
36+# along with this program. If not, see <http://www.gnu.org/licenses/>.
37+#
38+##############################################################################
39+from osv import osv, fields
40+import netsvc
41+
42+class wizard_confirm_order(osv.osv_memory):
43+ _name='wizard.confirm.order'
44+
45+ def confirm_order(self, cr, uid, ids, context=None):
46+ ids_orders=context.get('active_ids')
47+ for order in ids_orders:
48+ production_obj=self.pool.get('mrp.production')
49+ state_order=production_obj.browse(cr, uid, order, context=context).state
50+ if state_order=='draft':
51+ wf_service = netsvc.LocalService("workflow")
52+ wf_service.trg_validate(uid, 'mrp.production', order, 'button_confirm', cr)
53+ return {}
54+wizard_confirm_order()
55+
56+
57
58=== modified file 'mrp_production_make_wzd/wizard/wizard_production_make.py'
59--- mrp_production_make_wzd/wizard/wizard_production_make.py 2012-08-13 23:25:21 +0000
60+++ mrp_production_make_wzd/wizard/wizard_production_make.py 2012-08-14 17:51:25 +0000
61@@ -67,7 +67,7 @@
62 })
63 list_orders.append(production_id)
64 return {
65- 'name': 'Customer Invoices',
66+ 'name': 'Manufacturing Orders',
67 'view_type': 'form',
68 'view_mode': 'tree,form',
69 'res_model': 'mrp.production',
70
71=== modified file 'mrp_production_make_wzd/wizard/wizard_production_make.xml'
72--- mrp_production_make_wzd/wizard/wizard_production_make.xml 2012-08-13 22:44:18 +0000
73+++ mrp_production_make_wzd/wizard/wizard_production_make.xml 2012-08-14 17:51:25 +0000
74@@ -26,5 +26,30 @@
75 <field name="target">new</field>
76 </record>
77 <menuitem id="menu_action_mrp_product_produce_wizard_form" name="Add Many Manufacturing Orders" parent="mrp.menu_mrp_manufacturing" action="act_mrp_product_produce_wizard"/>
78+
79+ <!--confirm manufacturing order-->
80+ <record model="ir.ui.view" id="confirm_manufacturing_order">
81+ <field name="name">confirm.manufacturing.order</field>
82+ <field name="model">wizard.confirm.order</field>
83+ <field name="type">form</field>
84+ <field name="arch" type="xml">
85+ <form string="Production Make">
86+ <label string="" colspan="4"/>
87+ <label string="Sure to confirm the manufacturing orders" colspan="4"/>
88+ <separator string="" colspan="6"/>
89+ <button type="special" special="cancel" string="_Cancel" icon="gtk-cancel"/>
90+ <button type="object" string="Confirm Orders" name="confirm_order" icon="gtk-ok"/>
91+ </form>
92+ </field>
93+ </record>
94+
95+ <act_window id="draft_to_confirm_wzr"
96+ name="Confirm Manufacturing Order"
97+ res_model="wizard.confirm.order"
98+ src_model="mrp.production"
99+ view_mode="form"
100+ target="new"
101+ key2="client_action_multi"
102+ multi="True"/>
103 </data>
104 </openerp>