[FIX] sale, purchase: fix payment_term_id default value
Issue - Install Sale and/or Purchase - Create new order - Debugger > Set Defaults - Set default value for payment terms - Quit and re-create Default value is not filled Cause The default value is set but it's overridden by a onchange Solution Remove the override who puts the value to False OPW-2197940 closes odoo/odoo#45776 X-original-commit: 4d03e6dd81fab2aa12e3205106fd59758c6c90f6 Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
This commit is contained in:
@@ -207,7 +207,6 @@ class PurchaseOrder(models.Model):
|
||||
self = self.with_company(self.company_id)
|
||||
if not self.partner_id:
|
||||
self.fiscal_position_id = False
|
||||
self.payment_term_id = False
|
||||
self.currency_id = self.env.company.currency_id.id
|
||||
else:
|
||||
self.fiscal_position_id = self.env['account.fiscal.position'].get_fiscal_position(self.partner_id.id)
|
||||
|
||||
@@ -342,7 +342,6 @@ class SaleOrder(models.Model):
|
||||
self.update({
|
||||
'partner_invoice_id': False,
|
||||
'partner_shipping_id': False,
|
||||
'payment_term_id': False,
|
||||
'fiscal_position_id': False,
|
||||
})
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user