diff --git a/addons/purchase/__openerp__.py b/addons/purchase/__openerp__.py index 56512be09da..a0bb133dd46 100644 --- a/addons/purchase/__openerp__.py +++ b/addons/purchase/__openerp__.py @@ -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', diff --git a/addons/stock_complex_routes/__openerp__.py b/addons/stock_complex_routes/__openerp__.py index 5426e2c7aca..872f42d98b5 100644 --- a/addons/stock_complex_routes/__openerp__.py +++ b/addons/stock_complex_routes/__openerp__.py @@ -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, } diff --git a/addons/purchase/test/lifo_price.yml b/addons/stock_complex_routes/test/lifo_price.yml similarity index 78% rename from addons/purchase/test/lifo_price.yml rename to addons/stock_complex_routes/test/lifo_price.yml index ea30317b996..4bf1922c251 100644 --- a/addons/purchase/test/lifo_price.yml +++ b/addons/stock_complex_routes/test/lifo_price.yml @@ -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 - diff --git a/addons/stock_location/stock_location.py b/addons/stock_location/stock_location.py index 7f27496ff0d..8a389721733 100644 --- a/addons/stock_location/stock_location.py +++ b/addons/stock_location/stock_location.py @@ -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'), }