[FIX] webiste: No company in website Settings
Steps to reproduce the bug: - Module website is installed - Multi companies is set - Go to Website > Settings - Remove the company for the current website and save Bug: A traceback was raised opw:2228183 closes odoo/odoo#48839 X-original-commit: 2c27b9d100c1f3759bfe864f8ac78bc5c0436ecd Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
@@ -186,7 +186,7 @@ class Website(models.Model):
|
||||
public_user_to_change_websites = self.filtered(lambda w: w.sudo().user_id.company_id.id != values['company_id'])
|
||||
if public_user_to_change_websites:
|
||||
company = self.env['res.company'].browse(values['company_id'])
|
||||
super(Website, public_user_to_change_websites).write(dict(values, user_id=company._get_public_user().id))
|
||||
super(Website, public_user_to_change_websites).write(dict(values, user_id=company and company._get_public_user().id))
|
||||
|
||||
result = super(Website, self - public_user_to_change_websites).write(values)
|
||||
if 'cdn_activated' in values or 'cdn_url' in values or 'cdn_filters' in values:
|
||||
|
||||
Reference in New Issue
Block a user