Merge lp:~openerp-dev/openobject-addons/trunk-bug-1099410-vba into lp:openobject-addons

Proposed by Vijaykumar Baladaniya (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1099410-vba
Merge into: lp:openobject-addons
Diff against target: 21 lines (+2/-2)
1 file modified
point_of_sale/static/src/js/models.js (+2/-2)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1099410-vba
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+143444@code.launchpad.net

Description of the change

Hello Sir,

    I have improve the code of points of sale for NaN appears when entering a discount in a session.

Thanks,
 vba

To post a comment you must log in.
8505. By Vijaykumar Baladaniya (OpenERP)

[MERGE] Merge with latest.

Unmerged revisions

8505. By Vijaykumar Baladaniya (OpenERP)

[MERGE] Merge with latest.

8504. By Vijaykumar Baladaniya (OpenERP)

[FIX]Check and set buffer value and quantity when entering a discount in a session.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'point_of_sale/static/src/js/models.js'
2--- point_of_sale/static/src/js/models.js 2013-01-11 14:42:19 +0000
3+++ point_of_sale/static/src/js/models.js 2013-01-18 06:37:23 +0000
4@@ -359,7 +359,7 @@
5 // product's unity of measure properties. Quantities greater than zero will not get
6 // rounded to zero
7 set_quantity: function(quantity){
8- if(_.isNaN(quantity)){
9+ if((_.isNaN(quantity)) || quantity == 0){
10 this.order.removeOrderline(this);
11 }else if(quantity !== undefined){
12 this.quantity = Math.max(0,quantity);
13@@ -803,7 +803,7 @@
14 this.updateTarget();
15 },
16 deleteLastChar: function() {
17- var tempNewBuffer = this.get('buffer').slice(0, -1);
18+ var tempNewBuffer = this.get('buffer').slice(0, -1) || "0";
19
20 if(!tempNewBuffer){
21 this.set({ buffer: "0" });

Subscribers

People subscribed via source and target branches

to all changes: