diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py
index 100a1168505..ee1f893468e 100644
--- a/addons/purchase/purchase.py
+++ b/addons/purchase/purchase.py
@@ -655,7 +655,8 @@ class purchase_order(osv.osv):
'type':'in',
'purchase_line_id': order_line.id,
'company_id': order.company_id.id,
- 'price_unit': order_line.price_unit
+ 'price_unit': order_line.price_unit,
+ 'picking_type_id': self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'picking_type_in')[1]
}
def _create_pickings(self, cr, uid, order, order_lines, picking_id=False, context=None):
diff --git a/addons/stock/procurement.py b/addons/stock/procurement.py
index 7653b63fe28..e16d98b9c9c 100644
--- a/addons/stock/procurement.py
+++ b/addons/stock/procurement.py
@@ -39,7 +39,9 @@ class procurement_rule(osv.osv):
_columns = {
'location_id': fields.many2one('stock.location', 'Destination Location'),
'location_src_id': fields.many2one('stock.location', 'Source Location',
- help="Source location is action=move")
+ help="Source location is action=move"),
+ 'picking_type_id': fields.many2one('stock.picking.type', 'Picking Type',
+ help="Picking Type determines the way the picking should be shown in the view, reports, ...")
}
class procurement_order(osv.osv):
diff --git a/addons/stock/report/report_stock_move.py b/addons/stock/report/report_stock_move.py
index e3423bcc451..5b03fb6be50 100644
--- a/addons/stock/report/report_stock_move.py
+++ b/addons/stock/report/report_stock_move.py
@@ -27,7 +27,6 @@ from openerp.addons.decimal_precision import decimal_precision as dp
class stock_quant(osv.osv):
_inherit = "stock.quant"
_description = "Stock Statistics"
- _auto = False
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None, orderby=False):
res = super(stock_quant, self).read_group(cr, uid, domain, fields, groupby, offset=offset, limit=limit, context=context, orderby=orderby)
product_obj = self.pool.get("product.product")
diff --git a/addons/stock/security/ir.model.access.csv b/addons/stock/security/ir.model.access.csv
index d1679e0e522..e9a543f4793 100644
--- a/addons/stock/security/ir.model.access.csv
+++ b/addons/stock/security/ir.model.access.csv
@@ -26,7 +26,6 @@ access_stock_location_sale_manager,stock.location sale manager,model_stock_locat
access_stock_location_stock_manager,stock.location stock manager,model_stock_location,stock.group_stock_manager,1,0,0,0
access_stock_lines_date_user,report.stock.lines.date user,model_report_stock_lines_date,stock.group_stock_user,1,0,0,0
access_stock_lines_date_manager,report.stock.lines.date manager,model_report_stock_lines_date,stock.group_stock_manager,1,1,1,1
-access_report_stock_inventory_user,report.stock.inventory user,model_report_stock_inventory,stock.group_stock_user,1,1,1,1
access_product_product_stock_user,product_product_stock_user,product.model_product_product,stock.group_stock_user,1,1,0,0
access_product_template_stock_user,product.template stock user,product.model_product_template,stock.group_stock_user,1,1,0,0
access_product_pricelist_item_sale_manager,product.pricelist.item salemanager,product.model_product_pricelist_item,base.group_sale_manager,1,1,1,1
@@ -49,5 +48,5 @@ access_product_pricelist_item_stock_manager,product.pricelist.item stock_manager
access_board_stock_user,board.board user,board.model_board_board,stock.group_stock_user,1,1,0,0
access_stock_warehouse_orderpoint,stock.warehouse.orderpoint,model_stock_warehouse_orderpoint,stock.group_stock_user,1,0,0,0
access_stock_warehouse_orderpoint_system,stock.warehouse.orderpoint system,model_stock_warehouse_orderpoint,stock.group_stock_manager,1,1,1,1
-access_stock_quant_manager,stock.quant manager,model_stock_quant,stock.group_stock_manager,1,1,1,1
-access_stock_quant_user,stock.quant user,model_stock_quant,stock.group_stock_user,1,1,1,0
+access_stock_quant_manager,stock.quant manager,model_stock_quant,stock.group_stock_manager,1,0,0,0
+access_stock_quant_user,stock.quant user,model_stock_quant,stock.group_stock_user,1,0,0,0
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 7d2970509d8..9ef9612e4ee 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -2168,7 +2168,8 @@ class stock_warehouse(osv.osv):
#----------------------------------------------------------
# "Empty" Classes that are used to vary from the original stock.picking (that are dedicated to the internal pickings)
-# in order to offer a different usability with different views, labels, available reports/wizards...
+# in order to offer a different usability with different views, labels, available reports/wizards..
+# --> TO BE REPLACED by stock_picking_type
#----------------------------------------------------------
class stock_picking_in(osv.osv):
diff --git a/addons/stock/stock_data.xml b/addons/stock/stock_data.xml
index b5454e6c4f5..1009caaf061 100644
--- a/addons/stock/stock_data.xml
+++ b/addons/stock/stock_data.xml
@@ -116,6 +116,18 @@ watch your stock valuation, and track production lots upstream and downstream (b
+
+
+ in
+
+
+ out
+
+
+ internal
+