[IMP] pos_loyalty: always show the reward before assignation, unless there is only...
authorFrederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com>
Wed, 1 Oct 2014 10:28:17 +0000 (12:28 +0200)
committerFrédéric van der Essen <fvdessen@gmail.com>
Tue, 25 Nov 2014 18:16:25 +0000 (19:16 +0100)
addons/pos_loyalty/static/src/js/loyalty.js

index da8b8e0..5673231 100644 (file)
@@ -264,7 +264,7 @@ openerp.pos_loyalty = function(instance){
                     'comment': 'There are no rewards available for this customer as part of the loyalty program',
                 });
                 return;
-            } else if (rewards.length === 1) {
+            } else if (rewards.length === 1 && this.pos.loyalty.rewards.length === 1) {
                 order.apply_reward(rewards[0]);
                 return;
             } else {