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