diff --git a/src/components/ADempiere/FieldDefinition/index.vue b/src/components/ADempiere/FieldDefinition/index.vue index 94558cfddd..34d130bc63 100644 --- a/src/components/ADempiere/FieldDefinition/index.vue +++ b/src/components/ADempiere/FieldDefinition/index.vue @@ -415,15 +415,11 @@ export default { return 'border: 1px solid #fff;border-radius: 5px;' }, isOperatior() { - if (this.$route.meta.type === 'report') { - const { is_jasper_report: isJasper } = store.getters.getStoredReport(this.containerUuid) - if (isJasper) { - return false - } - } const isBrowser = this.$route.meta.type === 'browser' + const isReport = this.$route.meta.type === 'report' const { isAdvancedQuery, + isLegacyReport, is_query_criteria } = this.field if ( @@ -432,6 +428,9 @@ export default { ( isBrowser && is_query_criteria + ) || ( + isReport && + !isLegacyReport ) ) return true return false diff --git a/src/lang/ADempiere/en/operators.ts b/src/lang/ADempiere/en/operators.ts index 8dadcdf155..4780ea29a8 100644 --- a/src/lang/ADempiere/en/operators.ts +++ b/src/lang/ADempiere/en/operators.ts @@ -29,8 +29,8 @@ const operators = { less_equal: 'Less than or equal to "<="', between: 'Within ">-<"', not_between: 'Outside "<->"', - null: 'Has no value', - not_null: 'Has a value', + null: 'Has no value "null"', + not_null: 'Has a value "!null"', in: 'Includes "()"', not_in: 'Does not include "!()"', onlyOperators: { @@ -46,8 +46,8 @@ const operators = { less_equal: '<=', between: '>-<', not_between: '<->', - null: 'Has no value', - not_null: 'Has a value', + null: 'null', + not_null: '!null', in: '()', not_in: '!()' } diff --git a/src/lang/ADempiere/es/operators.ts b/src/lang/ADempiere/es/operators.ts index 512c17d294..f2053d76a0 100644 --- a/src/lang/ADempiere/es/operators.ts +++ b/src/lang/ADempiere/es/operators.ts @@ -29,8 +29,8 @@ const operators = { less_equal: 'Menor o igual que "<="', between: 'Dentro de ">-<"', not_between: 'Fuera de "<->"', - null: 'No tiene valor', - not_null: 'Tiene un valor', + null: 'No tiene valor "null"', + not_null: 'Tiene un valor "!null"', in: 'Incluye "()"', not_in: 'No incluye "!()"', onlyOperators: { @@ -46,8 +46,8 @@ const operators = { less_equal: '<=', between: '>-<', not_between: '<->', - null: 'No tiene valor', - not_null: 'Tiene un valor', + null: 'null', + not_null: '!null', in: '()', not_in: '!()' } diff --git a/src/store/modules/ADempiere/dictionary/report/actions.js b/src/store/modules/ADempiere/dictionary/report/actions.js index 958fc45933..a378b29f69 100644 --- a/src/store/modules/ADempiere/dictionary/report/actions.js +++ b/src/store/modules/ADempiere/dictionary/report/actions.js @@ -68,6 +68,7 @@ export default { */ getReportDefinitionFromServer({ dispatch, getters, rootGetters }, { id, + isLegacyReport = false, tableName }) { return new Promise((resolve, reject) => { @@ -82,6 +83,7 @@ export default { .then(async reportResponse => { const { uuid } = reportResponse const { processDefinition: reportDefinition } = generateReport({ + isLegacyReport, processToGenerate: reportResponse }) diff --git a/src/store/modules/ADempiere/dictionary/window/actions.js b/src/store/modules/ADempiere/dictionary/window/actions.js index 75f4804606..e92beca361 100644 --- a/src/store/modules/ADempiere/dictionary/window/actions.js +++ b/src/store/modules/ADempiere/dictionary/window/actions.js @@ -237,6 +237,7 @@ export default { return Promise.resolve(reportDefinition) } return dispatch('getReportDefinitionFromServer', { + isLegacyReport: true, id: process.id, tableName: table_name }).then(reportDefinitionResponse => { diff --git a/src/store/modules/ADempiere/panel/actions.js b/src/store/modules/ADempiere/panel/actions.js index bcbce95851..50aa9eb21f 100644 --- a/src/store/modules/ADempiere/panel/actions.js +++ b/src/store/modules/ADempiere/panel/actions.js @@ -511,7 +511,7 @@ const actions = { // TODO: Improve peformance get field with key-value const storedFieldDependentsList = currentFieldsList.filter(fieldItem => { if (!isEmptyValue(fieldId)) { - return fieldId === fieldItem.id + return fieldId === fieldItem.internal_id } return columnName === fieldItem.column_name || columnName === fieldItem.element_name @@ -519,6 +519,7 @@ const actions = { if (isEmptyValue(storedFieldDependentsList)) { console.warn('field not found in vuex store', { + fieldId, parentUuid, parent_column_name: field.column_name, parentContainerName: field.panelName, @@ -535,7 +536,8 @@ const actions = { field.columnName, storedFieldDependentsList.map(i => { return { - id: i.id, + id: i.internal_id, + uuid: i.uuid, columnName: i.column_name, name: i.name } diff --git a/src/utils/ADempiere/dictionary/process.js b/src/utils/ADempiere/dictionary/process.js index 7a18fa6750..4c6fb06c76 100644 --- a/src/utils/ADempiere/dictionary/process.js +++ b/src/utils/ADempiere/dictionary/process.js @@ -110,6 +110,7 @@ export function isReadOnlyField({ read_only_logic, isReadOnlyFromLogic }) { * @returns {object} */ export function generateProcess({ + isLegacyReport = false, processToGenerate, containerUuidAssociated = undefined }) { @@ -121,7 +122,8 @@ export function generateProcess({ } const additionalAttributes = { - isAdvancedQuery: processToGenerate.is_report, + // isAdvancedQuery: processToGenerate.is_report, + isLegacyReport: isLegacyReport || processToGenerate.is_jasper_report, containerUuid: processToGenerate.uuid, parentUuid: containerUuidAssociated, panelName: processToGenerate.name, diff --git a/src/utils/ADempiere/dictionaryUtils.js b/src/utils/ADempiere/dictionaryUtils.js index 63ee7b495b..c7ff984152 100644 --- a/src/utils/ADempiere/dictionaryUtils.js +++ b/src/utils/ADempiere/dictionaryUtils.js @@ -147,11 +147,9 @@ export function generateField({ let parentFieldsList = [] let parsedDefaultValue = fieldToGenerate.default_value let parsedDefaultValueTo = fieldToGenerate.default_value_to - let operator const isNumericField = componentReference.componentPath === 'FieldNumber' let isTranslatedField = fieldToGenerate.is_translated let isComparisonField = false // to list operators comparison - let operatorsList = [] if (moreAttributes.isAdvancedQuery) { // isNumericField = false // disable calculator popover isTranslatedField = false @@ -220,9 +218,11 @@ export function generateField({ elementColumnName: fieldToGenerate.element_name }) } + // set field operators list - if (moreAttributes.isAdvancedQuery || fieldToGenerate.is_query_criteria) { - operator = OPERATOR_EQUAL.operator + let operator = OPERATOR_EQUAL.operator // by default equal + let operatorsList = [] + if (moreAttributes.isAdvancedQuery || fieldToGenerate.is_query_criteria || moreAttributes.isLegacyReport === false) { isComparisonField = !['FieldBinary', 'FieldButton', 'FieldImage'].includes(componentReference.componentPath) if (isComparisonField) { const operatorsField = FIELD_OPERATORS_LIST.find(item => { @@ -268,6 +268,7 @@ export function generateField({ isSOTrxDictionary, referenceTableName, // displayed attributes + displayTypeName: componentReference.name, componentPath: componentReference.componentPath, isSupported: componentReference.isSupported, size: componentReference.size || DEFAULT_SIZE,