[FIX] Fixed POS delete_payment_line triggering and processing.
authorvta vta@openerp.com <>
Fri, 9 Nov 2012 12:48:54 +0000 (13:48 +0100)
committervta vta@openerp.com <>
Fri, 9 Nov 2012 12:48:54 +0000 (13:48 +0100)
bzr revid: vta@openerp.com-20121109124854-qray80vx77vlli4r

addons/point_of_sale/static/src/js/screens.js
addons/point_of_sale/static/src/js/widgets.js

index c823350..0b8ab70 100644 (file)
@@ -941,8 +941,10 @@ function openerp_pos_screens(instance, module){ //module is instance.point_of_sa
             var self = this;
             var x = new module.PaymentlineWidget(null, {
                     payment_line: newPaymentLine
-                });
-            x.on('delete_payment_line', self, self.deleteLine);
+            });
+            x.on('delete_payment_line', self, function(r) {
+                self.deleteLine(r);
+            });
             x.appendTo(this.$('#paymentlines'));
         },
         renderElement: function() {
index fe86c9d..b555357 100644 (file)
@@ -315,7 +315,7 @@ function openerp_pos_widgets(instance, module){ //module is instance.point_of_sa
             this._super();
             this.$('input').keyup(_.bind(this.changeAmount, this));
             this.$('.delete-payment-line').click(function() {
-                self.trigger('delete_payment_line');
+                self.trigger('delete_payment_line', self);
             });
         },
     });