Merge PR #667 into 11.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2020-12-30 07:44:27 +00:00

View File

@@ -14,7 +14,8 @@ class SaleOrder(models.Model):
def _get_payment_mode_vals(self, vals):
if self.payment_mode_id:
vals['payment_mode_id'] = self.payment_mode_id.id
if self.payment_mode_id.bank_account_link == 'fixed':
if (self.payment_mode_id.bank_account_link == 'fixed' and
self.payment_mode_id.payment_method_id.code == 'manual'):
vals['partner_bank_id'] =\
self.payment_mode_id.fixed_journal_id.bank_account_id.id
return vals