[FIX] sale: set company sales team for quotation

If there is not a dedicated salesteam for the current user, this fix sets the
sales team to the one dedicated to a customer if there is one.

opw-633134
This commit is contained in:
Nicolas Lempereur 2015-04-20 11:10:53 +02:00
parent 6f679678f6
commit 86116fd082
1 changed files with 2 additions and 0 deletions

View File

@ -343,6 +343,8 @@ class sale_order(osv.osv):
val.update(delivery_onchange['value'])
if pricelist:
val['pricelist_id'] = pricelist
if not self._get_default_section_id(cr, uid, context=context) and part.section_id:
val['section_id'] = part.section_id.id
sale_note = self.get_salenote(cr, uid, ids, part.id, context=context)
if sale_note: val.update({'note': sale_note})
return {'value': val}