[MERGE] Lifo price yml

bzr revid: jco@openerp.com-20130826160530-pnhgsiin044hoy2r
This commit is contained in:
Josse Colpaert
2013-08-26 18:05:30 +02:00
4 changed files with 22 additions and 19 deletions
-1
View File
@@ -81,7 +81,6 @@ Dashboard / Reports for Purchase Management will include:
'test/ui/duplicate_order.yml',
'test/ui/delete_order.yml',
'test/average_price.yml',
'test/lifo_price.yml',
],
'demo': [
'purchase_order_demo.yml',
+1 -1
View File
@@ -38,7 +38,7 @@ This adds a route on the sales order and sales order line (mini module)
'init_xml': [],
'update_xml': ['stock_complex_routes.xml'],
'demo_xml': [],
'test': [],
'test': ['test/lifo_price.yml'],
'installable': True,
'auto_install': True,
}
@@ -1,8 +1,12 @@
-
Set product category removal strategy as LIFO
Set product category removal strategy as LIFO
-
!record {model: product.category, id: product.product_category_1}:
removal_strategy: lifo
!record {model: product.category, id: product.product_category_001}:
name : Lifo Category
removal_strategy_ids:
- product_categ_id: product.product_category_1
method: lifo
location_id: stock.stock_location_stock
-
Set a product as using lifo price
-
@@ -58,10 +62,9 @@
-
Process the reception of purchase order 1
-
!python {model: stock.partial.picking}: |
pick_ids = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_lifo1")).picking_ids
partial_id = self.create(cr, uid, {}, context={'active_model': 'stock.picking','active_ids': [pick_ids[0].id]})
self.do_partial(cr, uid, [partial_id])
!python {model: stock.picking}: |
order = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_lifo1")).picking_ids[0]
order.do_partial(context=context)
-
Check the standard price of the product (lifo icecream)
-
@@ -74,10 +77,9 @@
-
Process the reception of purchase order 2
-
!python {model: stock.partial.picking}: |
pick_ids = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_lifo2")).picking_ids
partial_id = self.create(cr, uid, {}, context={'active_model': 'stock.picking','active_ids': [pick_ids[0].id]})
self.do_partial(cr, uid, [partial_id])
!python {model: stock.picking}: |
order = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_lifo2")).picking_ids[0]
order.do_partial(context=context)
-
Check the standard price should not have changed
-
@@ -87,7 +89,7 @@
Let us send some goods
-
!record {model: stock.picking, id: outgoing_lifo_shipment}:
type: out
picking_type_id: stock.picking_type_out
-
Picking needs movement from stock
-
@@ -95,8 +97,10 @@
picking_id: outgoing_lifo_shipment
product_id: product_lifo_icecream
product_uom: product.product_uom_kgm
location_id: stock.stock_location_stock
location_dest_id: stock.stock_location_customers
product_qty: 20.0
type: out
picking_type_id: stock.picking_type_out
-
I assign this outgoing shipment
-
@@ -105,9 +109,9 @@
-
Process the delivery of the outgoing shipment
-
!python {model: stock.partial.picking}: |
partial_id = self.create(cr, uid, {}, context={'active_model': 'stock.picking','active_ids': [ref("outgoing_lifo_shipment")], 'default_type':'out'})
self.do_partial(cr, uid, [partial_id])
!python {model: stock.picking}: |
pick_order = self.pool.get('stock.picking').browse(cr, uid, ref("outgoing_lifo_shipment"))
pick_order.do_partial(context=context)
-
Check standard price became 80 euro
-
+1 -1
View File
@@ -215,7 +215,7 @@ class product_category(osv.osv):
_inherit = 'product.category'
_columns = {
'route_ids': fields.many2many('stock.location.route', 'stock_location_route_categ', 'categ_id', 'route_id', 'Routes'),
#'removal_strategy_ids': fields.one2many('product.removal', 'product_categ_id', 'Removal Strategies'),
'removal_strategy_ids': fields.one2many('product.removal', 'product_categ_id', 'Removal Strategies'),
#'putaway_strategy_ids': fields.one2many('product.putaway', 'product_categ_id', 'Put Away Strategies'),
}