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ờ
1
Trả lời
4993
Lượt xem
You can overwrite some things in ReceiptScreenWidget.
1. The get_receipt_render_env function of the ReceiptScreenWidget. This function is used here:
render_receipt: function() {
this.$('.pos-receipt-container').html(QWeb.render('PosTicket', this.get_receipt_render_env()));
},
var CustomReceiptScreenWidget = ReceiptScreenWidget.include({
rand_number_for_ticket: function(){
return 7;
},
get_receipt_render_env: function() {
var order = this.pos.get_order();
var number = 4;//use js to find rand number
return {
widget: this,
pos: this.pos,
order: order,
receipt: order.export_for_printing(),
orderlines: order.get_orderlines(),
paymentlines: order.get_paymentlines(),
random_number: this.rand_number_for_ticket(),
};
},
});
2. Overwrite the xml template.
<t t-extend="ReceiptScreenWidget">
<!--place with jquery the rand number-->
<t t-jquery="some_selector" t-operation="after">//or another operation
<span t-esc="random_number"/>
</t>
</t>
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 | |
---|---|---|---|---|
|
3
thg 10 23
|
8805 | ||
|
1
thg 9 23
|
3324 | ||
|
1
thg 5 23
|
2266 | ||
|
2
thg 4 23
|
2825 | ||
Inherit Element form kanban View
Đã xử lý
|
|
1
thg 3 23
|
2214 |