[英]internal server error in customized receipt
I am working on odoo version 15;我正在开发 odoo 版本 15; trying to customize receipt in POS module;
尝试在 POS 模块中自定义收据; but I have an internal server error (500).. My code as following:
但我有一个内部服务器错误(500)..我的代码如下:
manifest .py清单.py
...
'assets': {
'web.assets_qweb': [
'static/src/xml/OrderReceipt.xml',
# 'views/OrderReceipt.xml',
],
...
OrderReceipt.xml OrderReceipt.xml
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-extend="OrderReceipt">
<t t-jquery=".pos-receipt .pos-receipt-contact" t-operation='append'>
<t t-if='receipt.client'>
<div style="font-weight:bold;">Customer:<t t-esc='receipt.client'/></div>
</t>
<p>Success !</p>
</t>
</t>
</templates>
Try this and also add the error from logs in the questions add point_of_sale in manifest.py file in depends column And also, check if the client field exists试试这个,并在问题中添加来自日志的错误,在依赖列的 manifest.py 文件中添加 point_of_sale 并且检查客户端字段是否存在
<t t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
<xpath expr="//div[hasclass('pos-receipt-contact')]" position="after">
<t t-if='receipt.client'>
<div style="font-weight:bold;">Customer:<t t-esc='receipt.client'/></div>
</t>
<p>Success !</p>
</xpath>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.