My JS code:
odoo.define('pos_custom.pos_custom', 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);
});
});
My XML code to call this function and show data
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-extend="PosTicket">
<t t-jquery=".pos-right-align" t-operation="replace">
<t t-esc="orderline.get_display_price()"/>
</t>
</t>
</templates>
My t-esc will call to oderline.get_display_price function that is defined in JS code. But when i run POS, ít gave me an error like this: "Uncaught SyntaxError: Unexpected token ."
How can i do that? and what i did wrong? thanks a lot and i am very grateful to hear your solution