diff --git a/src/components/ADempiere/Field/FieldLocation/fieldsList.js b/src/components/ADempiere/Field/FieldLocation/fieldsList.js
index 9540a4369b8..52448cfff4f 100644
--- a/src/components/ADempiere/Field/FieldLocation/fieldsList.js
+++ b/src/components/ADempiere/Field/FieldLocation/fieldsList.js
@@ -29,7 +29,8 @@ export default [
defaultValue: '@#C_Country_ID@',
size: 24,
sequenceFields: 'CO',
- index: 2
+ index: 2,
+ isMandatory: true
}
},
{
@@ -40,7 +41,8 @@ export default [
isCustomField: true,
size: 24,
sequenceFields: 'R',
- index: 3
+ index: 3,
+ isMandatory: true
}
},
{
@@ -51,7 +53,8 @@ export default [
isCustomField: true,
size: 24,
sequenceFields: 'C',
- index: 4
+ index: 4,
+ isMandatory: true
}
},
{
diff --git a/src/components/ADempiere/Field/FieldLocation/locationAddressForm.vue b/src/components/ADempiere/Field/FieldLocation/locationAddressForm.vue
index aaa89b0d64b..b220de3675a 100644
--- a/src/components/ADempiere/Field/FieldLocation/locationAddressForm.vue
+++ b/src/components/ADempiere/Field/FieldLocation/locationAddressForm.vue
@@ -237,15 +237,15 @@ export default {
// })
},
sendValuesToServer() {
- const fieldsNotReady = this.$store.getters.getFieldsListEmptyMandatory({
+ const emptyMandatoryFields = this.$store.getters.getFieldsListEmptyMandatory({
containerUuid: this.containerUuid,
- isValidate: true
+ formatReturn: 'name'
})
- if (!this.isEmptyValue(fieldsNotReady)) {
+ if (!this.isEmptyValue(emptyMandatoryFields)) {
showNotification({
type: 'warning',
title: this.$t('notifications.emptyValues'),
- name: '' + fieldsNotReady + '. ',
+ name: '' + emptyMandatoryFields + '. ',
message: this.$t('notifications.fieldMandatory'),
isRedirect: false
})
diff --git a/src/components/ADempiere/Form/VPOS/BusinessPartner/businessPartnerCreate.vue b/src/components/ADempiere/Form/VPOS/BusinessPartner/businessPartnerCreate.vue
index b3064fef687..52103f66f62 100644
--- a/src/components/ADempiere/Form/VPOS/BusinessPartner/businessPartnerCreate.vue
+++ b/src/components/ADempiere/Form/VPOS/BusinessPartner/businessPartnerCreate.vue
@@ -22,7 +22,6 @@
type="primary"
class="custom-button-create-bp"
icon="el-icon-check"
- :loading="isLoadingRecord"
@click="createBusinessParter"
/>
{}
}
},
- computed: {
- emptyMandatoryFields() {
- const field = this.$store.getters.getFieldsListEmptyMandatory({
- containerUuid: this.containerUuid
- })
- return field
- }
- },
watch: {
showField(value) {
if (value) {
@@ -105,16 +96,17 @@ export default {
containerUuid: this.containerUuid,
format: 'object'
})
- if (this.isEmptyValue(values)) {
- return
- }
const name2 = this.$store.getters.getValueOfField({
containerUuid: this.containerUuid,
columnName: 'Name2'
})
values = this.convertValuesToSend(values)
values.name2 = name2
- if (this.isEmptyValue(this.emptyMandatoryFields)) {
+ const emptyMandatoryFields = this.$store.getters.getFieldsListEmptyMandatory({
+ containerUuid: this.containerUuid,
+ formatReturn: 'name'
+ })
+ if (this.isEmptyValue(emptyMandatoryFields)) {
this.isLoadingRecord = true
requestCreateBusinessPartner(values)
.then(responseBPartner => {
@@ -132,7 +124,7 @@ export default {
this.showsPopovers.isShowCreate = true
this.$message({
type: 'warning',
- message: error.message,
+ message: error.message + 'Name',
duration: 1500,
showClose: true
})
@@ -144,7 +136,7 @@ export default {
} else {
this.$message({
type: 'warn',
- message: this.$t('notifications.mandatoryFieldMissing') + this.emptyMandatoryFields,
+ message: this.$t('notifications.mandatoryFieldMissing') + emptyMandatoryFields,
duration: 1500,
showClose: true
})
diff --git a/src/components/ADempiere/Form/VPOS/BusinessPartner/fieldsListCreate.js b/src/components/ADempiere/Form/VPOS/BusinessPartner/fieldsListCreate.js
index ec94ef86e37..3811e1ac3f8 100644
--- a/src/components/ADempiere/Form/VPOS/BusinessPartner/fieldsListCreate.js
+++ b/src/components/ADempiere/Form/VPOS/BusinessPartner/fieldsListCreate.js
@@ -8,7 +8,8 @@ export default [
tabindex: '0',
overwriteDefinition: {
isCustomField: true,
- size: 24
+ size: 24,
+ isMandatory: true
}
},
{
@@ -19,7 +20,8 @@ export default [
isFromDictionary: true,
overwriteDefinition: {
isCustomField: true,
- size: 24
+ size: 24,
+ isMandatory: true
}
},
{
@@ -66,7 +68,8 @@ export default [
componentPath: 'FieldLocation',
handleActionPerformed: false,
isSendParentValues: true,
- popoverPlacement: 'top'
+ popoverPlacement: 'top',
+ isMandatory: true
}
}
]