[WIP] Picking types, make sure stock installs
bzr revid: jco@openerp.com-20130723113052-itxnv08x8ekpd5fw
This commit is contained in:
parent
83e87f1102
commit
2525f33104
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
|
|
@ -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):
|
||||
|
|
|
@ -116,6 +116,18 @@ watch your stock valuation, and track production lots upstream and downstream (b
|
|||
<field name="location_src_id" ref="stock_location_stock"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Picking types
|
||||
-->
|
||||
<record id="picking_type_in" model="stock.picking.type">
|
||||
<field name="name">in</field>
|
||||
</record>
|
||||
<record id="picking_type_out" model="stock.picking.type">
|
||||
<field name="name">out</field>
|
||||
</record>
|
||||
<record id="picking_type_internal" model="stock.picking.type">
|
||||
<field name="name">internal</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Properties
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
uom_id: product.product_uom_kgm
|
||||
uom_po_id: product.product_uom_kgm
|
||||
property_stock_inventory: location_opening
|
||||
valuation: real_time
|
||||
description: Ice cream can be mass-produced and thus is widely available in developed parts of the world. Ice cream can be purchased in large cartons (vats and squrounds) from supermarkets and grocery stores, in smaller quantities from ice cream shops, convenience stores, and milk bars, and in individual servings from small carts or vans at public events.
|
||||
-
|
||||
!record {model: stock.production.lot, id: lot_icecream_0}:
|
||||
|
@ -80,7 +79,6 @@
|
|||
-
|
||||
!record {model: stock.picking, id: incomming_shipment}:
|
||||
type: in
|
||||
invoice_state: 2binvoiced
|
||||
partner_id: base.res_partner_address_9
|
||||
location_dest_id: location_refrigerator
|
||||
-
|
||||
|
|
Loading…
Reference in New Issue