Skip to Content
Menu
This question has been flagged
1 Reply
1538 Views

 Hi, how can I add cashier or user phone number below his name in the Pos receipt odoo 15 community edition 

Avatar
Discard
Best Answer

Hello,

First load employee's phone number while loading session using following javascript


odoo.define('pos_sale_custom.models', function (require) {
"use strict";

var models = require('point_of_sale.models');
models.load_fields("hr.employee", ["mobile_phone", "work_phone"]);
}

please check my comment(as odoo forum not support xml to post into answer) for qweb template to add employee's phone into receipt. 



Thanks & Regards,



CandidRoot Solutions Pvt. Ltd.

Mobile: (+91) 8849036209
Email: info@candidroot.com
Skype: live:candidroot
Web: https://www.candidroot.com
Address: 1229-1230, Iconic Shyamal, Near Shyamal Cross Road, Ahmedabad, Gujarat 380015
    

Avatar
Discard

<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension" owl="1">
<xpath expr="//div[hasclass('cashier')]" position="inside">
<t t-esc="receipt.mobile_phone"/> / <t t-esc="receipt.work_phone"/>
</xpath>
</templates>

this is not working