summaryrefslogtreecommitdiff
path: root/addons/website
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website')
-rw-r--r--addons/website/controllers/main.py2
-rw-r--r--addons/website/models/ir_model_fields.py11
-rw-r--r--addons/website/models/website.py6
-rw-r--r--addons/website/static/src/js/menu/content.js2
4 files changed, 12 insertions, 9 deletions
diff --git a/addons/website/controllers/main.py b/addons/website/controllers/main.py
index 40d3c32fc87..dad87420ecb 100644
--- a/addons/website/controllers/main.py
+++ b/addons/website/controllers/main.py
@@ -118,7 +118,7 @@ class Website(Home):
def robots(self):
return request.render('website.robots', {'url_root': request.httprequest.url_root}, mimetype='text/plain')
- @http.route('/sitemap.xml', type='http', auth="public", website=True)
+ @http.route('/sitemap.xml', type='http', auth="public", website=True, multilang=False)
def sitemap_xml_index(self, **kwargs):
current_website = request.website
Attachment = request.env['ir.attachment'].sudo()
diff --git a/addons/website/models/ir_model_fields.py b/addons/website/models/ir_model_fields.py
index 1e963bf650e..51f5c2a7dc5 100644
--- a/addons/website/models/ir_model_fields.py
+++ b/addons/website/models/ir_model_fields.py
@@ -1,17 +1,15 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details
-from odoo import api, models
+from odoo import models
# This is a nasty hack, targeted for V11 only
class IrModelFields(models.Model):
_inherit = 'ir.model.fields'
- @api.multi
def unlink(self):
- # Prevent the deletion of social_* fields defined in res.company if
- # the other module is installed
+ # Prevent the deletion of some `shared` fields... -_-
social = (
'social_facebook',
'social_github',
@@ -23,8 +21,9 @@ class IrModelFields(models.Model):
self = self.filtered(
lambda rec: not (
- rec.model == 'res.company' and
- rec.name in social
+ (rec.model == 'res.company' and rec.name in social)
+ or (rec.model == 'res.config.settings'
+ and rec.name == 'auth_signup_uninvited')
)
)
return super(IrModelFields, self).unlink()
diff --git a/addons/website/models/website.py b/addons/website/models/website.py
index ba5b168c9b6..f8e00eb4494 100644
--- a/addons/website/models/website.py
+++ b/addons/website/models/website.py
@@ -119,6 +119,10 @@ class Website(models.Model):
'arch': template_record.arch.replace(template, key),
'name': name,
})
+
+ if view.arch_fs:
+ view.arch_fs = False
+
if ispage:
page = self.env['website.page'].create({
'url': page_url,
@@ -711,7 +715,7 @@ class Page(models.Model):
'website_id': website.id,
})
- return True
+ return url
@api.multi
@api.returns('self', lambda value: value.id)
diff --git a/addons/website/static/src/js/menu/content.js b/addons/website/static/src/js/menu/content.js
index b6d72df3d2a..a931cc057ef 100644
--- a/addons/website/static/src/js/menu/content.js
+++ b/addons/website/static/src/js/menu/content.js
@@ -205,7 +205,7 @@ var PagePropertiesDialog = weWidgets.Dialog.extend({
method: 'save_page_info',
args: [[context.website_id], params],
context: context,
- }).then(function () {
+ }).then(function (url) {
// If from page manager: reload url, if from page itself: go to
// (possibly) new url
if (self._getMainObject().model === 'website.page') {