Impacted versions: 11.0

Steps to reproduce: Uninstall hr_timesheet

Current behavior: Project --> Reporting --> Task Analysis
![](https://image.prntscr.com/image/BH5ZQxUMTjqzCq4B8U1yFA.png)

Expected behavior: Report Should be there.

Video/Screenshot link (optional):


addons/sale_margin/__init__.py
from functools import partial
import openerp
from openerp import api, SUPERUSER_ID
from . import models      
from . import report      
def uninstall_hook(cr, registry):
    def recreate_view(dbname):
        db_registry = openerp.modules.registry.Registry.new(dbname)
        with api.Environment.manage(), db_registry.cursor() as cr:
            env = api.Environment(cr, SUPERUSER_ID, {})
            if 'sale.report' in env:
                env['sale.report'].init()
    cr.after("commit", partial(recreate_view, cr.dbname))