[MERGE] mrp_repair: fixing the bug of operation type onchange, as of revision 8290...
authorQuentin (OpenERP) <qdp-launchpad@openerp.com>
Thu, 13 Dec 2012 09:53:04 +0000 (10:53 +0100)
committerQuentin (OpenERP) <qdp-launchpad@openerp.com>
Thu, 13 Dec 2012 09:53:04 +0000 (10:53 +0100)
bzr revid: qdp-launchpad@openerp.com-20121213095304-1td16oqz66lnj08g

addons/mrp_repair/mrp_repair.py

index 905a1b5..17e9d96 100644 (file)
@@ -748,11 +748,13 @@ class mrp_repair_line(osv.osv, ProductChangeMixin):
                 'location_id': stock_id,
                 'location_dest_id': location_id
                 }}
+        obj_data = self.pool.get('ir.model.data')
+        dummy, scrapped_location_id = obj_data.get_object_reference(cr, uid, 'stock', 'stock_location_scrapped')
 
         return {'value': {
                 'to_invoice': False,
                 'location_id': location_id,
-                'location_dest_id': False
+                'location_dest_id': scrapped_location_id,
                 }}
 
 mrp_repair_line()