From 05df2f303fe36c60ab802974af2ec33ba8de2df7 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 29 Jan 2009 18:53:46 +0100 Subject: [PATCH] [FIX] Do not copy the move lines when we duplicate a manufacturing order lp bug: https://launchpad.net/bugs/322656 fixed bzr revid: stephane@tinyerp.com-20090129175346-632jchqwz2343g2m --- addons/mrp/mrp.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 5521bcbcc7e..8bae8c4fed4 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -448,11 +448,12 @@ class mrp_production(osv.osv): raise osv.except_osv(_('Invalid action !'), _('Cannot delete Production Order(s) which are in %s State!' % s['state'])) return osv.osv.unlink(self, cr, uid, unlink_ids, context=context) - def copy(self, cr, uid, id, default=None,context={}): + def copy(self, cr, uid, id, default=None,context=None): if not default: default = {} - default.update({ + default.update({ 'name': self.pool.get('ir.sequence').get(cr, uid, 'mrp.production'), + 'move_lines' : [], }) return super(mrp_production, self).copy(cr, uid, id, default, context)