From 8ff7230e2d6d49e5b880fbee9589de1e8a78fb95 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 7 Oct 2014 14:57:26 +0200 Subject: [PATCH] [FIX] migration: test if package is installed using its state. checking if there is an installed version set is not enough because this field is not reset when the module is uninstalled --- openerp/modules/migration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openerp/modules/migration.py b/openerp/modules/migration.py index c28c6be504f..a1b4836da3e 100644 --- a/openerp/modules/migration.py +++ b/openerp/modules/migration.py @@ -3,7 +3,7 @@ # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). -# Copyright (C) 2010-2013 OpenERP s.a. (). +# Copyright (C) 2010-2014 OpenERP s.a. (). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -90,7 +90,7 @@ class MigrationManager(object): 'post': '[%s>]', } - if not (hasattr(pkg, 'update') or pkg.state == 'to upgrade') or pkg.installed_version is None: + if not (hasattr(pkg, 'update') or pkg.state == 'to upgrade') or pkg.state == 'to install': return def convert_version(version):