From 9062c01c0298dd254197e5100ff9f23725f7e46f Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Mon, 27 Jun 2016 16:44:08 +0200 Subject: [PATCH] [FIX] web: pager page on next/previous record When browsing a form with a one2many / many2many field with several pages, the one2many pager page was not reset when going to the previous/next record, while the next/previous record could not have multiple pages on its one2many/many2many, and the page on which the user was on the former record could not exist in the newly displayed record. Besides, even if the page does exist, there is no reason to display this new record X2many value from its first page. It's the case anyway when you edit/save, it comes back to the first page. opw-679092 --- addons/web/static/src/js/views/form_relational_widgets.js | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web/static/src/js/views/form_relational_widgets.js b/addons/web/static/src/js/views/form_relational_widgets.js index beba85ac512..a1444bcae85 100644 --- a/addons/web/static/src/js/views/form_relational_widgets.js +++ b/addons/web/static/src/js/views/form_relational_widgets.js @@ -841,6 +841,7 @@ var FieldX2Many = AbstractManyField.extend({ self.is_loaded = self.is_loaded.then(function() { var view = self.get_active_view(); if (view.type === "list") { + view.controller.page = 0; return view.controller.reload_content(); } else if (view.controller.do_search) { return view.controller.do_search(self.build_domain(), self.dataset.get_context(), []);