[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:
parent
6f679678f6
commit
86116fd082
|
@ -343,6 +343,8 @@ class sale_order(osv.osv):
|
||||||
val.update(delivery_onchange['value'])
|
val.update(delivery_onchange['value'])
|
||||||
if pricelist:
|
if pricelist:
|
||||||
val['pricelist_id'] = 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)
|
sale_note = self.get_salenote(cr, uid, ids, part.id, context=context)
|
||||||
if sale_note: val.update({'note': sale_note})
|
if sale_note: val.update({'note': sale_note})
|
||||||
return {'value': val}
|
return {'value': val}
|
||||||
|
|
Loading…
Reference in New Issue