In point of sale, How can I add a new screen widget in point of sale in which I can trigger it by a button
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
4379
Lượt xem
Code like below:
var HistoryButton = pos_screens.ActionButtonWidget.extend({
template: 'HistoryButton',
button_click: function () {
if (this.pos.get_client()) {
this.gui.show_screen('OrdersWidget');
}
},
});
pos_screens.define_action_button({
'name': 'History',
'widget': HistoryButton,
'condition': function(){
return this.pos;
},
});
var OrdersWidget = pos_screens.ScreenWidget.extend({
template: 'OrdersWidget',
init: function(parent, options){
},
show: function(){
var self = this;
this._super();
this.renderElement();
this.details_visible = false;
this.$('.back').click(function(){
self.gui.show_screen('products');
});
},
hide: function () {
this._super();
this.new_client = null;
},
close: function(){
this._super();
},
});
gui.define_screen({name:'OrdersWidget', widget: OrdersWidget});
//----- xml file---------//
<t t-name="OrdersWidget">
<div class="clientlist-screen screen">
<div class="screen-content">
//------screen view----------//
</div>
</div>
</t>
<t t-name="HistoryButton">
<div class='control-button orders-list'>
<i class="fa fa-history" aria-hidden="true"></i>
History
</div>
</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 | |
---|---|---|---|---|
|
1
thg 11 19
|
2719 | ||
|
1
thg 8 19
|
2872 | ||
|
1
thg 6 18
|
3000 | ||
|
2
thg 2 22
|
10655 | ||
|
4
thg 10 17
|
7396 |