diff -r 1f2ec0947662 -r 64e43c64eb21 web/org.openbravo.retail.posterminal/js/pointofsale/view/editline.js
--- a/web/org.openbravo.retail.posterminal/js/pointofsale/view/editline.js	Mon Feb 04 12:44:32 2013 +0100
+++ b/web/org.openbravo.retail.posterminal/js/pointofsale/view/editline.js	Mon Feb 04 12:49:26 2013 +0100
@@ -60,64 +60,63 @@
       classes: 'row-fluid',
       showing: false,
       components: [{
-        classes: 'span7',
+        classes: 'span12',
         components: [{
-          style: 'padding: 5px; width:100%',
-          components: [{
-            classes: 'row-fluid',
-            components: [{
-              classes: 'span12',
-              components: [{
-                kind: 'OB.UI.SmallButton',
-                content: OB.I18N.getLabel('OBPOS_ButtonDelete'),
-                classes: 'btnlink-orange',
-                tap: function () {
-                  this.owner.doDeleteLine({
-                    line: this.owner.line
-                  });
-                },
-                init: function (model) {
-                  this.model = model;
-                  this.model.get('order').on('change:isPaid', function (newValue) {
-                    if (newValue) {
-                      if (newValue.get('isPaid') === true) {
-                        this.setShowing(false);
-                        return;
-                      }
-                    }
-                    this.setShowing(true);
-                  }, this);
+          kind: 'OB.UI.SmallButton',
+          content: OB.I18N.getLabel('OBPOS_ButtonDelete'),
+          classes: 'btnlink-orange',
+          tap: function () {
+            this.owner.doDeleteLine({
+              line: this.owner.line
+            });
+          },
+          init: function (model) {
+            this.model = model;
+            this.model.get('order').on('change:isPaid', function (newValue) {
+              if (newValue) {
+                if (newValue.get('isPaid') === true) {
+                  this.setShowing(false);
+                  return;
                 }
-              }, {
-                kind: 'OB.UI.SmallButton',
-                content: OB.I18N.getLabel('OBPOS_LblDescription'),
-                classes: 'btnlink-orange',
-                tap: function () {
-                  this.owner.doEditLine({
-                    line: this.owner.line
-                  });
-                },
-                init: function (model) {
-                  this.model = model;
-                  this.model.get('order').on('change:isPaid', function (newValue) {
-                    if (newValue) {
-                      if (newValue.get('isPaid') === true) {
-                        this.setShowing(false);
-                        return;
-                      }
-                    }
-                    this.setShowing(true);
-                  }, this);
+              }
+              this.setShowing(true);
+            }, this);
+          }
+        }, {
+          kind: 'OB.UI.SmallButton',
+          content: OB.I18N.getLabel('OBPOS_LblDescription'),
+          classes: 'btnlink-orange',
+          tap: function () {
+            this.owner.doEditLine({
+              line: this.owner.line
+            });
+          },
+          init: function (model) {
+            this.model = model;
+            this.model.get('order').on('change:isPaid', function (newValue) {
+              if (newValue) {
+                if (newValue.get('isPaid') === true) {
+                  this.setShowing(false);
+                  return;
                 }
-              }]
-            }]
-          }]
+              }
+              this.setShowing(true);
+            }, this);
+          }
         }, {
+          kind: 'OB.OBPOSPointOfSale.UI.EditLine.OpenStockButton',
+          name: 'checkStockButton',
+          showing: false
+        }]
+      }, {
+        classes: 'span12',
+        components: [{
+          classes: 'span7',
           kind: 'Scroller',
           maxHeight: '120px',
           thumb: true,
           horizontal: 'hidden',
-          style: 'padding: 0px 0px 0px 25px; width:100%; line-height: 140%;',
+          style: 'padding: 16px 0px 10px 25px; line-height: 140%;',
           components: [{
             classes: 'row-fluid',
             style: 'clear: both;',
@@ -184,28 +183,28 @@
               }]
             }]
           }]
+        }, {
+          classes: 'span4',
+          sytle: 'text-align: right',
+          components: [{
+            style: 'padding: 2px 10px 10px 10px;',
+            components: [{
+              name: 'editlineimage',
+              kind: 'OB.UI.Thumbnail',
+              classes: 'image-wrap image-editline',
+              width: '128px',
+              height: '128px'
+            }]
+          }]
         }]
       }, {
-        classes: 'span5',
-        sytle: 'text-align: right',
+        name: 'msgaction',
+        style: 'padding: 10px;',
         components: [{
-          style: 'padding: 60px 10px 20px 10px;',
-          components: [{
-            name: 'editlineimage',
-            kind: 'OB.UI.Thumbnail',
-            classes: 'image-wrap image-editline',
-            width: '128px',
-            height: '128px'
-          }]
+          name: 'txtaction',
+          style: 'float:left;'
         }]
       }]
-    }, {
-      name: 'msgaction',
-      style: 'padding: 10px;',
-      components: [{
-        name: 'txtaction',
-        style: 'float:left;'
-      }]
     }]
   }],
   selectedListener: function (line) {
@@ -216,6 +215,11 @@
     if (this.line) {
       this.line.on('change', this.render, this);
     }
+    if (this.line && this.line.get('product').get('showstock') && !this.line.get('product').get('ispack') && OB.POS.modelterminal.get('connectedToERP')) {
+      this.$.checkStockButton.show();
+    } else {
+      this.$.checkStockButton.hide();
+    }
     this.render();
   },
   receiptChanged: function () {
@@ -254,4 +258,24 @@
       this.$.editlinegross.setContent('');
     }
   }
+});
+
+enyo.kind({
+  kind: 'OB.UI.SmallButton',
+  name: 'OB.OBPOSPointOfSale.UI.EditLine.OpenStockButton',
+  events: {
+    onShowLeftSubWindow: ''
+  },
+  content: 'Stock Check',
+  classes: 'btnlink-orange',
+  tap: function () {
+    var product = this.owner.line.get('product');
+    //show always or just when the product has been set to show stock screen?
+    if (product.get('showstock') && !product.get('ispack') && OB.POS.modelterminal.get('connectedToERP')) {
+      params = {};
+      params.leftSubWindow = OB.OBPOSPointOfSale.UICustomization.stockLeftSubWindow;
+      params.product = product;
+      this.doShowLeftSubWindow(params);
+    }
+  }
 });
\ No newline at end of file
