From 102dc538318bd02f348960af2c087722d727a9ec Mon Sep 17 00:00:00 2001 From: "Sbh (Openerp)" Date: Fri, 30 Mar 2012 13:52:54 +0530 Subject: [PATCH] [IMP] : rename address_id with parnter_id bzr revid: sbh@tinyerp.com-20120330082254-ohrl90qe5cr0zolw --- addons/delivery/report/shipping.rml | 4 ++-- addons/mrp/test/order_process.yml | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/addons/delivery/report/shipping.rml b/addons/delivery/report/shipping.rml index a270d13fbd5..5a3750e64a8 100644 --- a/addons/delivery/report/shipping.rml +++ b/addons/delivery/report/shipping.rml @@ -134,8 +134,8 @@ [[ o.sale_id and o.sale_id.partner_invoice_id and display_address(o.sale_id.partner_invoice_id) ]] - [[ o.address_id and o.address_id and o.address_id.name or '' ]] - [[ o.address_id and o.address_id and display_address(o.address_id) ]] + [[ o.partner_id and o.partner_id and o.partner_id.name or '' ]] + [[ o.partner_id and o.partner_id and display_address(o.partner_id) ]] diff --git a/addons/mrp/test/order_process.yml b/addons/mrp/test/order_process.yml index 496e039d0d4..ee78e036d44 100644 --- a/addons/mrp/test/order_process.yml +++ b/addons/mrp/test/order_process.yml @@ -22,8 +22,8 @@ assert line.product_qty == (2.0*factor), "Qty is not correspond." assert line.product_uom.id == ref('product.product_uom_unit'), "UOM is not correspond" sidepanel = True - elif line.product_id.id == ref('product.product_product_woodlintelm0'): #LIN40 4*0.25 Meter - assert not woodlintelm, "Production line is already generated for LIN40." + elif line.product_id.id == ref('product.product_product_woodlintelm0'): #LIN40 4*0.25 Meter + assert not woodlintelm, "Production line is already generated for LIN40." assert line.product_qty == (4*0.25*factor), "Qty is not correspond." assert line.product_uom.id == ref('product.product_uom_meter'), "UOM is not correspond" woodlintelm = True @@ -32,7 +32,7 @@ assert line.product_qty == (0.25*factor), "Qty is not correspond." assert line.product_uom.id == ref('product.product_uom_meter'), "UOM is not correspond" woodmm0 = True - elif line.product_id.id == ref('product.product_product_metalcleats0'): #METC000 4*3 Unit + elif line.product_id.id == ref('product.product_product_metalcleats0'): #METC000 4*3 Unit assert not metalcleats, "Production line is already generated for METC000." assert line.product_qty == (4*3*factor), "Qty is not correspond." assert line.product_uom.id == ref('product.product_uom_unit'), "UOM is not correspond" @@ -107,7 +107,7 @@ routing_loc = None if order.bom_id.routing_id and order.bom_id.routing_id.location_id: routing_loc = order.bom_id.routing_id.location_id.id - date_planned = order.date_planned + date_planned = order.date_planned for move_line in order.move_lines: for order_line in order.product_lines: if move_line.product_id.type not in ('product', 'consu'): @@ -129,18 +129,18 @@ procurement = self.pool.get('procurement.order') order = self.browse(cr, uid, ref("mrp_production_shelf100cm")) assert order.picking_id, 'Internal Shipment should be created!' - + routing_loc = None pick_type = 'internal' - address_id = False + partner_id = False if order.bom_id.routing_id and order.bom_id.routing_id.location_id: routing_loc = order.bom_id.routing_id.location_id if routing_loc.usage <> 'internal': pick_type = 'out' - address_id = routing_loc.address_id and routing_loc.address_id.id or False + partner_id = routing_loc.partner_id and routing_loc.partner_id.id or False routing_loc = routing_loc.id assert order.picking_id.type == pick_type, "Shipment should be Internal." - assert order.picking_id.address_id.id == address_id, "Shipment Address is not correspond with Adderss of Routing Location." + assert order.picking_id.partner_id.id == partner_id, "Shipment Address is not correspond with Adderss of Routing Location." date_planned = order.date_planned for move_line in order.picking_id.move_lines: for order_line in order.product_lines: @@ -167,7 +167,7 @@ assert shipment_procurement.product_uos.id == order_line.product_uos.id, "UOS is not correspond in procurement." assert shipment_procurement.location_id.id == order.location_src_id.id, "Location is not correspond in procurement." assert shipment_procurement.procure_method == order_line.product_id.procure_method, "Procure method is not correspond in procurement." - + - I change production qty with 3 Dozen Shelf 100cm. - @@ -187,7 +187,7 @@ assert order.product_qty == 3, "Qty is not changed in order." move = order.move_created_ids[0] assert move.product_qty == order.product_qty, "Qty is not changed in move line." -- +- I run scheduler. - !python {model: procurement.order}: | @@ -223,7 +223,7 @@ order = self.browse(cr, uid, ref("mrp_production_shelf100cm")) for move in order.move_lines: move.action_consume(move.product_qty) - if move.product_id.id == ref("product.product_product_metalcleats0"): + if move.product_id.id == ref("product.product_product_metalcleats0"): move.action_scrap(5.0, scrap_location_id) - I produce product. @@ -242,8 +242,8 @@ !python {model: mrp.production}: | order = self.browse(cr, uid, ref("mrp_production_shelf100cm")) assert order.state == 'done', "Production order should be closed." -- - I check Total Costs at End of Production. +- + I check Total Costs at End of Production. - !python {model: mrp.production}: | order = self.browse(cr, uid, ref("mrp_production_shelf100cm")) @@ -275,7 +275,7 @@ assert line.journal_id.id == wc.costs_journal_id.id, "Account Journal is not correspond." assert line.product_id.id == wc.product_id.id, "Product is not correspond." assert line.product_uom_id.id == wc.product_id.uom_id.id, "UOM is not correspond." - + - I print a "BOM Structure". -