[FIX] point_of_sale: show_popup('name','comment') should display the comment in the...
authorFrederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com>
Fri, 8 Aug 2014 11:48:33 +0000 (13:48 +0200)
committerFrederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com>
Fri, 8 Aug 2014 11:48:33 +0000 (13:48 +0200)
addons/point_of_sale/static/src/js/screens.js

index 169940e..97e822b 100644 (file)
@@ -351,9 +351,14 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
 
             $('body').append('<audio src="/point_of_sale/static/src/sounds/error.wav" autoplay="true"></audio>');
 
-            if( text && (text.message || text.comment) ){
-                this.$('.message').text(text.message);
-                this.$('.comment').text(text.comment);
+            if( text ) {
+                if ( text.message || text.comment ) {
+                    this.$('.message').text(text.message);
+                    this.$('.comment').text(text.comment);
+                } else {
+                    this.$('.message').text(_t('Error'));
+                    this.$('.comment').html(text);
+                }
             }
 
             this.pos.barcode_reader.save_callbacks();