From d4c34a87df20938f5e6db8a33c8aa5d85f485bcf Mon Sep 17 00:00:00 2001 From: manu Date: Mon, 31 Oct 2011 15:56:53 +0100 Subject: [PATCH] [ADD] sequence in return_line [FIX] warranty return items --- crm_claim_rma/wizard/returned_lines_from_serial.py | 12 ++++++------ product_warranty/product_warranty.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crm_claim_rma/wizard/returned_lines_from_serial.py b/crm_claim_rma/wizard/returned_lines_from_serial.py index 4c3c2d9b..ca8c41ec 100644 --- a/crm_claim_rma/wizard/returned_lines_from_serial.py +++ b/crm_claim_rma/wizard/returned_lines_from_serial.py @@ -82,7 +82,7 @@ class returned_lines_from_serial(osv.osv_memory): # Get partner from case is set to filter serials def _get_default_partner_id(self, cr, uid, context): - return self.pool.get('crm.claim').read(cr, uid, context['active_id'], ['partner_id'])['partner_id'] + return self.pool.get('crm.claim').read(cr, uid, context['active_id'], ['partner_id'])['partner_id'][0] _defaults = { 'qty_1': lambda *a: 1.0, @@ -134,7 +134,7 @@ class returned_lines_from_serial(osv.osv_memory): # Refactor code : create 1 "createmethode" called by each if with values as parameters return_line.create(cr, uid, { 'claim_id': context['active_id'], - 'name': result.claim_1, + 'claim_origine': result.claim_1, 'product_id' : self.get_product_id(cr, uid,ids,result.prodlot_id_1.id,context), #'invoice_id' : self.prodlot_2_invoice(cr, uid,[result.prodlot_id_1.id],[result.prodlot_id_1.product_id.id]), #PRODLOT_ID can be in many invoice !! 'product_returned_quantity' : result.qty_1, @@ -147,7 +147,7 @@ class returned_lines_from_serial(osv.osv_memory): if result.prodlot_id_2.id : return_line.create(cr, uid, { 'claim_id': context['active_id'], - 'name': result.claim_2, + 'claim_origine': result.claim_2, 'product_id' : self.get_product_id(cr, uid,ids,result.prodlot_id_2.id,context), # 'invoice_id' : self.prodlot_2_invoice(cr, uid,[result.prodlot_id_1.id]), 'product_returned_quantity' : result.qty_2, @@ -160,7 +160,7 @@ class returned_lines_from_serial(osv.osv_memory): if result.prodlot_id_3.id : return_line.create(cr, uid, { 'claim_id': context['active_id'], - 'name': result.claim_3, + 'claim_origine': result.claim_3, 'product_id' : self.get_product_id(cr, uid,ids,result.prodlot_id_3.id,context), # 'invoice_id' : self.prodlot_2_invoice(cr, uid,[result.prodlot_id_1.id]), 'product_returned_quantity' : result.qty_3, @@ -173,7 +173,7 @@ class returned_lines_from_serial(osv.osv_memory): if result.prodlot_id_4.id : return_line.create(cr, uid, { 'claim_id': context['active_id'], - 'name': result.claim_4, + 'claim_origine': result.claim_4, 'product_id' : self.get_product_id(cr, uid,ids,result.prodlot_id_4.id,context), # 'invoice_id' : self.prodlot_2_invoice(cr, uid,[result.prodlot_id_1.id]), 'product_returned_quantity' : result.qty_4, @@ -186,7 +186,7 @@ class returned_lines_from_serial(osv.osv_memory): if result.prodlot_id_5.id : return_line.create(cr, uid, { 'claim_id': context['active_id'], - 'name': result.claim_5, + 'claim_origine': result.claim_5, 'product_id' : self.get_product_id(cr, uid,ids,result.prodlot_id_5.id,context), # 'invoice_id' : self.prodlot_2_invoice(cr, uid,[result.prodlot_id_1.id],[result.prodlot_id_1.product_id.id]), 'product_returned_quantity' : result.qty_5, diff --git a/product_warranty/product_warranty.py b/product_warranty/product_warranty.py index d66d1cb3..b11858e3 100644 --- a/product_warranty/product_warranty.py +++ b/product_warranty/product_warranty.py @@ -47,7 +47,7 @@ class product_supplierinfo(osv.osv): else: return [ ('company','Company'), - ('brand','Brand manufacturer'), + ('supplier','Supplier'), ('other','Other'),] # Get selected lines to add to exchange