Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- إدارة علاقات العملاء
- e-Commerce
- المحاسبة
- المخزون
- PoS
- Project
- MRP
لقد تم الإبلاغ عن هذا السؤال
1
الرد
4957
أدوات العرض
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>
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيلالمنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
---|---|---|---|---|
|
3
أكتوبر 23
|
8761 | ||
|
1
سبتمبر 23
|
3313 | ||
|
1
مايو 23
|
2252 | ||
|
2
أبريل 23
|
2808 | ||
Inherit Element form kanban View
تم الحل
|
|
1
مارس 23
|
2184 |