[FIX] change for multiple statement line + change domain to fit the account cancel

This commit is contained in:
vrenaville
2015-07-20 14:33:24 +02:00
parent 2dc9f8197c
commit 3f58f7e3e1
2 changed files with 7 additions and 4 deletions

View File

@@ -66,9 +66,12 @@ class AccountBankStatementLine(models.Model):
@api.multi
def _is_account_cancel_installed(self):
ir_module = self.env['ir.module.module']
account_cancel = ir_module.search([('name', '=', 'account_cancel'),
('state', '=', 'installed')])
return bool(account_cancel)
res_found_module = ir_module.search_count([
('name', '=', 'account_cancel'),
('state', '=', 'installed')])
if res_found_module:
for line in self:
line.account_cancel_installed = True
account_cancel_installed = fields.Boolean(
compute='_is_account_cancel_installed',