Skip to content
Permalink
Browse files

[FIX] sale: salesperson

Fallback on the salesperson of the commercial partner if no salesperson
is set on the order partner.

opw-1909177
  • Loading branch information...
nim-odoo committed Feb 22, 2019
1 parent b2db72c commit 8d2ea0dc4c9eeeb98c0de87c3f1e9d6bf89d5108
Showing with 1 addition and 1 deletion.
  1. +1 −1 addons/sale/models/sale.py
@@ -320,7 +320,7 @@ def onchange_partner_id(self):
'payment_term_id': self.partner_id.property_payment_term_id and self.partner_id.property_payment_term_id.id or False,
'partner_invoice_id': addr['invoice'],
'partner_shipping_id': addr['delivery'],
'user_id': self.partner_id.user_id.id or self.env.uid
'user_id': self.partner_id.user_id.id or self.partner_id.commercial_partner_id.user_id.id or self.env.uid
}
if self.env['ir.config_parameter'].sudo().get_param('sale.use_sale_note') and self.env.user.company_id.sale_note:
values['note'] = self.with_context(lang=self.partner_id.lang).env.user.company_id.sale_note

0 comments on commit 8d2ea0d

Please sign in to comment.
You can’t perform that action at this time.