def uninstall_hook_for_submodules(cr, registry, model):
 env = api.Environment(cr, SUPERUSER_ID, {})
 with cr.savepoint():
  Image = env['base_multi_image.image']
  images = Image.search([('owner_model', '=', model)])
  images.unlink()

def uninstall_hook_for_submodules ( cr , registry , model ) : env = api . Environment ( cr , SUPERUSER_ID , { } ) with cr . savepoint ( ) : Image = env [ 'base_multi_image.image' ] images = Image . search ( [ ( 'owner_model' , '=' , model ) ] ) images . unlink ( )
remove multi-images for a given model .