跳至内容
菜单
此问题已终结
2 回复
553 查看

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!

形象
丢弃
编写者 最佳答案

Thank you so much for your help!

That completely resolved the issue

形象
丢弃
最佳答案

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?


形象
丢弃