From eb9f72ba627a7d859951d84c9372a6c3db2c75a0 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Fri, 6 Apr 2018 14:05:15 +0200 Subject: [PATCH 01/29] [FIX] web_calendar: unlink parsed id The id of the record may be a real database id or a string containing a virtual id (e.g. "42-20380119031417"). The id is always stored as a string but must be converted to int when sent to the ORM (to avoid self.browse('42')) The calendar modules do handle correctly virtual ids in its unlink method but it is not the case of the other modules that are expecting integers. Convert to int if we are working with real ids Replace and closes #22115 --- addons/web_calendar/static/src/js/web_calendar.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/web_calendar/static/src/js/web_calendar.js b/addons/web_calendar/static/src/js/web_calendar.js index 18cca729b56..529727cbd2f 100644 --- a/addons/web_calendar/static/src/js/web_calendar.js +++ b/addons/web_calendar/static/src/js/web_calendar.js @@ -917,9 +917,10 @@ var CalendarView = View.extend({ } } else { + var res_id = parseInt(id).toString() === id ? parseInt(id) : id; new form_common.FormViewDialog(this, { res_model: this.model, - res_id: parseInt(id).toString() === id ? parseInt(id) : id, + res_id: res_id, context: this.dataset.get_context(), title: title, view_id: +this.open_popup_action, @@ -931,7 +932,7 @@ var CalendarView = View.extend({ }}, {text: _t("Delete"), close: true, click: function() { - self.remove_event(id); + self.remove_event(res_id); }}, {text: _t("Close"), close: true} From ef2646ae9d9e93147fb4364b201418cf4b76018a Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Fri, 6 Apr 2018 17:53:43 +0200 Subject: [PATCH 02/29] [FIX] stock: location barcode more than one page Since 3d04e4488, several pages have to be denoted by: `
` And not as previously: `
` This was not taken into account in the "Location BarCode" report so we had only one page of barcode (so 4 barcodes since there is 4 barcode by page) displayed. fixes #19698 opw-1817574 closes #24098 --- addons/stock/report/report_location_barcode.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/report/report_location_barcode.xml b/addons/stock/report/report_location_barcode.xml index d67481ddbb9..a7414f10049 100644 --- a/addons/stock/report/report_location_barcode.xml +++ b/addons/stock/report/report_location_barcode.xml @@ -10,7 +10,7 @@