Can I edit the customer statements form?

Basically, when I generate the customer statements report, the name of the customer needs to have a prefix which if not written is a disrespect in my language. modifying the names of each customer to include the prefix is not suitable for us.

I want any of these two options:

  1. make a custom field and make that field show right before the customer name in the forms.
  2. generate a static prefix ("Mr. ") before the customer name

(Where) can I do this?

Thanks for reading

Ok I found it.
I added a custom field to the customers with name “prefix” then in
(Settings → Obsolete Features → Themes)
made a new theme and in line 12 where {{ recipient.name }} exists, added this before it

{% for field in custom_fields %}
  {% if field.label == "prefix" %}
    {{ field.text }}
  {% endif %}
{% endfor %}

which I made with ChatGPT, he claims that the code cant be shorter.

This works in Customer Statements report, is there a way to make the Sales Invoice use this theme?

You can use it in Sales Invoice by selecting it in Sales invoice form, but Custom Themes are obsolete and not recommended.

Oh, I need to select it in every invoice :frowning:
Thanks.

But the alternative wouldn’t solve my problem, I need the theme

You can use “Form Defaults” and select the theme there. Then you wont have to select on every invoice.

Yes but that works for future invoices. not older ones.

You can batch update older invoices.

1 Like