Remove "None" from print

Here’s the code:

Here’s the print preview with the standard print format:

Here’s the print with the custom print format:

Here’s the print format with your code:

Here’s the print view for the format with your code:(shows a blank screen)

Print view with standard format is the same, none shows up

There is no “None”. So what is the issue?

Go through this tutorial to get an idea on how to create custom print formats: [Tutorial] Creating print formats

Here’s the print view for the format with your code:(shows a blank screen)

Looks like the print is working fine, the reason for the blank print you see is because doc.firma is None

A blank screen?

Um is that fixable? Ive found a temporary fix, instead of leaving empty labels just add an empty space but thats kinda tedious, I have over 23 documents with the same issue and over 200+ fields each

@Vesper_Solutions

Here is the code you need

{% if doc.“field_name” %}{{doc.field_name}}{% else %}“-”{% endif %}

{% else %} “Leave it blank if you want” {% endif %}

Try

{{ doc.get_formatted("firma") }}

{{ field_name or ’ ’ }}