[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
This commit is contained in:
Stephane Wirtel
2009-01-29 18:53:46 +01:00
parent e616d4d4e2
commit 05df2f303f
+3 -2
View File
@@ -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)