[FIX] upgrade_analysis: truncate upgrade records before generating new ones

pull/2417/head
mreficent 2021-03-28 12:51:41 +02:00 committed by Stefan Rijnhart
parent 7de18509c6
commit 989b37924e
1 changed files with 3 additions and 0 deletions

View File

@ -25,6 +25,9 @@ class GenerateWizard(models.TransientModel):
TODO: update module list and versions, then update all modules?"""
# Truncate the records table
self.env.cr.execute("TRUNCATE upgrade_attribute, upgrade_record;")
# Check of all the modules are correctly installed
modules = self.env["ir.module.module"].search(
[("state", "in", ["to install", "to upgrade"])]