Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/320.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何在qweb中呈现字符串?_Python_Openerp_Odoo 9_Qweb - Fatal编程技术网

Python 如何在qweb中呈现字符串?

Python 如何在qweb中呈现字符串?,python,openerp,odoo-9,qweb,Python,Openerp,Odoo 9,Qweb,我正在尝试在qweb模板的元素上插入和删除值: 我的代码: <img t-att-src="'/report/barcode/Code128/%s' %(str(order.sequence_number).zfill(18))" style="width:250px;height:50px;"/> <img t-att-src="'/report/barcode/Code128/*mycode*'"

我正在尝试在qweb模板的元素上插入和删除值:

我的代码:

<img t-att-src="'/report/barcode/Code128/%s' %(str(order.sequence_number).zfill(18))" 
                        style="width:250px;height:50px;"/>
<img t-att-src="'/report/barcode/Code128/*mycode*'" 
                        style="width:250px;height:50px;"/>

我正在尝试扩展pos收据以打印条形码。。。。 如果我这样做,它会工作,但我需要用格式化的序列代码替换mycode: