From fde8d64a40b33cea0ed16e8f3dbbcfdbb3339d11 Mon Sep 17 00:00:00 2001 From: Leonel Matos Date: Wed, 29 Jan 2020 10:14:36 -0400 Subject: [PATCH] bugfix with criteria filter (#273) --- src/components/ADempiere/Panel/index.vue | 18 ++++++++++++++++-- src/store/modules/ADempiere/panel.js | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/components/ADempiere/Panel/index.vue b/src/components/ADempiere/Panel/index.vue index 86a782f1..c711d6ec 100644 --- a/src/components/ADempiere/Panel/index.vue +++ b/src/components/ADempiere/Panel/index.vue @@ -487,13 +487,27 @@ export default { .then(response => { if (response.length && !parameters.isNewRecord) { this.dataRecords = response[0] - if (this.$route.query.action === 'create-new') { + if (this.$route.query.action === 'criteria') { this.$router.push({ name: this.$route.name, query: { - ...this.$route.query + ...this.$route.query, + action: this.dataRecordsq + }, + params: { + tableName: this.metadata.tableName, + recordId: this.dataRecords[`${this.metadata.tableName}_ID`] } }) + this.$store.dispatch('notifyPanelChange', { + parentUuid: this.parentUuid, + containerUuid: this.containerUuid, + newValues: this.dataRecords, + isSendToServer: false, + isSendCallout: false, + fieldList: this.fieldList, + panelType: this.panelType + }) } else if (this.$route.query.action === 'reference') { this.$router.push({ name: this.$route.name, diff --git a/src/store/modules/ADempiere/panel.js b/src/store/modules/ADempiere/panel.js index af91e9d6..59a22528 100644 --- a/src/store/modules/ADempiere/panel.js +++ b/src/store/modules/ADempiere/panel.js @@ -647,7 +647,7 @@ const panel = { } } else { if (panelType === 'table' || isAdvancedQuery) { - if (field.isShowedFromUser) { + if (field.isShowedFromUser && field.oldValue !== field.value) { // change action to advanced query on field value is changed in this panel if (router.currentRoute.query.action !== 'advancedQuery') { router.push({