# HG changeset patch
# User Asier Lostalé <asier.lostale@openbravo.com>
# Date 1436947365 -7200
#      Wed Jul 15 10:02:45 2015 +0200
# Node ID 9474fce0c9a17540c342d1cb027e550d32829b1e
# Parent  62725e97926dee7ca71a31866ab7bbc0abf9ab36
fixed bug 30348: selecting language profile changes selected warehouse

  When items are changed in profile popup, warehouses are recaulated to match
  current settings and selected item is set to 1st option. In case of language
  change warehouse selection shouldn't be modified.

diff -r 62725e97926d -r 9474fce0c9a1 modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-user-profile-widget.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-user-profile-widget.js	Fri Jul 10 13:19:36 2015 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/navbar/ob-user-profile-widget.js	Wed Jul 15 10:02:45 2015 +0200
@@ -11,7 +11,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2014 Openbravo SLU
+ * All portions are Copyright (C) 2010-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -287,7 +287,7 @@
           }
         }
         this.setWarehouseValueMap();
-        if (item.name !== 'warehouse' && item.name !== 'default') {
+        if (item.name !== 'warehouse' && item.name !== 'default' && item.name !== 'language') {
           if (this.getItem('warehouse').getClientPickListData().length > 0) {
             this.getItem('warehouse').moveToFirstValue();
           }
