Skip to Content
Menu
This question has been flagged
2 Replies
1777 Views

We have been actively testing Odoo 17 on premise for some time. 

when we try preview of invoice after creation of an invoice the screen returns with Internal Server Error. If we activate the developer mode we get the details:

Error message:

Error while render the template
ValueError: Non-image binary fields can not be converted to HTML
Template: payment.form_logo
Path: /t/span
Node: 

The error occurred while rendering the template payment.form_logo and evaluating the following expression: 

We would appreciate it if someone can help resolve the issue.

Avatar
Discard
Best Answer

Hi,

The error message indicates that there's an issue with rendering the template related to the payment form logo. The error suggests that a non-image binary field is being treated as an image, which is causing the ValueError.

Please check with the below:

1. Check the Payment Form Template:

Go to Settings > Technical > User Interface > Views.

Search for the template form_logo.

Look for any code snippet that tries to access a binary field and use it as an image source.

Common mistakes include using a field meant for storing documents or other data types instead of an image field.

2. Verify the Invoice Data:

Open the invoice you're having trouble previewing.

Check the field associated with the payment.form_logo template

Ensure this field actually contains a valid image file. Uploading a non-image file or leaving the field empty can cause this error.

3)If you've made customizations to the payment.form_logo template or the invoice model, there might be a bug in your code.

Review your customizations to see if you're inadvertently referencing the wrong field or attempting to convert a non-image field.

4. Sometimes, browser cache can cause unexpected behavior. Clearing the browser cache might resolve the issue.


Hope it helps

Avatar
Discard

hii, I have error with my event page. 500:Internal Server Error. Template fallback

Error message:

Error while render the template
ValueError: Element '<xpath expr="//div[hasclass(&#39;o_wevent_index_topbar_filters&#39;)]">' cannot be located in parent view
Template: website_event.index
Path: /t/t/div/div[2]/div/t
Node: <t t-call="website_event.searched_tags"/>
The error occurred while rendering the template website_event.index and evaluating the following expression: <t t-call="website_event.searched_tags"/>

can you help me solve it, please. Thank you sm!

Author Best Answer

Dear Sir:

Thanks a lot for your answer. We will give it a try to see if the problem would be resolved.

Minda


Dear Sir:

I have just tried the solutions. They do not work:

1. I checked the view:

all are original codes. 

2. Tried clearing al the cache a few times

3. There is nothing I used in the invoices. All the draft invoices can be viewed with no problem until I confirm any to make it a real one.


Avatar
Discard
Related Posts Replies Views Activity
3
Apr 25
1003
3
Apr 25
1731
1
Mar 25
1060
2
Jan 25
1041
invoice Solved
1
Dec 24
1204