diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 956adbd6613..8451491b69b 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -402,6 +402,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa module.SelectionPopupWidget = module.PopUpWidget.extend({ template: 'SelectionPopupWidget', show: function(options){ + options = options || {}; var self = this; this._super(); @@ -430,6 +431,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa module.TextInputPopupWidget = module.PopUpWidget.extend({ template: 'TextInputPopupWidget', show: function(options){ + options = options || {}; var self = this; this._super(); @@ -437,7 +439,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa this.comment = options.comment || ''; this.value = options.value || ''; this.renderElement(); - this.$('input').focus(); + this.$('input,textarea').focus(); this.$('.button.cancel').click(function(){ self.pos_widget.screen_selector.close_popup(); @@ -448,7 +450,7 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa this.$('.button.confirm').click(function(){ self.pos_widget.screen_selector.close_popup(); - var value = self.$('input').val(); + var value = self.$('input,textarea').val(); if( options.confirm ){ options.confirm.call(self,value); } @@ -456,6 +458,10 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa }, }); + module.TextAreaPopupWidget = module.TextInputPopupWidget.extend({ + template: 'TextAreaPopupWidget', + }); + module.ErrorNoClientPopupWidget = module.ErrorPopupWidget.extend({ template: 'ErrorNoClientPopupWidget', }); diff --git a/addons/point_of_sale/static/src/js/widgets.js b/addons/point_of_sale/static/src/js/widgets.js index 39e3a8ad4a4..897ea5204c3 100644 --- a/addons/point_of_sale/static/src/js/widgets.js +++ b/addons/point_of_sale/static/src/js/widgets.js @@ -1014,6 +1014,9 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa this.textinput_popup = new module.TextInputPopupWidget(this,{}); this.textinput_popup.appendTo(this.$el); + this.textarea_popup = new module.TextAreaPopupWidget(this,{}); + this.textarea_popup.appendTo(this.$el); + this.unsent_orders_popup = new module.UnsentOrdersPopupWidget(this,{}); this.unsent_orders_popup.appendTo(this.$el); @@ -1084,6 +1087,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa 'error-barcode': this.error_barcode_popup, 'error-traceback': this.error_traceback_popup, 'textinput': this.textinput_popup, + 'textarea': this.textarea_popup, 'confirm': this.confirm_popup, 'fullscreen': this.fullscreen_popup, 'selection': this.selection_popup, diff --git a/addons/point_of_sale/static/src/xml/pos.xml b/addons/point_of_sale/static/src/xml/pos.xml index 4012547066b..fbc6cb5028e 100644 --- a/addons/point_of_sale/static/src/xml/pos.xml +++ b/addons/point_of_sale/static/src/xml/pos.xml @@ -935,6 +935,23 @@ + + + +