[FIX] website: Delete redirections if website is deleted
Before this patch, if a website is deleted, its redirections will stay, affecting other websites. Now, website-specific redirections will disappear along with their corresponding website. closes odoo/odoo#35130 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
@@ -913,6 +913,6 @@ class WebsiteRedirect(models.Model):
|
||||
type = fields.Selection([('301', 'Moved permanently'), ('302', 'Moved temporarily')], string='Redirection Type', default='301')
|
||||
url_from = fields.Char('Redirect From')
|
||||
url_to = fields.Char('Redirect To')
|
||||
website_id = fields.Many2one('website', 'Website')
|
||||
website_id = fields.Many2one('website', 'Website', ondelete='cascade')
|
||||
active = fields.Boolean(default=True)
|
||||
sequence = fields.Integer(default=0)
|
||||
|
||||
Reference in New Issue
Block a user