From 5efec7ccdd8ca3f15fad5df8de7c23154c23a7d9 Mon Sep 17 00:00:00 2001 From: Romain Estievenart Date: Fri, 4 Jan 2019 13:26:08 +0000 Subject: [PATCH] [FIX] sale_timesheet: responsive table On small screens, when we click on the overview of a task inside the "project" app, the displayed table doesn't fit the screen. This commit only add missing parent "div.table-responsive" to add responsive support. A better fix has been merged in master, see: https://github.com/odoo/odoo/commit/dc017d17e9170d3fc0a5104ab9dc84f748bc097a opw-1907877 closes odoo/odoo#29971 --- addons/sale_timesheet/static/src/js/timesheet_plan.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/addons/sale_timesheet/static/src/js/timesheet_plan.js b/addons/sale_timesheet/static/src/js/timesheet_plan.js index 2aa8dd7b631..72309b3d705 100644 --- a/addons/sale_timesheet/static/src/js/timesheet_plan.js +++ b/addons/sale_timesheet/static/src/js/timesheet_plan.js @@ -105,7 +105,13 @@ var PlanAction = Widget.extend(ControlPanelMixin, { * @private */ _refreshPlan: function(dom){ - this.$el.html(dom); + // TODO: Not forward port this fix on master + var $dom = $(dom); + $dom.find('div.o_timesheet_plan_sale_timesheet_dashboard > table.table, ' + + 'div.o_timesheet_plan_sale_timesheet_people_time > table.table, ' + + 'div.o_project_plan_project_timesheet_forecast > table.table') + .wrap('
'); + this.$el.html($dom); }, /** * Call controller to get the html content