From 66b721236c56ee655e04ba095c62978dfc91fc7b Mon Sep 17 00:00:00 2001 From: "Nicolas (vin)" Date: Tue, 28 Sep 2021 07:26:48 +0000 Subject: [PATCH] [IMP] account: Log changes on bank statements With bank synchronization, having information about changes done by the user on the bank statements can be useful when looking into issues. We'll now log changes in the starting/ending balance as well as the state of the statement to keep better track of what is happening on the statements. Task id #2647224 closes odoo/odoo#78264 X-original-commit: 3f2379347dae2482669aded034f3a5249aececa5 Signed-off-by: Laurent Smet Signed-off-by: oco-odoo --- addons/account/models/account_bank_statement.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py index ccef3b45948..9176def8cae 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -210,9 +210,9 @@ class AccountBankStatement(models.Model): reference = fields.Char(string='External Reference', states={'open': [('readonly', False)]}, copy=False, readonly=True, help="Used to hold the reference of the external mean that created this statement (name of imported file, reference of online synchronization...)") date = fields.Date(required=True, states={'confirm': [('readonly', True)]}, index=True, copy=False, default=fields.Date.context_today) date_done = fields.Datetime(string="Closed On") - balance_start = fields.Monetary(string='Starting Balance', states={'confirm': [('readonly', True)]}, compute='_compute_starting_balance', readonly=False, store=True) - balance_end_real = fields.Monetary('Ending Balance', states={'confirm': [('readonly', True)]}, compute='_compute_ending_balance', recursive=True, readonly=False, store=True) - state = fields.Selection(string='Status', required=True, readonly=True, copy=False, selection=[ + balance_start = fields.Monetary(string='Starting Balance', states={'confirm': [('readonly', True)]}, compute='_compute_starting_balance', readonly=False, store=True, tracking=True) + balance_end_real = fields.Monetary('Ending Balance', states={'confirm': [('readonly', True)]}, compute='_compute_ending_balance', recursive=True, readonly=False, store=True, tracking=True) + state = fields.Selection(string='Status', required=True, readonly=True, copy=False, tracking=True, selection=[ ('open', 'New'), ('posted', 'Processing'), ('confirm', 'Validated'),