[MERGE]
authoruco (OpenERP) <uco@tinyerp.com>
Wed, 19 May 2010 05:10:58 +0000 (10:40 +0530)
committeruco (OpenERP) <uco@tinyerp.com>
Wed, 19 May 2010 05:10:58 +0000 (10:40 +0530)
bzr revid: uco@tinyerp.com-20100519051058-a5hfrptrt5q2i37u

addons/purchase/purchase_view.xml
addons/sale/test/sale_procurement.yml
addons/stock_planning/stock_planning.py

index a57749e..5aac423 100644 (file)
@@ -5,7 +5,7 @@
             groups="group_purchase_user"/>-->
        <menuitem icon="terp-purchase" id="base.menu_purchase_root" name="Procurement Management"
             groups="group_purchase_user" sequence="7"/>
-       <menuitem id="menu_procurement_management" name="Procurement Management"
+       <menuitem id="menu_procurement_management" name="Purchase Management"
             parent="base.menu_purchase_root" sequence="1"/>
 
      <!--supplier menu-->
index 5a73236..c9d26ba 100644 (file)
@@ -28,7 +28,6 @@
     company_id: base.main_company
     location_id: stock.stock_location_stock
     logic: max
-    name: OP/00002
     product_id: product_product_wood0
     product_max_qty: 15.0
     product_min_qty: 10.0
 -
   Now I make a sale order for table.
 - 
-  !record {model: sale.order, id: sale_order_so0}:
+  !record {model: sale.order, id: sale_order_so3}:
     amount_total: 5.0
     amount_untaxed: 5.0
     date_order: '2010-04-30'
     invoice_quantity: order
-    name: SO006
     order_line:
       - company_id: base.main_company
         delay: 7.0
@@ -66,7 +64,7 @@
 -
   I confirm the order.
 - 
-  !workflow {model: sale.order, action: order_confirm, ref: sale_order_so0}
+  !workflow {model: sale.order, action: order_confirm, ref: sale_order_so3}
 -
   I check that one procurement is generated.
 -
index fa0bec2..3bdc14b 100644 (file)
@@ -161,6 +161,7 @@ class stock_sale_forecast_createlines(osv.osv_memory):
     def create_forecast(self,cr, uid, ids, context={}):
         product_obj = self.pool.get('product.product')
         forecast_obj=self.pool.get('stock.sale.forecast')
+        mod_obj =self.pool.get('ir.model.data')
         for f in self.browse(cr, uid, ids, context):
             prod_categ_obj=self.pool.get('product.category')
             template_obj=self.pool.get('product.template')
@@ -212,11 +213,14 @@ class stock_sale_forecast_createlines(osv.osv_memory):
                         'product_uom_categ' : p.uom_id.category_id.id,
                         'product_uos_categ' : prod_uos_categ,
                      })
+        result = mod_obj._get_id(cr, uid, 'stock_planning', 'view_stock_sale_forecast_filter')
+        id = mod_obj.read(cr, uid, result, ['res_id'], context=context)
         return {
                 'view_type': 'form',
                 "view_mode": 'tree',
                 'res_model': 'stock.sale.forecast',
-                'type': 'ir.actions.act_window',                
+                'type': 'ir.actions.act_window',
+                'search_view_id': id['res_id'],                
             }
 stock_sale_forecast_createlines()
 
@@ -488,7 +492,7 @@ class stock_planning_createlines(osv.osv_memory):
     def create_planning(self,cr, uid, ids, context={}):
         product_obj = self.pool.get('product.product')
         planning_obj=self.pool.get('stock.planning')
-
+        mod_obj =self.pool.get('ir.model.data')
         for f in self.browse(cr, uid, ids, context=context):
             if f.forecasted_products:
                 cr.execute("SELECT product_id \
@@ -562,11 +566,14 @@ class stock_planning_createlines(osv.osv_memory):
                         'stock_supply_location': stock_supply_location,
 
                     })
+        result = mod_obj._get_id(cr, uid, 'stock_planning', 'view_stock_planning_filter')
+        id = mod_obj.read(cr, uid, result, ['res_id'], context=context)
         return {
                 'view_type': 'form',
                 "view_mode": 'tree',
                 'res_model': 'stock.planning',
-                'type': 'ir.actions.act_window',                
+                'type': 'ir.actions.act_window', 
+                'search_view_id': id['res_id'],               
             }
 stock_planning_createlines()