diff --git a/src/importer.ts b/src/importer.ts index 701943df..2f78126e 100644 --- a/src/importer.ts +++ b/src/importer.ts @@ -587,12 +587,7 @@ function getTemplateFields( } for (const field of schema.fields) { - if ( - field.computed || - field.meta || - field.hidden || - (field.readOnly && !field.required) - ) { + if (shouldSkipField(field, schema)) { continue; } @@ -650,3 +645,23 @@ export function getColumnLabel(field: TemplateField): string { return field.label; } + +function shouldSkipField(field: Field, schema: Schema): boolean { + if (field.computed || field.meta) { + return true; + } + + if (schema.naming === 'numberSeries' && field.fieldname === 'name') { + return false; + } + + if (field.hidden) { + return true; + } + + if (field.readOnly && !field.required) { + return true; + } + + return false; +}