diff --git a/account_statement_ext/statement.py b/account_statement_ext/statement.py index 748db07e..ed1d04e4 100644 --- a/account_statement_ext/statement.py +++ b/account_statement_ext/statement.py @@ -254,8 +254,8 @@ class AccountBankStatement(orm.Model): return False for line in statement.line_ids: if (line.period_id and - statement.journal_id.company_id.id - != line.period_id.company_id.id): + statement.journal_id.company_id.id != + line.period_id.company_id.id): return False return True diff --git a/account_statement_one_move/statement.py b/account_statement_one_move/statement.py index d5d0d323..5e4308d9 100644 --- a/account_statement_one_move/statement.py +++ b/account_statement_one_move/statement.py @@ -108,8 +108,8 @@ class AccountBankStatement(orm.Model): st_line = st_line_obj.browse(cr, uid, st_line_id, context=context) st = st_line.statement_id context.update({'date': st_line.date}) - acc_cur = (((st_line.amount <= 0) - and st.journal_id.default_debit_account_id) or + acc_cur = (((st_line.amount <= 0) and + st.journal_id.default_debit_account_id) or st_line.account_id) context.update({ 'res.currency.compute.account': acc_cur,