[IMP] website_theme_install module make "installable"=False, due to multi website feature
This commit is contained in:
parent
bcb75f2cfc
commit
4aafcbbc3d
@ -19,6 +19,13 @@ class View(models.Model):
|
|||||||
_inherit = ["ir.ui.view", "website.seo.metadata"]
|
_inherit = ["ir.ui.view", "website.seo.metadata"]
|
||||||
|
|
||||||
customize_show = fields.Boolean("Show As Optional Inherit", default=False)
|
customize_show = fields.Boolean("Show As Optional Inherit", default=False)
|
||||||
|
# @todo Flectra:
|
||||||
|
# Remove ondelete='cascade' (But need to check side-effects!!)
|
||||||
|
#
|
||||||
|
# When we Uninstall ``website`` module then some of
|
||||||
|
# ``portal`` module views are also deleted (For Ex. portal_show_sign_in)
|
||||||
|
# Find proper way to do the same, remove website_id from different
|
||||||
|
# module's view & keep those views, do not delete those views permanently.
|
||||||
website_id = fields.Many2one('website', ondelete='cascade', string="Website")
|
website_id = fields.Many2one('website', ondelete='cascade', string="Website")
|
||||||
page_ids = fields.One2many('website.page', compute='_compute_page_ids', store=False)
|
page_ids = fields.One2many('website.page', compute='_compute_page_ids', store=False)
|
||||||
is_cloned = fields.Boolean(string='Cloned', copy=False, default=False,
|
is_cloned = fields.Boolean(string='Cloned', copy=False, default=False,
|
||||||
@ -233,6 +240,10 @@ class View(models.Model):
|
|||||||
# Scenario 1:
|
# Scenario 1:
|
||||||
# -----------
|
# -----------
|
||||||
# For Delete those views, Manually set ``is_cloned`` field to ``False``
|
# For Delete those views, Manually set ``is_cloned`` field to ``False``
|
||||||
|
# @todo Flectra:
|
||||||
|
# But Actually View is not deleted, It'll create again from
|
||||||
|
# default website's view,
|
||||||
|
# Find a way to delete website specific views form DB.
|
||||||
#
|
#
|
||||||
# Scenario 2:
|
# Scenario 2:
|
||||||
# -----------
|
# -----------
|
||||||
@ -260,4 +271,4 @@ class View(models.Model):
|
|||||||
# 'will not work properly.\n'
|
# 'will not work properly.\n'
|
||||||
# 'So, Be sure before deleting view(s).'
|
# 'So, Be sure before deleting view(s).'
|
||||||
return True
|
return True
|
||||||
return super(View, self).unlink()
|
return super(View, view).unlink()
|
||||||
|
@ -9,5 +9,6 @@
|
|||||||
'views/views.xml',
|
'views/views.xml',
|
||||||
],
|
],
|
||||||
'depends': ['website'],
|
'depends': ['website'],
|
||||||
'auto_install': True,
|
'auto_install': False,
|
||||||
|
'installable': False
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user