Skip to content

Commit

Permalink
fix: SB Create From Invoice infinite loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt committed Jul 23, 2024
1 parent ae423c9 commit a6e548b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</el-form-item>
<el-form-item
v-if="fieldAttributes.is_range && !isEmptyValue(fieldAttributes.default_value_to)"
:label="$t('fieldOptions.info.defaultValue')"
:label="$t('fieldOptions.info.defaultValueTo')"
class="justify-text"
>
<pre>{{ fieldAttributes.default_value_to }}</pre>
Expand All @@ -99,7 +99,7 @@
:label="$t('fieldOptions.info.readOnlyLogic')"
class="justify-text"
>
<pre>{{ fieldAttributes.default_value }}</pre>
<pre>{{ fieldAttributes.read_only_logic }}</pre>
</el-form-item>

<el-form-item
Expand Down
11 changes: 9 additions & 2 deletions src/utils/ADempiere/dictionary/browser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ export const containerManager = {
newValueByServer = response.value
}

// TODO: Evaluate if add `is_query_criteria` to condition
if (inTable) {
return store.commit('setBrowserCell', {
containerUuid,
Expand Down Expand Up @@ -365,14 +366,20 @@ export const containerManager = {
})
}

if (field.isGetServerValue || (response.reason === 'Successful default value' && !isSameValues(value, newValueByServer))) {
// TODO: Evaluate if add `is_query_criteria` to condition
if ((field.isGetServerValue && !response.reason === 'In Request') ||
(response.reason === 'Successful default value' && !isSameValues(value, newValueByServer))) {
store.dispatch('browserActionPerformed', {
containerUuid,
field,
value: newValueByServer
})
}
return response
return {
...response,
value: newValueByServer,
displayedValue: newDisplayValueByServer
}
})
},
getLookupList({ parentUuid, containerUuid, contextColumnNames, uuid, id, searchValue, isAddBlankValue = false, blankValue }) {
Expand Down

0 comments on commit a6e548b

Please sign in to comment.