Skip to content
Browse files

[FIX] sale: terms on vendor bills

Create a vendor bill from documents, change the partner, the default
terms and conditions are automatically set on the bill.

The problem is due to a wrong default value, the onchange only uses
the invoice type from the environment but never from the invoice itself.

  • Loading branch information...
Julien00859 committed Mar 18, 2019
1 parent 2942387 commit 903380a1a514d58ad54eba36ddd1a1048e5470eb
Showing with 1 addition and 1 deletion.
  1. +1 −1 addons/sale/models/
@@ -46,7 +46,7 @@ def unlink(self):
def _onchange_delivery_address(self):
addr = self.partner_id.address_get(['delivery'])
self.partner_shipping_id = addr and addr.get('delivery')
if self.env.context.get('type', 'out_invoice') == 'out_invoice':
if self.env.context.get('type', self.type or 'out_invoice') == 'out_invoice':
company = self.company_id or self.env.user.company_id
self.comment = company.with_context(lang=self.partner_id.lang).sale_note

0 comments on commit 903380a

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