Can't view Sales Invoice after custom theme is deleted

Hello guys. I am facing a weird problem while viewing Sales Invoice:


The Print or PDF option also shows a blank page

However, the invoice contents can be viewed if clicked on Edit:

The top ledger:

Is anyone facing similar problem?

I cannot duplicate this. What edition and version are you using?

Have you recently deleted a custom theme? I find if I had an invoice in a custom theme and then delete the theme, the invoice page shows up blank, i.e. it didn’t revert to the default theme.
image

You may need to create a new custom theme so that the theme choice checkbox/dropdown on the invoice page reappears.

@pau, you have identified the problem. I can replicate it. I am moving this topic to bugs and editing the subject.

Cloud
22.7.31

I didn’t delete any custom theme nor made any changes.

But the other modules are working fine except Sales Invoice. Does the custom theme works for all the other modules like Sales Order, Delivery Note too?

Yes, I think so. A custom theme works with anything which is sent out to a customer or supplier. But I think I found a bug which looks the same as your problem, but doesn’t have the same cause.

Are you using a custom theme? Is the checkbox still visible on the invoice edit screen?

Any theme, default or custom, works on all transaction and statement types. For different kinds of transactions, the variables (which are fixed in themes) are filled with different content. For example, recipient is populated with the customer’s name for a sales invoice, but with the employee’s name for a payslip.

I am skeptical of this statement, @raJ, because I know from previous posts by you that you have used custom themes. It is very easy to imagine that somewhere in your form defaults or in a prior entry you used a custom theme that no longer exists. That theme may have been referenced without your being aware of it through cloning or copying. There are many ways this could have happened. You need to look at the actual transaction Edit screens. You may discover you have something like this:

Screen Shot 2022-07-31 at 4.16.55 PM

But, if you have gotten rid of all custom themes, that checkbox will no longer appear, so you will have to access to the entry. (I call this orphaned content, because you cannot see it to discover its parentage.) So, as @pau suggested, you may first need to create an actual custom theme just so you can delete the orphaned content. Then you can delete the theme you created.

Fixed in the latest version (22.8.6)