From e0d09357d0b2b9f63c83114f823ca3406a9003bc Mon Sep 17 00:00:00 2001 From: wan Date: Thu, 19 Nov 2020 10:13:30 +0000 Subject: [PATCH] [FIX] account: deactivate sequence/date sync constraint on statements opw-2379384 opw-2381830 opw-2381936 closes odoo/odoo#62044 X-original-commit: 6f260124a01879ce39933b2671c002cf1b7d13e7 Signed-off-by: Laurent Smet Signed-off-by: wan --- addons/account/models/account_bank_statement.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py index 5f46bf53a37..89c96dc53cb 100644 --- a/addons/account/models/account_bank_statement.py +++ b/addons/account/models/account_bank_statement.py @@ -352,6 +352,13 @@ class AccountBankStatement(models.Model): if any(st_line.journal_id != statement.journal_id for st_line in statement.line_ids): raise ValidationError(_('The journal of a bank statement line must always be the same as the bank statement one.')) + def _constrains_date_sequence(self): + # Multiple import methods set the name to things that are not sequences: + # i.e. Statement from {date1} to {date2} + # It makes this constraint not applicable, and it is less needed on bank statements as it + # is only an indication and not some thing legal. + return + # ------------------------------------------------------------------------- # BUSINESS METHODS # -------------------------------------------------------------------------