[FIX] payment: onchange partner

- Go in Accounting > Sales > Payment
- Fill the mandatory info, and create a "Payment Transaction"
- On the form view, change the Partner
- The Customer Details are empty, and saving is not possible since the
  country (mandatory) is not filled in

Closes #15708
opw-771753
This commit is contained in:
Nicolas Martinelli
2017-09-18 10:51:51 +02:00
parent 6b511f38c0
commit 58c5b1cfd8
+1 -1
View File
@@ -446,7 +446,7 @@ class PaymentTransaction(models.Model):
@api.onchange('partner_id')
def _onchange_partner_id(self):
onchange_vals = self.on_change_partner_id(self.partner_id.id).get('value', {})
self.write(onchange_vals)
self.update(onchange_vals)
@api.multi
def on_change_partner_id(self, partner_id):