summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2016-07-19 14:18:44 +0200
committerGoffin Simon <sig@odoo.com>2016-07-19 14:36:50 +0200
commit978b8f64ece2a0c80002af0ee9cc81f032f2bbc2 (patch)
treeab576ce3b1a9444a80e01256a19e0f20adf4f000 /addons
parent02d686f9e1da4e094cb6807748f204651fea6174 (diff)
[FIX] sale: onchange on 'note' in a sale order
When website_quote is installed, the Terms and Conditions of the quote template should replace the Terms and Conditions of the company. But if T&C of the company is not filled, it will keep the note written. opw:683543
Diffstat (limited to 'addons')
-rw-r--r--addons/sale/sale.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/sale/sale.py b/addons/sale/sale.py
index 351b6d0602f..1836f6a2fca 100644
--- a/addons/sale/sale.py
+++ b/addons/sale/sale.py
@@ -207,8 +207,9 @@ class SaleOrder(models.Model):
'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'],
- 'note': self.with_context(lang=self.partner_id.lang).env.user.company_id.sale_note,
}
+ if self.env.user.company_id.sale_note:
+ values['note'] = self.with_context(lang=self.partner_id.lang).env.user.company_id.sale_note
if self.partner_id.user_id:
values['user_id'] = self.partner_id.user_id.id