2024-10-01 09:19:48 发布
网友
我想修改RFQ报告,我想从Qweb报告中调用一个python方法
下面是一些示例代码
<span t-field ="o.my_custom_fuction()" />
我的python函数是
但它给我的错误 qwebException:求值时出现“my_custom_function()”。在
有什么线索吗?在
The t-field directive can only be used when performing field access (a.b) on a "smart" record (result of the browse method).
要调用该函数,您需要使用t-esc(接受一个表达式,对其求值并打印内容):
t-esc
<span t-esc ="o.my_custom_fuction()" />
我用了Odoo QWEB reference
要调用该函数,您需要使用
t-esc
(接受一个表达式,对其求值并打印内容):我用了Odoo QWEB reference
相关问题 更多 >
编程相关推荐