[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:
Andreas Perhab
2018-11-05 13:06:33 +01:00
committed by Martin Trigaux
parent 053a023fc7
commit d3b86ab930
@@ -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