[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
This commit is contained in:
Goffin Simon 2016-05-12 11:49:39 +02:00
parent 7061acd2c1
commit 746cda7f89
1 changed files with 3 additions and 0 deletions

View File

@ -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"));