[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
This commit is contained in:
parent
438e1c1daf
commit
dcac505a5b
|
@ -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}}
|
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)
|
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'])
|
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
|
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
|
payment_term = part.property_payment_term and part.property_payment_term.id or False
|
||||||
|
|
Loading…
Reference in New Issue