diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2019-01-16 07:45:45 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2019-01-16 07:51:53 +0000 |
| commit | b876cb397dbd8fe81a9a0ec0f6efbdc73178b9e7 (patch) | |
| tree | b2ca441ef6da7b9ee6e60a29c6db8814f438e5f4 /addons/website/models | |
| parent | ae6545ccd5a97b336ae0a6a2bcea021f0f1acf7e (diff) | |
[FIX] website: null type redirection
Commit 68e9d5504cb293643 makes the redirection type mandatory, which is
logical. Since we can't add such a constraint in stable, we make the
field required in the view and assign a default value (in case the
module is not upgraded, which is very likely to be the case).
opw-1924983
closes odoo/odoo#30252
Diffstat (limited to 'addons/website/models')
| -rw-r--r-- | addons/website/models/website.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website/models/website.py b/addons/website/models/website.py index 7072dd954f1..95565febaee 100644 --- a/addons/website/models/website.py +++ b/addons/website/models/website.py @@ -910,7 +910,7 @@ class WebsiteRedirect(models.Model): _order = "sequence, id" _rec_name = 'url_from' - type = fields.Selection([('301', 'Moved permanently'), ('302', 'Moved temporarily')], string='Redirection Type') + 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') |
