跳至內容
選單
此問題已被標幟
2 回覆
559 瀏覽次數

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?


頭像
捨棄