[FIX] web: avoid passing buttons as export field

The new export feature forgot to filter out the action buttons that can
be displayed in the list view. (see odoo/odoo@5c4544f)
This lead to javascript trying to get fields on the model like
`action_validate` which obviously doesn't exist.

closes odoo/odoo#37261

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
This commit is contained in:
RomainLibert
2019-09-23 14:41:54 +00:00
parent d0c852f50e
commit 57a24dacaa
@@ -359,7 +359,7 @@ var ListController = BasicController.extend({
*/
_getExportDialogWidget() {
let state = this.model.get(this.handle);
let defaultExportFields = this.renderer.columns.map(field => field.attrs.name);
let defaultExportFields = this.renderer.columns.filter(field => field.tag === 'field').map(field => field.attrs.name);
let groupedBy = this.renderer.state.groupedBy;
return new DataExport(this, state, defaultExportFields, groupedBy,
this.getActiveDomain(), this.getSelectedIds());