Anup(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.0-opw_4634-ach into
lp:openobject-addons/6.0.
Requested reviews:
Jay Vora (OpenERP) (jvo-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw_4634-ach/+merge/55493
Hello,
When mrp_operations is installed it's not possible to cancel the
Manufacturing Order. Here is the solution for the problem.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw_4634-ach/+merge/55493
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.0-opw_4634-ach.
=== modified file 'mrp_operations/mrp_operations.py'
--- mrp_operations/mrp_operations.py 2011-01-14 00:11:01 +0000
+++ mrp_operations/mrp_operations.py 2011-03-30 09:11:33 +0000
@@ -244,15 +244,17 @@
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', workcenter_line.id, 'button_start_working', cr)
return super(mrp_production,self).action_in_production(cr, uid, ids)
- def action_cancel(self, cr, uid, ids):
+ def action_cancel(self, cr, uid, ids,context=None):
""" Cancels work order if production order is canceled.
@return: Super method
"""
- obj = self.browse(cr, uid, ids)[0]
+ if context is None:
+ context = {}
+ obj = self.browse(cr, uid, ids,context)[0]
wf_service = netsvc.LocalService("workflow")
for workcenter_line in obj.workcenter_lines:
wf_service.trg_validate(uid, 'mrp.production.workcenter.line', workcenter_line.id, 'button_cancel', cr)
- return super(mrp_production,self).action_cancel(cr,uid,ids)
+ return super(mrp_production,self).action_cancel(cr,uid,ids,context)
def _compute_planned_workcenter(self, cr, uid, ids, context=None, mini=False):
""" Computes planned and finished dates for work order.
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-web
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-web
More help : https://help.launchpad.net/ListHelp