odoo-018 Many2one 不能使用widget=“selection“

  • Many2one 如果想要实现selection的效果,使用属性去掉创建编辑选项。options="{'no_create_edit': True}"

  • Many2one 对象的视图使用 widget="selection"后,
    报错如下:

Uncaught TypeError: Cannot read properties of undefined (reading '0')
http://127.0.0.1:8071/web/content/320-8f28158/web.assets_backend.js:1252
追溯:
TypeError: Cannot read properties of undefined (reading '0')
    at Class._renderEdit (http://127.0.0.1:8071/web/content/320-8f28158/web.assets_backend.js:1252:1204)
    at Class._render (http://127.0.0.1:8071/web/content/320-8f28158/web.assets_backend.js:1052:36)
    at http://127.0.0.1:8071/web/content/320-8f28158/web.assets_backend.js:1049:1521
    at http://127.0.0.1:8071/web/content/266-59c77e2/web.assets_common.js:802:681
    at fire (http://127.0.0.1:8071/web/content/266-59c77e2/web.assets_common.js:796:299)
    at Object.add [as done] (http://127.0.0.1:8071/web/content/266-59c77e2/web.assets_common.js:797:467)
    at Array. (http://127.0.0.1:8071/web/content/266-59c77e2/web.assets_common.js:802:649)
    at Function.each (http://127.0.0.1:8071/web/content/266-59c77e2/web.assets_common.js:625:767)
    at Object. (http://127.0.0.1:8071/web/content/266-59c77e2/web.assets_common.js:802:560)
    at Function.Deferred (http://127.0.0.1:8071/web/content/266-59c77e2/web.assets_common.js:803:194)

你可能感兴趣的:(Odoo,总结,python)