[FIX] website: Impossible to link an analytic account
Steps to reproduce the bug: - Go to Website > Dashboard > Analytics and click on "Link my analytics account" - Enter some data and save Bug: A traceback was raised: TypeError: website_set_ga_data() missing 1 required positional argument: 'website_id' opw:1905874 closes odoo/odoo#28636
This commit is contained in:
@@ -61,6 +61,6 @@ class WebsiteBackend(http.Controller):
|
||||
request.env['res.config.settings'].create({
|
||||
'google_management_client_id': ga_client_id,
|
||||
'google_analytics_key': ga_analytics_key,
|
||||
'website_id': current_website,
|
||||
'website_id': current_website.id,
|
||||
}).execute()
|
||||
return True
|
||||
|
||||
@@ -44,6 +44,9 @@ var Dashboard = AbstractAction.extend(ControlPanelMixin, {
|
||||
var self = this;
|
||||
return $.when(ajax.loadLibs(this), this._super()).then(function() {
|
||||
return self.fetch_data();
|
||||
}).then(function(){
|
||||
var website = _.findWhere(self.websites, {selected: true});
|
||||
self.website_id = website ? website.id : false;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user