From 73ce21ef997640ab2095ad2d7aebc57e86e6c7ed Mon Sep 17 00:00:00 2001 From: hyyy <123@qq.com> Date: Thu, 13 Mar 2025 17:07:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=8C=E4=BF=AE=E5=A4=8Dbu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- quality_control/static/src/js/quality.check.measures.line.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/quality_control/static/src/js/quality.check.measures.line.js b/quality_control/static/src/js/quality.check.measures.line.js index 3a19db67..5e8d2f14 100644 --- a/quality_control/static/src/js/quality.check.measures.line.js +++ b/quality_control/static/src/js/quality.check.measures.line.js @@ -31,6 +31,7 @@ patch(ListRenderer.prototype, 'custom_measure_line_tree_patch', { setTimeout(() => { const $dom = $(this.__owl__.bdom.el) const $thead = $dom.find('thead').find('th'); + if(!this.props.list.records || this.props.list.records.length == 0) return const $total_qty = this.props.list.records[0].data.column_nums; const hideKey = [] const width = $dom.find('[data-name=measure_value1]').width(); @@ -48,8 +49,8 @@ patch(ListRenderer.prototype, 'custom_measure_line_tree_patch', { return `[data-name="${_}"],[name="${_}"]` }) $dom.find(hideDom.join(',')).hide() - const $cloNum = $dom.find('.o_data_row').children('td:visible').length; - $dom.find('.o_data_row').siblings('tr').children('td').prop('colspan', $cloNum); + const $cloNum = $dom.find('.o_data_row').eq(0).children('td:visible').length; + $dom.find('.o_data_row').siblings('tr:not(.o_data_row)').children('td').prop('colspan', $cloNum); $dom.find('tfoot').hide() }, 50); })