[FIX]sale_crm:Fixed issue of partner payment_term is not carry when opportunity converted into sale order case:583948

bzr revid: mma@tinyerp.com-20130109090456-e5xwgl2i0h46tfqs
This commit is contained in:
Mayur Maheshwari (OpenERP) 2013-01-09 14:34:56 +05:30
parent ff5b5d6cb1
commit d99a4cfeda
1 changed files with 3 additions and 0 deletions

View File

@ -78,11 +78,13 @@ class crm_make_sale(osv.osv_memory):
['default', 'invoice', 'delivery', 'contact'])
pricelist = partner.property_product_pricelist.id
fpos = partner.property_account_position and partner.property_account_position.id or False
payment_term = partner.property_payment_term and partner.property_payment_term.id or False
new_ids = []
for case in case_obj.browse(cr, uid, data, context=context):
if not partner and case.partner_id:
partner = case.partner_id
fpos = partner.property_account_position and partner.property_account_position.id or False
payment_term = partner.property_payment_term and partner.property_payment_term.id or False
partner_addr = partner_obj.address_get(cr, uid, [partner.id],
['default', 'invoice', 'delivery', 'contact'])
pricelist = partner.property_product_pricelist.id
@ -100,6 +102,7 @@ class crm_make_sale(osv.osv_memory):
'partner_shipping_id': partner_addr['delivery'],
'date_order': fields.date.context_today(self,cr,uid,context=context),
'fiscal_position': fpos,
'payment_term':payment_term,
}
if partner.id:
vals['user_id'] = partner.user_id and partner.user_id.id or uid