我有描述字段:
test_field = fields.Char(string='Test')
在 XML 格式中,它看起来像这样:
<field name="test_field" widget="html" />
问题是如何将带有某些值的表格行从代码插入到此字段?
我尝试将 html 标记编写为这样的文本:
但它包装为段落并显示为普通文本。
您的字段定义应如下所示:
test_field = fields.Html(string='Test')