【发布时间】:2017-03-22 08:45:52
【问题描述】:
能否请你们帮我指出正确的方法来在重复的 qweb 报告上显示当前用户(直接打印报告的人,而不是创建报告的人)?此外,我的目的是在二维码表单下设置名称。这是我的代码:
<div class="col-xs-3">
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('QR', o.name, 80, 80)" style="width:80px;height:80px;"/>
<img t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('QR', o.user.name, 80, 80)" style="width:80px;height:80px;"/>
</div>
然后我得到这个错误:
QWebException: "'sale.order' object has no attribute 'user'" while evaluating
"'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('QR', o.user.name, 80, 80)"
【问题讨论】: