[FIX] procurement: we should not duplicate procurement related to stock.move on stock...
authorXavier ALT <xal@openerp.com>
Fri, 4 Jan 2013 10:05:58 +0000 (11:05 +0100)
committerXavier ALT <xal@openerp.com>
Fri, 4 Jan 2013 10:05:58 +0000 (11:05 +0100)
bzr revid: xal@openerp.com-20130104100558-04b4fbwdw6usfs4d

addons/procurement/procurement.py

index 3ebdc18..b60e3db 100644 (file)
@@ -67,10 +67,11 @@ class StockMove(osv.osv):
         'procurements': fields.one2many('procurement.order', 'move_id', 'Procurements'),
     }
 
-    def copy(self, cr, uid, id, default=None, context=None):
-        default = default or {}
+    def copy_data(self, cr, uid, id, default=None, context=None):
+        if default is None:
+            default = {}
         default['procurements'] = []
-        return super(StockMove, self).copy(cr, uid, id, default, context=context)
+        return super(StockMove, self).copy_data(cr, uid, id, default, context=context)
 
 StockMove()