What's happening with these transient models' IDs?

无人久伴 提交于 2019-11-29 16:10:19

Take a look into onchange() line 4971 and following. Odoo is creating a new record in cache/memory and will later, after the onchange is done, update the own cache with the provided data.

If you really need the ID or other fields use <record>._origin.<field>.

EDIT: Don't use api.one decorator on onchange methods. They are triggered on singleton records anyway.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!