为了将视图导出到excel文件,我使用了这个,但问题是我无法导出sum属性生成的最后一行:
if (children) {
// find only rows with data
view.$el.find('.o_list_view > tbody > tr[data-id]:has(.o_list_record_selector input:checkbox:checked)')
.each(function () {
var $row = $(this);
var export_row = [];
$.each(export_columns_keys, function () {
var $cell = $row.find('td[data-field="' + this + '"]')
var $cellcheckbox = $cell.find('.o_checkbox input:checkbox');
if ($cellcheckbox.length) {
export_row.push(
$cellcheckbox.is(":checked")
? _t("True") : _t("False")
);
}
else {
var text = $cell.text().trim();
export_row.push(text);
}
});
export_rows.push(export_row);
});
}
我该如何添加它?有办法吗?
答案 0 :(得分:0)
var export_row = [];
var export_rows = [];
不应该url(r'^(?P<slug>[a-z0-9-]+)$/detail', views.detail, name='detail')]
? (注意最后的s)