diff --git a/src/components/ADempiere/FieldDefinition/FieldButton.vue b/src/components/ADempiere/FieldDefinition/FieldButton.vue index 1802a50095..53fb34c246 100644 --- a/src/components/ADempiere/FieldDefinition/FieldButton.vue +++ b/src/components/ADempiere/FieldDefinition/FieldButton.vue @@ -62,7 +62,7 @@ import fieldMixinDisplayColumn from '@/components/ADempiere/FieldDefinition/mixi import { TRUE_STRING, FALSE_STRING } from '@/utils/ADempiere/formatValue/booleanFormat' -import { RECORD_ID } from '@/utils/ADempiere/constants/systemColumns' +import { COLUMNNAME_RECORD_ID } from '@/utils/ADempiere/constants/systemColumns' import { IDENTIFIER_COLUMN_SUFFIX } from '@/utils/ADempiere/dictionaryUtils' // Utils and Helpers Methods @@ -104,7 +104,7 @@ export default { computed: { isDisabledButton() { - return (this.metadata.readonly || this.isDisableAction) && !['Posted', RECORD_ID].includes(this.metadata.columnName) + return (this.metadata.readonly || this.isDisableAction) && !['Posted', COLUMNNAME_RECORD_ID].includes(this.metadata.columnName) }, isDisableAction() { return this.actionAssociated.isEnabled && !this.actionAssociated.isEnabled() @@ -168,7 +168,7 @@ export default { return isShowAcct } } - } else if (this.metadata.columnName === RECORD_ID) { + } else if (this.metadata.columnName === COLUMNNAME_RECORD_ID) { return { // is: 'svg-icon', // 'icon-class': 'zoom-in', @@ -326,7 +326,7 @@ export default { }, currentTableId() { - if (this.metadata.displayed && this.metadata.columnName === RECORD_ID) { + if (this.metadata.displayed && this.metadata.columnName === COLUMNNAME_RECORD_ID) { const { containerUuid, inTable } = this.metadata // table records values if (inTable) { @@ -352,7 +352,7 @@ export default { watch: { contextAttributes(newValue, oldValue) { - if (this.metadata.columnName === RECORD_ID && !isSameValues(newValue, oldValue)) { + if (this.metadata.columnName === COLUMNNAME_RECORD_ID && !isSameValues(newValue, oldValue)) { if (!isEmptyValue(newValue)) { this.setDefaultValue() } @@ -368,7 +368,7 @@ export default { }, beforeMount() { - if (this.metadata.displayed && this.metadata.columnName === RECORD_ID) { + if (this.metadata.displayed && this.metadata.columnName === COLUMNNAME_RECORD_ID) { if (!this.emptyValue && typeof this.value === 'number') { if (isEmptyValue(this.displayedValue)) { // request lookup diff --git a/src/utils/ADempiere/constants/systemColumns.js b/src/utils/ADempiere/constants/systemColumns.js index 6c9255f77a..128e546ee4 100644 --- a/src/utils/ADempiere/constants/systemColumns.js +++ b/src/utils/ADempiere/constants/systemColumns.js @@ -30,7 +30,13 @@ export const UUID = 'UUID' export const ID = 'ID' +export const COLUMNNAME_AD_Table_ID = 'AD_Table_ID' + +/** + * @deprecated + */ export const RECORD_ID = 'Record_ID' +export const COLUMNNAME_RECORD_ID = 'Record_ID' export const COUNTRY = 'C_Country_ID' diff --git a/src/utils/ADempiere/valueFormat.js b/src/utils/ADempiere/valueFormat.js index d0af499ec1..caaf1f8f7e 100644 --- a/src/utils/ADempiere/valueFormat.js +++ b/src/utils/ADempiere/valueFormat.js @@ -24,6 +24,7 @@ import { DATE, DATE_PLUS_TIME, TIME, AMOUNT, COSTS_PLUS_PRICES, NUMBER, QUANTITY, CHAR, MEMO, TEXT, TEXT_LONG, + BUTTON, ID, ACCOUNT_ELEMENT, LOCATION_ADDRESS, // Custom lookups LOCATOR_WAREHOUSE, PRODUCT_ATTRIBUTE, // Custom lookups of Producs LIST, TABLE, TABLE_DIRECT, SEARCH, // Standard lookups @@ -80,6 +81,8 @@ export function formatField({ let formattedValue switch (displayType) { case ACCOUNT_ELEMENT.id: + case BUTTON.id: + case ID.id: case LIST.id: case LOCATION_ADDRESS.id: case LOCATOR_WAREHOUSE.id: