diff options
| author | Mehul Patel <mep@odoo.com> | 2017-05-08 15:36:06 +0530 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2017-05-26 15:21:53 +0200 |
| commit | 904dcc0e06b55630e67efa6250f545e991ac276e (patch) | |
| tree | 43f36925d29399c122b0e6a59ef2397b88312cc9 | |
| parent | 7e008469e4e5afe9b4c7151a4738240462359f98 (diff) | |
[FIX] account: Fixed traceback when no payment on `process_reconciliation`
this bug is exposed due to the change,
https://github.com/odoo/odoo/commit/97c6dc77925090cb57e57b9edabcf81c93bea87c#diff-5f115361da1bcfdf42d3f2e0ad6e8661L476
| -rw-r--r-- | addons/account/models/account_bank_statement.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py index 5b486a5462d..26f09500b76 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -1008,7 +1008,7 @@ class AccountBankStatementLine(models.Model): move.post() #record the move name on the statement line to be able to retrieve it in case of unreconciliation self.write({'move_name': move.name}) - payment.write({'payment_reference': move.name}) + payment and payment.write({'payment_reference': move.name}) elif self.move_name: raise UserError(_('Operation not allowed. Since your statement line already received a number, you cannot reconcile it entirely with existing journal entries otherwise it would make a gap in the numbering. You should book an entry and make a regular revert of it in case you want to cancel it.')) counterpart_moves.assert_balanced() |
