The pos module and added QR code to pos receipt

In this repo i inherit the pos module and added QR code to pos receipt

$ python odoo-bin scaffold  

1 – Create new js class and put this code that defin a function referenced to

odoo.define('point_of_sale.OrderReceipt', function (require) {
'use strict';

const PosComponent = require('point_of_sale.PosComponent');
const Registries = require('point_of_sale.Registries');

function myFunction(text) {
return text
}

class OrderReceipt extends PosComponent {

constructor() {
console.log("eslam faisal constructor")
super(...arguments);
this._receiptEnv = this.props.order.getOrderReceiptEnv();
}

willUpdateProps(nextProps) {
this._receiptEnv = nextProps.order.getOrderReceiptEnv();
}

get receipt() {
return this.receiptEnv.receipt;
}

clientName(receipt) {
return receipt.client.name
}

get orderlines() {
return this.receiptEnv.orderlines;
}

get paymentlines() {
return this.receiptEnv.paymentlines;
}

get isTaxIncluded() {
return Math.abs(this.receipt.subtotal - this.receipt.total_with_tax) <= 0.000001; } get receiptEnv() { return this._receiptEnv; } isSimple(line) { return ( line.discount === 0 &&    

 

To finish reading, please visit source site