页面加载时如何调用函数oo-14



当页面加载时,我试图调用一个函数,我对XML进行了一些更改,但没有工作,例如:

<field name="code">action = env['res.config.settings'].set_values()</field>

我没有找到任何可行的方法odoo 14,谁有什么建议?

我会尝试自定义视图或自定义小部件。当它们启动时,它们可以调用服务器函数。

开始。

如何创建新的小部件:https://www.odoo.com/documentation/15.0/developer/reference/frontend/javascript_cheatsheet.html creating-a-new-field-widget

或扩展wiev:

https://www.odoo.com/documentation/15.0/developer/reference/frontend/javascript_cheatsheet.html customizing-an-existing-view

最新更新