odoo - 条码不显示
问题描述
<template id="report_label">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="o">
<div class="page">
<div class="row">
<div class="example_class">
<t t-esc="o.name" />
<t t-esc="o.type" />
<p>Size: <span t-esc="o.calculate_size()"/></p>
<p>Color: <span t-esc ="o.calculate_color()" /></p>
<p>Price: </p>
<tr><td colspan="2"><img t-att-src="'/report/barcode/Code128/%s' % 'test-0001'" style="width:100%;height:25px"/> </td></tr>
</div>
</div>
</div>
</t>
</t>
</template>
如果我在http://localhost:8069/report/barcode/Code128/test-0001中进行测试,那么它会返回一个条形码。
并且还安装了reportlab。
结果相同,但边界更小
<img t-if="o.barcode" t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' %('Code128',o.barcode,250,50)"/>
解决方案
是设置>系统参数需要更改
Key report.url
Value http://0.0.0.0:8069
推荐阅读
- r - R 函数的行为与逐行输入的代码不同
- java - SSLEngine 在第二个循环中握手库存
- r - 如何在 dcast 表之后绘制图表?
- ios - IphoneX 安全区在使用 PageViewController 时导致隐藏内容
- python-3.x - 为什么这个简单的 Python 3 XPath Web 抓取脚本不起作用?
- javascript - 使用多个html元素js / jquery获取var中元素的属性
- reactjs - this.state 值在组件方法中不可访问
- apache-kafka - Apache Pulsar 与 Apache RocketMQ
- c - 使用 getchar 读取用户输入并创建二维矩阵
- css - 垂直和水平行居中引导面板