Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试用逗号分隔一个一个打印一个 one2many 字段值,
<div class="col-xs-3"> <strong>Attendees:</strong> <p t-esc="o.matp.empname"/> </div>
我怎样才能做到这一点并且还想打印用逗号分隔的值?
试试这个代码:
<t t-foreach='o.matp' t-as='value'> <t t-esc="value.empname"/>, </t>
您可以在您的 qweb 报告解析器中定义一个函数,并从报告中调用该函数,该函数将一个逗号分隔的值列表返回给您的报告。