[IMP] mrp, mrp_repair: Cleaning the code. Improved yaml.
authoruco (Open ERP) <uco@tinyerp.com>
Thu, 5 Aug 2010 07:21:34 +0000 (12:51 +0530)
committeruco (Open ERP) <uco@tinyerp.com>
Thu, 5 Aug 2010 07:21:34 +0000 (12:51 +0530)
bzr revid: uco@tinyerp.com-20100805072134-uelcxf0017e27uu9

addons/mrp/report/workcenter_load.py
addons/mrp/test/mrp_phantom_bom.yml
addons/mrp_repair/mrp_repair.py

index 8e5b9bf..9c31e34 100644 (file)
@@ -173,7 +173,6 @@ class report_custom(report_int):
             ar.add_plot(bar_plot.T(label=workcenter['name'], data=data, fill_style=f, hcol=workcenter_num+1, cluster=(workcenter_num, len(res))))
             workcenter_num += 1
 
-        #plot = bar_plot.T(label=workcenter['name'], data=data, hcol=1, fill_style=fill_style.white, cluster=(color_index,len(ids)))
         if (not data) or (len(data[0]) <= 1):
             ar = self._empty_graph(time.strftime('%Y-%m-%d'))
         ar.draw(can)
index 9777840..1cb7aa9 100644 (file)
 -
   !function {model: procurement.order, name: run_scheduler}:
     - model: procurement.order
-      search: "[('state','!=','confirmed')]"
+      search: "[('state','=','confirmed')]"
 -
   I am checking Internal picking. I see one picking for Orange juice and its 
   stock moves for Oranges, Sugar and Water made correctly.
index 819acff..9c24449 100644 (file)
@@ -411,7 +411,6 @@ class mrp_repair(osv.osv):
                             })
                         repair_fee_obj.write(cr, uid, [fee.id], {'invoiced': True, 'invoice_line_id': invoice_fee_id})
                 res[repair.id] = inv_id
-        #self.action_invoice_end(cr, uid, ids)
         return res
 
     def action_repair_ready(self, cr, uid, ids, context=None):
@@ -444,7 +443,6 @@ class mrp_repair(osv.osv):
             if (order.invoice_method == 'b4repair'):
                 val['state'] = 'ready'
             else:
-                #val['state'] = 'done'
                 pass
             self.write(cr, uid, [order.id], val)
         return True
@@ -462,7 +460,6 @@ class mrp_repair(osv.osv):
             elif (not order.invoiced and order.invoice_method=='b4repair'):
                 val['state'] = 'ready'
             else:
-                #val['state'] = 'done'
                 pass
             self.write(cr, uid, [order.id], val)
         return True
@@ -517,14 +514,12 @@ class mrp_repair(osv.osv):
                     'product_id': repair.product_id.id,
                     'product_qty': 1.0,
                     'product_uom': repair.product_id.uom_id.id,
-                    #'product_uos_qty': line.product_uom_qty,
-                    #'product_uos': line.product_uom.id,
                     'prodlot_id': repair.prodlot_id and repair.prodlot_id.id or False,
                     'address_id': repair.address_id and repair.address_id.id or False,
                     'location_id': repair.location_id.id,
                     'location_dest_id': repair.location_dest_id.id,
                     'tracking_id': False,
-                    'state': 'assigned',    # FIXME done ?
+                    'state': 'assigned',    
                 })
                 self.write(cr, uid, [repair.id], {'state': 'done', 'picking_id': picking})
                 res[repair.id] = picking