From e07309d809326f0df674fecb70874b420922e604 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 15 Jan 2015 16:49:42 +0100 Subject: [PATCH] [FIX] account: bank statement line needaction domain Before 8.0, the field journal_entry_id did not exist. For database coming from older release, like 7.0, this field is not filled in during the migration, because this is not possible. Set the needaction to depend only on the journal_entry_id will have as effect to have every bank statement line entered when the database was under 7.0 to match the domain, while the needaction is made to display the number of records that need an action. Besides, even in 8.0, this is possible that a line has not the journal_entry_id set, while not needing any actions (see 2bb38ca89dc9ad65e983ae908920144dec5b88c9) --- addons/account/account_bank_statement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 6c662f70d85..f605ad3147d 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -825,7 +825,7 @@ class account_bank_statement_line(osv.osv): # Unfortunately, that spawns a "no access rights" error ; it shouldn't. def _needaction_domain_get(self, cr, uid, context=None): user = self.pool.get("res.users").browse(cr, uid, uid) - return ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id]), ('journal_entry_id', '=', False)] + return ['|', ('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id]), ('journal_entry_id', '=', False), ('account_id', '=', False)] _order = "statement_id desc, sequence" _name = "account.bank.statement.line"