AttributeError: 'NoneType' object has no attribute 'fieldtype': Print format error

Trying to configure a custom print format to print our invoice. But keeps on “AttributeError: ‘NoneType’ object has no attribute 'fieldtype” Below is the full error message

App Versions

{
	"erpnext": "14.0.0-dev",
	"frappe": "14.0.0-dev"
}

Route

print/Print Format/New_Invoice

Trackeback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 69, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 54, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 45, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 83, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1551, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/www/printview.py", line 294, in get_html_and_style
    html = get_rendered_template(
  File "apps/frappe/frappe/www/printview.py", line 207, in get_rendered_template
    html = template.render(args, filters={"len": len})
  File "env/lib/python3.8/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "env/lib/python3.8/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "apps/frappe/frappe/templates/print_formats/standard.html", line 32, in top-level template code
    {{ render_field(df, doc, no_of_cols) }}
  File "env/lib/python3.8/site-packages/jinja2/sandbox.py", line 393, in call
    return __context.call(__obj, *args, **kwargs)
  File "env/lib/python3.8/site-packages/jinja2/runtime.py", line 777, in _invoke
    rv = self._func(*arguments)
  File "apps/frappe/frappe/templates/print_formats/standard_macros.html", line 5, in template
    <div>{{ frappe.render_template(df.options, {"doc": doc}) or "" }}</div>
  File "env/lib/python3.8/site-packages/jinja2/sandbox.py", line 393, in call
    return __context.call(__obj, *args, **kwargs)
  File "apps/frappe/frappe/utils/jinja.py", line 85, in render_template
    return get_jenv().from_string(template).render(context)
  File "env/lib/python3.8/site-packages/jinja2/environment.py", line 1301, in render
    self.environment.handle_exception()
  File "env/lib/python3.8/site-packages/jinja2/environment.py", line 936, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "<template>", line 21, in top-level template code
  File "env/lib/python3.8/site-packages/jinja2/sandbox.py", line 393, in call
    return __context.call(__obj, *args, **kwargs)
  File "apps/frappe/frappe/model/base_document.py", line 1090, in get_formatted
    df.fieldtype == "Currency"
AttributeError: 'NoneType' object has no attribute 'fieldtype'


what could be the cause of the error?