Skip to content

Commit

Permalink
Fix: Context Attributes (Lookup List Transcoding) (adempiere#1594)
Browse files Browse the repository at this point in the history
* Fix: Context Attributes (Lookup List Transcoding)

* minimal changes

* remove change
  • Loading branch information
elsiosanchez authored Nov 2, 2023
1 parent 408a5d7 commit cb724af
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/api/ADempiere/userInterface/browserList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ export function requestBrowserSearch({
id,
filters,
pageToken,
contextAttributes,
pageSize = RECORD_ROWS_BY_LIST
}) {
return request({
url: `/user-interface/browser-items/${id}`,
method: 'get',
params: {
filters,
context_attributes: contextAttributes,
page_token: pageToken,
page_size: pageSize
}
Expand Down
5 changes: 3 additions & 2 deletions src/store/modules/ADempiere/browserManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ const browserControl = {
// get context values
const contextAttributesList = getContextAttributes({
containerUuid,
contextColumnNames
contextColumnNames,
format: 'object'
})

// const isWithoutValues = contextAttributesList.find(attribute => isEmptyValue(attribute.value))
Expand Down Expand Up @@ -219,7 +220,7 @@ const browserControl = {

requestBrowserSearch({
id: containerUuid,
contextAttributesList,
contextAttributes: JSON.stringify(contextAttributesList),
filters: '[' + filters + ']',
nextPageToken: pageToken,
pageSize
Expand Down
10 changes: 8 additions & 2 deletions src/store/modules/ADempiere/lookupManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ const lookupManager = {
parentUuid,
containerUuid,
contextColumnNames,
isBooleanToString: true
isBooleanToString: true,
format: 'object'
})

const clientId = rootGetters.getSessionContextClientId
Expand All @@ -173,9 +174,14 @@ const lookupManager = {

const contextKey = generateContextKey(contextAttributesList)
key += contextKey
let contextAttributes

if (!isEmptyValue(contextAttributesList)) {
contextAttributes = JSON.stringify(contextAttributesList)
}

requestLookupList({
contextAttributesList,
contextAttributesList: contextAttributes,
browseFieldId,
processParameterId,
fieldId,
Expand Down

0 comments on commit cb724af

Please sign in to comment.