From 799e03a88be7e8568621d3390e884068c4ac7697 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Mon, 8 Feb 2016 11:52:24 +0100 Subject: [PATCH] [IMP] pass account_period_prefer_normal --- .../models/account_bank_statement_import.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/account_bank_statement_import/models/account_bank_statement_import.py b/account_bank_statement_import/models/account_bank_statement_import.py index 71185d7..ee7245c 100644 --- a/account_bank_statement_import/models/account_bank_statement_import.py +++ b/account_bank_statement_import/models/account_bank_statement_import.py @@ -354,7 +354,9 @@ class AccountBankStatementImport(models.TransientModel): # do this now try: stmt_vals['period_id'] =\ - self.env['account.period'].find(dt=stmt_vals['date']).id + self.env['account.period']\ + .with_context(account_period_prefer_normal=True)\ + .find(dt=stmt_vals['date']).id except RedirectWarning: # if there's no period for the date, ignore resulting exception pass