[FIX] purchase_requision: fix syntax error
payment_term.id, creates a tuple wich works if payment_term.id is set in case payment_term.id is False this creates the tuple (False,) which is then converted by the Odoo ORM to a account.payment.term(False, ) record set, which in term may cause weird behaviour as this value does not eval to false in cases like `if self.payment_term_id:` Closes odoo/odoo#28397
This commit is contained in:
@@ -170,7 +170,7 @@ class PurchaseOrder(models.Model):
|
||||
|
||||
self.partner_id = partner.id
|
||||
self.fiscal_position_id = fpos.id
|
||||
self.payment_term_id = payment_term.id,
|
||||
self.payment_term_id = payment_term.id
|
||||
self.company_id = requisition.company_id.id
|
||||
self.currency_id = currency.id
|
||||
self.origin = requisition.name
|
||||
|
||||
Reference in New Issue
Block a user