在Odoo 11中运行js文件时如何解决错误

时间:2019-06-02 09:13:54

标签: javascript odoo-11

我继承了js的功能以自定义POS odoo 11中的模板,但是当我运行时,它给了我一个错误“意外令牌”。 。我检查了所有代码,这真的没问题,我找不到丢失的内容或做错了什么。任何想法,请先谢谢

odoo.define('custom-button.custom_button', function (require) {
"use strict";
var core = require('web.core');
var screens = require('point_of_sale.screens');
var gui = require('point_of_sale.gui');
var models = require('point_of_sale.models')
var _super_orderline = models.Orderline.prototype;
models.Orderline = models.Orderline.extend({
    _super_orderline.get_display_price.call(this);
});
});

和我的XML文件调用此功能

<t t-extend="PosTicket">
        <t t-jquery=".receipt-phone" t-operation="after">
            <td>Draft Bill</td>
        </t>
        <t t-jquery=".pos-right-align" t-operation="replace">
            <t t-esc="orderline.get_display_price()"/>
        </t>
    </t>

我的错误:语法错误:意外的令牌。

0 个答案:

没有答案