[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:
+3
-2
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user