From 9c5961bc8a5741dc06a48aa759d63b03d2554fd8 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Mon, 16 Nov 2015 17:51:02 +0100 Subject: [PATCH] [FIX] account: improve performances for reconciliations This rev. is related to 3dd79b3d65cdac2598db95a287d85442bb3bc0f4. Both `journal_id` and `date` on `account.move.line` are related from the `move_id` of the line. Besides, the move associated to these move lines is created with the same values, in `_prepare_reconciliation_move`: - The move `date` is set with `self.date`, exactly the same than what was set in the `aml_dict` - The move `journal_id` is set with `self.statement_id.journal_id.id`, which is the origin field of the related field `self.journal_id.id` used in the `aml_dict` opw-656463 --- addons/account/models/account_bank_statement.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py index 20878928588..932d5ca2d12 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -818,9 +818,7 @@ class AccountBankStatementLine(models.Model): ctx = dict(self._context, date=self.date) for aml_dict in to_create: aml_dict['move_id'] = move.id - aml_dict['date'] = self.date aml_dict['partner_id'] = self.partner_id.id - aml_dict['journal_id'] = self.journal_id.id aml_dict['statement_id'] = self.statement_id.id if st_line_currency.id != company_currency.id: aml_dict['amount_currency'] = aml_dict['debit'] - aml_dict['credit']