From 746cda7f89089ee348648a56ee9ca712ef215992 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Thu, 12 May 2016 11:49:39 +0200 Subject: [PATCH] [FIX] website: URL of website_published is wrong when using next/previous Steps to reproduce: -go to runbot 8.0 and connect -go into human ressources/job positions -pass into list view and click on the first item -click on the url to open this record into the website (website_published) -go back (back into the browser) -you're now into the form view again and then next step is to click on the button "next" to access the following record -click on the url of website_published Before the fix: wrong record, this is the previous one that is into the href After the fix: correct record with the correct id into the href Closes #11800 opw:675832 --- addons/website/static/src/js/website.backend.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/website/static/src/js/website.backend.js b/addons/website/static/src/js/website.backend.js index 43347b85cb7..b6d95a65ff3 100644 --- a/addons/website/static/src/js/website.backend.js +++ b/addons/website/static/src/js/website.backend.js @@ -17,6 +17,9 @@ instance.web.form.WidgetWebsiteButton = instance.web.form.AbstractField.extend({ var self = this; this._super.apply(this, arguments); + this.$('#dopprod-0').on('click', function() { + self.render_value(); + }); this.$("button:first").on("click", function () { console.log("click", !!$(this).hasClass("btn-danger")); self.set_value(!!$(this).hasClass("btn-danger"));