Skip to Content
मेन्यू
This question has been flagged
2 Replies
535 Views

Hi,

I’m encountering an intermittent issue in my Odoo 16 instance after restoring a database. Sometimes, everything works fine, but other times, I get the following error (same db, same code)


500: Internal Server Error


Error while render the template

TypeError: object of type 'NoneType' has no len()

Template: web.login

Path: /t/t/t

Node: <t t-set="form_small" t-value="True" t-if="len(providers) > 2"/>



My Questions:
  1. Has anyone else encountered this issue, especially after restoring a database?
  2. What could cause providers to be None in this context, and how do you ensure it’s always properly initialized?
  3. Are there specific database records or configurations I should double-check after restoring to prevent this issue?

Any suggestions would be greatly appreciated! Thank you in advance!

Avatar
Discard
Author Best Answer

Thank you so much for your help!

That completely resolved the issue

Avatar
Discard
Best Answer

Maybe it comes from a view.
You should look at the list of the views (yourdatabase.odoo.com/odoo/action-31?debug=1), search for the node  <t t-set="form_small" t-value="True" t-if="len(providers) > 2"/>
and check errors in this one. Or deactivate it if it's a customization?


Avatar
Discard