[16.11.24] Added ability to create custom themes

Thanks Tut - Customer code is not a custom field, it’s in the base Customers table. Was able to get it onto the invoices using view templates but can’t figure out how to add it in a custom theme.`

My mistake, @alasdair. I was thinking of it as a custom field, forgetting that it was built in. I don’t know how you would include that. But I can tell you the general philosophy behind any of the so-called codes in any tab is to help find the right entry quickly, rather than being meant for display. So they don’t generally appear on completed forms. I’m not saying you’re wrong to want it, just explaining why it isn’t there.

@alasdair, check the latest version (16.11.51). There is now {{ recipient.code }} variable you can use.

1 Like

Wow! Thank you so much Lubos.

Hi Lubos
Before I saw this thread I cut and pasted an old View Template into a New Theme- partially worked!
How can I restore the HMTL back to the original?



2 posts were split to a new topic: Bug in PDF generation of built-in theme

I assume you are asking how to go back to the HTML coding you copied from a built-in theme to initially create the basis for your custom theme. To do that, you must go back to the code from the built-in theme, copy it again, and repaste it as the code for the custom theme. You cannot in any way undo edits to custom themes, only replace them.

Hi Tut
That’s not what happened. The baseline code in the new theme was deleted
and the code from and existing template pasted into its place. This was not
successful, so I need to get back to a default theme.



OK, there was a change to how theme code can be accessed for editing that I misunderstood until today. so my previous answer was misleading.

The way to recover built-in code is to Switch Theme while viewing any form, such as a sales invoice. Choose a built-in theme. Then click Edit Theme and you will notice that you are editing a custom theme with a title like Custom theme #1. No need to copy and paste. Just give it a title you like and start editing.

Since the old view templates don’t work as custom themes, you might want to delete any custom themes you created with them before starting again. You can do that while in the edit mode.

I’m not very familiar with HTML code and have a minor issue with the standard theme for Sales Invoice. My company name (under the Company logo) is “too long” and gets “wrapped” over two lines;

I assume it would be fairly easy to change this by clicking “Edit Theme” and modify some parameter that would allow slightly more space to the “top right column” (where “Business Name” and “Business Address” are presented, including moving the vertical line slightly further left…

It must be some parameter(s) in the “thead” section of the code. Any help would be highly appreciated.

Did the trick.
Many thanks

@AnBe, you can increase width for business name on line 22.

It would say:

<td style="padding-left: 20px; width: 200px">

so you might change it to:

<td style="padding-left: 20px; width: 220px">
1 Like

Many Thanks! Works perfectly !

HI, Is there a way in themes to change the Business address for different locations of business??

Ys, @ckeoghan. You would need a different theme for each different address. Then replace the code referring to business.address with hard-coded address information. If you don’t have the coding skills, hire someone to do it for you.

1 Like

I have created a custom theme. But when I click on de PDF button, I am getting this error.

Wen I switsch back to one of the built in themes, the PDF works fine. Does anybody knows what I am doing wrong?


Hi Thanks for that, I figured it out, is it possible to add custom logo’s like with HTML themes, if so what are they coded in Base64??

I don’t know. I am not a programmer, and this is not a programming forum. It is for questions about accounting with Manager.

Yeah, you can inline images in base64.

See related: PDF creation fails when adding dynamic-web loaded elements - #4 by lubos

Html and CSS codes looks perfect. And the idea of custom theme is great. We can change the text color, font size, background and other Css facts.