Skip to Content
Menu
This question has been flagged
3 Replies
7588 Views

Hi,

I've created a custom report with Odoo Studio for my payslip. In the preview it's looks good with no encoding issue but once printed it's seems there is no encoding for special characters..

How to see the encoding ?

Avatar
Discard
Author Best Answer

I found my solution:

The problem
I overrided the base report with my custom report. But I just changed the t-call of the content which I think lead to a layout uncompatibility.

What I've done
To solve it, I just replace what's inside the t-name base with what's inside my custom t-name caller.

Thanks to Mr NAZIR tho, he's response is legit in some case.

Hope it's help,
RANDRIATAVY Mandresy

Avatar
Discard
Best Answer

I found this solution:

add after web.html_container


meta charset="UTF-8"  


Thanks

ps. Pasting HTML here seems to be impossible. 

Avatar
Discard
Best Answer

To check the encoding of a custom report in Odoo, you can follow these steps:

  1. Go to "Settings > Technical > Actions > Reports" and find the report that you want to check.

  2. Click on the report to open it in edit mode.

  3. Scroll down to the "Report Data" section and click the "Edit" button next to the "Template" field. This will open the report template in a text editor.

  4. Look for the encoding declaration at the top of the template file. It should be in the form of a comment, like this:

Copy code

This tells the report engine which character encoding to use when rendering the report. In this example, the encoding is set to "utf-8", which is a widely used encoding that supports most languages and special characters.

If the encoding declaration is missing or incorrect, you may see encoding issues when printing the report. To fix this, you can add or update the encoding declaration to match the correct character encoding of the report.

I hope this information is helpful. If you have any further questions or need additional guidance, please don't hesitate to ask.


Avatar
Discard
Author

Hi,

Thanks for your answer! But it's seems we don't have the same informations in our screens..

When I open the report there's no "Report Data" section not even a scrollbar, there's no "Edit" button next to the "Template Name" field.

Even tho, I found where you wants me to be.. But that's where I already tried to do it. There is no encoding and when I try to set one there a pop up saying: "Unicode strings with encoding declaration are not supported. Please use bytes input or XML fragments without declaration."

Related Posts Replies Views Activity
0
May 22
4613
0
Oct 24
1608
0
Aug 24
1450
0
Jan 24
1985
1
Nov 23
1664