From bbf8ca67fa11a3c399020413d3885f040e9ceb2d Mon Sep 17 00:00:00 2001 From: "Randhir Mayatra (OpenERP)" Date: Tue, 13 Aug 2013 10:54:24 +0530 Subject: [PATCH] [IMP] make chnages anglo_saxon_yml bzr revid: rma@tinyerp.com-20130813052424-bdolzw3yl93kggay --- .../account_anglo_saxon/test/anglo_saxon.yml | 40 +++++++++++-------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/addons/account_anglo_saxon/test/anglo_saxon.yml b/addons/account_anglo_saxon/test/anglo_saxon.yml index 6e9ebc0068e..77dc05836bc 100644 --- a/addons/account_anglo_saxon/test/anglo_saxon.yml +++ b/addons/account_anglo_saxon/test/anglo_saxon.yml @@ -123,10 +123,15 @@ - Reception is ready for process so now done the reception. - - !python {model: stock.partial.picking}: | - pick_ids = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_001")).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_001")) + for pick in order.picking_ids: + self.pool.get('stock.pack.operation').create(cr, uid, { + 'picking_id': pick.id, + 'product_qty': 1 + }) + pick.do_partial(context=context) + - I check the Stock Interim account (Received) is credited successfully. - @@ -189,7 +194,6 @@ - !record {model: stock.picking, id: stock_picking_out001}: partner_id: base.res_partner_13 - invoice_state: 2binvoiced move_lines: - company_id: base.main_company location_id: stock.stock_location_stock @@ -198,29 +202,31 @@ product_uom: product.product_uom_unit location_dest_id: stock.stock_location_customers move_type: direct - type: out + picking_type_id: 1 - I need to check the availability of the product, So I make my picking order for processing later. - !python {model: stock.picking}: | - self.draft_force_assign(cr, uid, [ref("stock_picking_out001")], {"lang": "en_US", "search_default_available": - 1, "tz": False, "active_model": "ir.ui.menu", "contact_display": "partner", - "active_ids": [ref("stock.menu_action_picking_tree")], "active_id": ref("stock.menu_action_picking_tree"), - }) + self.action_confirm(cr, uid, [ref('stock_picking_out001')], context=context) + - I check the product availability, Product is available in the stock and ready to be sent. - !python {model: stock.picking}: | - self.action_assign(cr, uid, [ref("stock_picking_out001")], {"lang": "en_US", "search_default_available": - 1, "tz": False, "active_model": "ir.ui.menu", "contact_display": "partner", - "active_ids": [ref("stock.menu_action_picking_tree")], "active_id": ref("stock.menu_action_picking_tree"), - }) + self.action_confirm(cr, uid, [ref('stock_picking_out001')], context=context) + - I process the delivery. - - !python {model: stock.partial.picking}: | - partial_id = self.create(cr, uid, {}, context={'active_model':'stock.picking','active_ids':[ref('stock_picking_out001')]}) - self.do_partial(cr, uid, [partial_id]) + !python {model: stock.picking}: | + order = self.pool.get('purchase.order').browse(cr, uid, ref("purchase_order_001")) + pick_order = self.pool.get('stock.picking').browse(cr, uid, ref("stock_picking_out001")) + for pick in pick_order.picking_ids: + self.pool.get('stock.pack.operation').create(cr, uid, { + 'picking_id': pick.id, + 'product_qty': 1 + }) + pick.do_partial(context=context) - I check Stock Interim account (Delivery) is debited successfully. -