From dcac505a5b83888d847c65b3ec3443aa47271e4f Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Mon, 8 Apr 2013 01:51:15 +0200 Subject: [PATCH] [FIX] sale: remove useless code to select commercial entity, now handled by res.partner.address_get directly lp bug: https://launchpad.net/bugs/1160365 fixed bzr revid: odo@openerp.com-20130407235115-4kovy1jngblrdd5z --- addons/sale/sale.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index a6be2838171..a52efc12467 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -314,10 +314,6 @@ class sale_order(osv.osv): return {'value': {'partner_invoice_id': False, 'partner_shipping_id': False, 'payment_term': False, 'fiscal_position': False}} part = self.pool.get('res.partner').browse(cr, uid, part, context=context) - #if the chosen partner is not a company and has a parent company, use the parent to choose the delivery, the - #invoicing addresses and all the fields related to the partner. - if part.parent_id and not part.is_company: - part = part.parent_id addr = self.pool.get('res.partner').address_get(cr, uid, [part.id], ['delivery', 'invoice', 'contact']) pricelist = part.property_product_pricelist and part.property_product_pricelist.id or False payment_term = part.property_payment_term and part.property_payment_term.id or False