From 2399658421a71783544bebaea412c88b1d922104 Mon Sep 17 00:00:00 2001 From: EdwinBetanc0urt Date: Tue, 19 Nov 2024 14:03:31 -0400 Subject: [PATCH] fix: Export records on Smart Browse. --- src/utils/ADempiere/dictionary/browser/actionsMenu.js | 7 +------ src/utils/ADempiere/dictionaryUtils.js | 3 ++- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/utils/ADempiere/dictionary/browser/actionsMenu.js b/src/utils/ADempiere/dictionary/browser/actionsMenu.js index b0992da78a9..f45a1a9a60e 100644 --- a/src/utils/ADempiere/dictionary/browser/actionsMenu.js +++ b/src/utils/ADempiere/dictionary/browser/actionsMenu.js @@ -22,7 +22,6 @@ import language from '@/lang' // Constants import { OPERATOR_IN } from '@/utils/ADempiere/dataUtils.js' import { EXPORT_SUPPORTED_TYPES } from '@/utils/ADempiere/exportUtil.js' -import { BUTTON } from '@/utils/ADempiere/references.js' // Utils and Helpers Methods import { showNotification } from '@/utils/ADempiere/notification.js' @@ -97,16 +96,12 @@ export const exportAllRecords = { const fieldsListAvailable = fieldsList.filter(fieldItem => { const { isShowedTableFromUser, - display_type, is_encrypted + is_encrypted } = fieldItem // Hide encrypted fields if (is_encrypted) { return false } - // Hide simple button fields without a value - if (display_type === BUTTON.id) { // && fieldItem.referenceValue === 0) { - return false - } if (containerManager.isDisplayedColumn(fieldItem)) { const isMandatoryGenerated = containerManager.isMandatoryColumn(fieldItem) diff --git a/src/utils/ADempiere/dictionaryUtils.js b/src/utils/ADempiere/dictionaryUtils.js index c7ff984152e..77e9813845b 100644 --- a/src/utils/ADempiere/dictionaryUtils.js +++ b/src/utils/ADempiere/dictionaryUtils.js @@ -119,7 +119,7 @@ export function generateField({ if (fieldToGenerate.display_type === BUTTON.id) { if ((moreAttributes.isAdvancedQuery || fieldToGenerate.is_query_criteria) && fieldToGenerate.reference && fieldToGenerate.reference.reference_id > 0 && fieldToGenerate.reference.reference_value_id > 0) { - // overwrite if is with reference + // overwrite if is with reference (List, Search, Table) componentReference = evalutateTypeField(fieldToGenerate.reference.reference_id) fieldToGenerate.display_type = fieldToGenerate.reference.reference_id fieldToGenerate.reference = { @@ -127,6 +127,7 @@ export function generateField({ context_column_names: [] } } else if ([columnName, fieldToGenerate.element_name].includes('PaymentRule')) { + // overwrite as List componentReference = LIST fieldToGenerate.display_type = LIST.id fieldToGenerate.reference = {