I want to display the session_id created from the backend to the PoS client in the receipt section when validating the order
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Thank you, this works, but if I add the inherit field in pos.order and want to add it to the PoS receipt, is that possible?
Hello, Mangandaralam Sakti
- To remove the 'Daily Sale' button when cashier close session, please follow below steps.
1) Create a Module, after that create a folder structure of staic folder as shown in below image.
2) Register the pos assets in __manifest__.py file.
3) In 'order_receipt.xml' file add below code snippet.
// Code In Comment
4) In 'models.js' file add below code snippet.
// Code In Comment
5) Do not forget to replace 'your_module_name' to Actual module name.
6) Below is the screenshot of expected Output :
I Hope this information proves helpful to you. Thanks & Regards, Email: odoo@aktivsoftware.com Skype: kalpeshmaheshwari |
3) In 'order_receipt.xml' file add below code snippet.
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="your_module_name.OrderReceipt" t-inherit="point_of_sale.OrderReceipt" t-inherit-mode="extension">
<xpath expr="//div[hasclass('paymentlines')]" position="inside">
<t t-if="props.data.session">
<h4>Session Name : <t t-esc="props.data.session"/></h4>
</t>
</xpath>
</t>
</templates>
4) In 'models.js' file add below code snippet.
/* @odoo-module */
import { Order } from "@point_of_sale/app/store/models";
import { usePos } from "@point_of_sale/app/store/pos_hook";
import { patch } from "@web/core/utils/patch";
patch(Order.prototype, {
export_for_printing() {
const result = super.export_for_printing(...arguments);
result.session = this.pos.pos_session.name;
return result;
},
});
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 1 25
|
1372 | ||
|
1
thg 5 25
|
880 | ||
|
1
thg 5 25
|
1094 | ||
|
0
thg 1 25
|
921 | ||
|
1
thg 12 24
|
1393 |