[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 <smetl@users.noreply.github.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
This commit is contained in:
wan
2020-11-19 18:02:05 +00:00
parent 5cc2404889
commit e0d09357d0
@@ -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
# -------------------------------------------------------------------------