Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011334Openbravo ERP03. Procurement managementpublic2009-11-12 12:462010-01-20 23:26
networkb 
dbaz 
highminoralways
closedfixed 
5
2.50MP8 
2.50MP112.50MP11 
Core
No
0011334: Product selector is blocked when a search is done with any warehouse
In Purchase Invoice > Lines, when product selector is opened, shows all products. However, if client has no warehouses (nothing is shown in Warehouse combo at the selector), and try to do a search in the selector, it is blocked and nothing is search.

A Javascript error is shown in firebug:

Index or size is negative or greater than the allowed amount" code: "1
blurGrid()windowKeyboard.js (línea 89)
cursorFocus(img#buttonProduct.FieldButton_Icon blank.gif, "onmousedown")windowKeyboard.js (línea 13)
mouseDownLogic(mousedown clientX=462, clientY=260, img#buttonProduct.FieldButton_Icon blank.gif)
Create a new Client in General Setup > Client > Initial Client Setup.
Create a new Organization in General Setup > Enterprise > Initial Organization Setup (select it as Legal with accounting).
Go to General Setup > Enterprise > Organization and select "Allow period control" and select a calendar.
Run "Set as ready" process.
Go to Financial Management > Accounting > Setup > Fiscal calendar > Period.
Create a new record (IE 2009) and run "Create periods" process.
Go to Financial Management > Accounting > Transactions > Open/close periods.
Select the Organization, year, and Dec-09, and as action Period open. Save it and process it.
Create (it does not matter their values) a Business Partner Category, a Business Partner (including an Address), a Product Category, a Product, a Tax Category, a Purchase Price list, a Payment Term.
Create a Purchase Invoice (if some required information is not filled, just create it).
Go to its Lines, and open product Selector.
All product are shown (notice that no warehouse is set in the filter).
In name filter, set %a% and search.
A javascript error is shown and nothing is returned.
No tags attached.
related to backport 0012219 closed dbaz Product selector is blocked when a search is done with any warehouse 
Issue History
2009-11-12 12:46networkbNew Issue
2009-11-12 12:46networkbAssigned To => rafaroda
2009-11-13 10:54rafarodaNote Added: 0021799
2009-11-13 10:54rafarodaAssigned Torafaroda => shuehner
2009-11-13 10:54rafarodaPriorityimmediate => high
2009-11-13 10:54rafarodaStatusnew => scheduled
2010-01-13 09:11shuehnerAssigned Toshuehner => dbaz
2010-01-14 12:45dbazAssigned Todbaz => shuehner
2010-01-14 13:37dbazNote Added: 0023432
2010-01-15 11:59dbazAssigned Toshuehner => dbaz
2010-01-15 13:23hgbotCheckin
2010-01-15 13:23hgbotNote Added: 0023471
2010-01-15 13:23hgbotStatusscheduled => resolved
2010-01-15 13:23hgbotResolutionopen => fixed
2010-01-15 13:23hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/d92188a8af655d12388b0dca18a5271401e794d9 [^]
2010-01-18 10:20arunkumarNote Added: 0023494
2010-01-18 10:20arunkumarStatusresolved => closed
2010-01-18 10:20arunkumarFixed in Version => 2.50MP10
2010-01-18 12:31sureshbabuFixed in Version2.50MP10 => 2.50MP11
2010-01-19 00:00anonymoussf_bug_id0 => 2934604
2010-01-20 23:26hudsonbotCheckin
2010-01-20 23:26hudsonbotNote Added: 0023656
2010-02-10 21:58dbazRelationship addedrelated to 0012219

Notes
(0021799)
rafaroda   
2009-11-13 10:54   
An easier way of reproducing this issue is:
1) Log with regular Openbravo Admin role.
2) Go to Warehouse Management || Setup || Warehouse and Storage Bins || Warehouse
3) Dectivate both Main and Secondary Warehouses
4) Create a Purchase Invoice (if some required information is not filled, just create it).
5) Go to its Lines, and open product Selector.
6) All product are shown (notice that no warehouse is set in the filter).
7) Click on search.
A javascript error is shown: Index or size is negative or greater than the allowed amount" code: "1
(0023432)
dbaz   
2010-01-14 13:37   
Suggested change

In search.js inside the function setFilters()

Change this

      for(var i=0; i < selects.length; i++) {
          paramsData[count++] = new Array(selects[i].name, selects[i].options[selects[i].selectedIndex].value);
      }


with this

      for(var i=0; i < selects.length; i++) {
         if ((selects[i].selectedIndex) != -1) {
            paramsData[count++] = new Array(selects[i].name, selects[i].options[selects[i].selectedIndex].value);
         };
      }


Before push anything, please shuehner ensure that it doesn't break any other thing
(0023471)
hgbot   
2010-01-15 13:23   
Repository: erp/devel/pi
Changeset: d92188a8af655d12388b0dca18a5271401e794d9
Author: David Baz Fayos <david.baz <at> openbravo.com>
Date: Fri Jan 15 13:22:16 2010 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/d92188a8af655d12388b0dca18a5271401e794d9 [^]

Fixed issue 11334: Now no warehouse selector gets blocked

---
M src/org/openbravo/erpCommon/security/Login_F1.html
M web/js/searchs.js
M web/js/utils.js
---
(0023494)
arunkumar   
2010-01-18 10:20   
Product selector is not blocked now when a search is done with any warehouse.

Tested & Working fine.
(0023656)
hudsonbot   
2010-01-20 23:26   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/d92188a8af65 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/fa6621f85351 [^]
Tests: http://builds.openbravo.com/view/devel-int/ [^]
OBX: http://builds.openbravo.com/erp/obx/core/OpenbravoERP-2.50CI.15942.obx [^]