diff --git a/src/components/ADempiere/TabManager/index.vue b/src/components/ADempiere/TabManager/index.vue index 32579af368..1a179451bd 100644 --- a/src/components/ADempiere/TabManager/index.vue +++ b/src/components/ADempiere/TabManager/index.vue @@ -453,6 +453,9 @@ export default defineComponent({ }) // Current Record ID const currentRecordId = computed(() => { + if (!isEmptyValue(currentRoute) && !isEmptyValue(currentRoute.query)) { + return currentRoute.query.recordId + } if (currentTabMetadata.value) { return store.getters.getIdOfContainer({ containerUuid: currentTabMetadata.value.containerUuid, diff --git a/src/components/ADempiere/TabManager/tabChild.vue b/src/components/ADempiere/TabManager/tabChild.vue index 66252f4fc7..1a36273302 100644 --- a/src/components/ADempiere/TabManager/tabChild.vue +++ b/src/components/ADempiere/TabManager/tabChild.vue @@ -373,7 +373,7 @@ export default defineComponent({ }) } const contextAttributes = store.getters.getTabData({ - containerUuid + containerUuid: currentTabMetadata.value.uuid }).contextAttributes store.dispatch('getEntities', { parentUuid: props.parentUuid, diff --git a/src/store/modules/ADempiere/dictionary/browser/actions.js b/src/store/modules/ADempiere/dictionary/browser/actions.js index 9aa547332d..97d4e51beb 100644 --- a/src/store/modules/ADempiere/dictionary/browser/actions.js +++ b/src/store/modules/ADempiere/dictionary/browser/actions.js @@ -171,7 +171,18 @@ export default { const tabViewsVisited = rootGetters.visitedViews dispatch('tagsView/delView', currentRoute) // go to back page - const oldRouter = tabViewsVisited[tabViewsVisited.length - 1] + let oldRouterProcess + tabViewsVisited.filter(data => { + if (!isEmptyValue(data.query)) { + if (data.meta.action_uuid === currentRoute.query.parentUuid) { + oldRouterProcess = data + } + } + }) + let oldRouter = tabViewsVisited[tabViewsVisited.length - 1] + if (!isEmptyValue(oldRouterProcess)) { + oldRouter = oldRouterProcess + } router.push({ name: oldRouter.name, query: {