[FIX] account: avoid updating related field
The account.move has already self.date for the date field (cf the method `_prepare_reconciliation_move`). As the field date on the account.move.line is a related, it makes useless updates to write it here. Same issue for journal_id field
This commit is contained in:
@@ -782,7 +782,6 @@ class AccountBankStatementLine(models.Model):
|
||||
amount_currency = self.amount_currency * ratio
|
||||
return {
|
||||
'name': self.name,
|
||||
'date': self.date,
|
||||
'move_id': move.id,
|
||||
'partner_id': self.partner_id and self.partner_id.id or False,
|
||||
'account_id': amount >= 0 \
|
||||
@@ -791,7 +790,6 @@ class AccountBankStatementLine(models.Model):
|
||||
'credit': amount < 0 and -amount or 0.0,
|
||||
'debit': amount > 0 and amount or 0.0,
|
||||
'statement_id': self.statement_id.id,
|
||||
'journal_id': self.statement_id.journal_id.id,
|
||||
'currency_id': statement_currency != company_currency and statement_currency.id or (st_line_currency != company_currency and st_line_currency.id or False),
|
||||
'amount_currency': amount_currency,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user