Skip to content

Commit

Permalink
fix: Export records on Smart Browse.
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt committed Nov 19, 2024
1 parent 78a50e9 commit 2399658
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 1 addition & 6 deletions src/utils/ADempiere/dictionary/browser/actionsMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion src/utils/ADempiere/dictionaryUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,15 @@ 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 = {
table_name: fieldToGenerate.reference.table_name,
context_column_names: []
}
} else if ([columnName, fieldToGenerate.element_name].includes('PaymentRule')) {
// overwrite as List
componentReference = LIST
fieldToGenerate.display_type = LIST.id
fieldToGenerate.reference = {
Expand Down

0 comments on commit 2399658

Please sign in to comment.