Prefix subject-field mail template

I’ve created a invoice template in html where the invoice number has a year and costumer id as prefix like this.

{{ issue_date | date:“yyyy” }}{{ customer.code }}{{ reference }}

When i put this code in the subject field of the mail template it only shows the reference (i have tried this with and without the spaces). How can i solve this?

Try this for the year

{{ issue_date | date: “%Y” }}

Thanks, but the code doesn’t work in the email template.

{{ issue_date | date:“yyyy” }}{{ customer.code }}{{ reference }} this works on the invoice but not in the subject field of the email template.

This is from an old topic. But since I haven’t read anything about new variables for email, I think still valid.

@Hans Thanks.

@lubos Is it possible to add or are there more variables i can use for the email template subject line.