Can I generate my cashier name in pos bill receipt to make an end of shift report in POS,
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
Hi,
You can use the below code to bring the cashier's name in pos receipt,
In Js:-
odoo.define('pos_barcode.pos_qr', function (require) {
"use strict";
var { Order } = require('point_of_sale.models');
var Registries = require('point_of_sale.Registries');
var precio_unitario = 0
const PosCashierOrder = (Order) => class PosCashierOrder extends Order {
export_for_printing() {
var receipt = super.export_for_printing(...arguments);
receipt.cashier= this.env.pos.get_cashier();
return receipt;
}
}
Registries.Model.extend(Order, PosCashierOrder);
});
In xml:-
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="OrderReceipt" t-inherit="point_of_sale.
t-inherit-mode="extension" owl="1">
<xpath expr="//div[hasclass('after-
<div style="text-align: center;">
<p> <t t-out=receipt.cashier/></p>
</div>
</xpath>
</t>
</templates>
Regards
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Dec 24
|
1678 |