Impacted versions: 11c, 11e

Steps to reproduce: Install module, uninstall it, then go to action choise delete module (tested with some module: Automated Translations through Gengo API, Vietnam - Accounting...)

Current behavior:
Popup error:
```
The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set

[object with reference: Module Uninstallation - base.module.uninstall]
```
--
logs:
```
ERROR: null value in column "module_id" violates not-null constraint
DETAIL:  Failing row contains (1, t, null, 1, 2017-11-06 09:26:04.803957, 1, 2017-11-06 09:26:04.803957).
CONTEXT:  SQL statement "UPDATE ONLY "public"."base_module_uninstall" SET "module_id" = NULL WHERE $1 OPERATOR(pg_catalog.=) "module_id""
```

If module is not installed before, no error occurs

Expected behavior: the module should delete normally
odoo/addons/base/module/module.py
new = super(Module, self).create(vals)
        module_metadata = {
            'name': 'module_%s' % vals['name'],
            'model': 'ir.module.module',
            'module': 'base',
            'res_id': new.id,
            'noupdate': True,
        }
        self.env['ir.model.data'].create(module_metadata)
        return new
    
    @assert_log_admin_access
    @api.model
    def update_list(self):
        res = [0, 0]    
        default_version = modules.adapt_version('1.0')
        known_mods = self.search([])
        known_mods_names = {mod.name: mod for mod in known_mods}
        
        for mod_name in modules.get_modules():
            mod = known_mods_names.get(mod_name)