[FIX] point_of_sale: show_popup('name','comment') should display the comment in the popup

This commit is contained in:
Frederic van der Essen 2014-08-08 13:48:33 +02:00
parent ac212e2758
commit 7f82caa1a4
1 changed files with 8 additions and 3 deletions

View 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();