Merge pull request #525 from Martronic-SA/patch-1

avoid breaking inheritance
This commit is contained in:
Pedro M. Baeza
2018-11-26 16:52:14 +01:00
committed by GitHub

View File

@@ -73,10 +73,12 @@ class AccountInvoice(models.Model):
@api.onchange('partner_id', 'company_id')
def _onchange_partner_id(self):
"""Select by default the first valid mandate of the partner"""
super(AccountInvoice, self)._onchange_partner_id()
res = super(AccountInvoice, self)._onchange_partner_id()
self.set_mandate()
return res
@api.onchange('payment_mode_id')
def payment_mode_id_change(self):
super(AccountInvoice, self).payment_mode_id_change()
res = super(AccountInvoice, self).payment_mode_id_change()
self.set_mandate()
return res