Error when using custom print format for pos

Iam getting the error below when using a custom print format for POS. There isnt much change i have done on the code. I have only duplicated the standard POS print format but i get this error. Kindly assist

I think that you should use a single _, not __. But I’m not sure.

Remember the same code is working for standard POS format. My question is why is not working on the custom format?

Anyone to help me please

What does it have in the “Print Format Type” field? Probably it did not copied correctly.

It has JS

What’s the name of the print format? POS Invoice or Point Of Sale? How do you open it?

mainPOS is the name. What do you mean how to open it?

What’s the original name, the one that you duplicated, I’m trying to recreate the error. How do you access the print format, because I don’t see any of the “JS” print formats in the options.

The original is called POS Invoice. I created it by clicking on menu>duplicate. Then gave it a name. As shown

Try selecting “Jinja” in Print Format Type

I get this error when trying to print. I get this on print preview

I still get jinja2.exceptions.UndefinedError: ‘__’ is undefined

I got it working by duplicating and changing the Print Format Type to Jinja, do you modify something more?