mirror of
https://github.com/frappe/books.git
synced 2024-11-08 14:50:56 +00:00
fix: required error on non required children
This commit is contained in:
parent
99af94f38e
commit
cb6aaaee31
@ -492,7 +492,17 @@ export default defineComponent({
|
||||
|
||||
const assigned = new Set(this.importer.assignedTemplateFields);
|
||||
return [...this.importer.templateFieldsMap.values()]
|
||||
.filter((f) => f.required && !assigned.has(f.fieldKey))
|
||||
.filter((f) => {
|
||||
if (assigned.has(f.fieldKey) || !f.required) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (f.parentSchemaChildField && !f.parentSchemaChildField.required) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return f.required;
|
||||
})
|
||||
.map((f) => getColumnLabel(f));
|
||||
},
|
||||
errorMessage(): string {
|
||||
@ -797,7 +807,9 @@ export default defineComponent({
|
||||
await showDialog({
|
||||
title,
|
||||
type: 'error',
|
||||
detail: this.t`Following cells have errors: ${cellErrors.join(', ')}.`,
|
||||
detail: this.t`Following cells have errors: ${cellErrors.join(
|
||||
', '
|
||||
)}.`,
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user