Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019968Openbravo ERPA. Platformpublic2012-03-06 17:442012-04-02 06:11
maite 
alostale 
urgentmajoralways
closedfixed 
5
 
3.0MP10 
Core
No
0019968: Products with different search key but same name are considered the same by Product Complete selector
Products with different search key but same name are considered the same by Product Complete selector
1. Go to Product window and create new record with search key= a1 and name=a
2. Go to Product window and create new record with search key= a and name=a
3. Go to Physical Inventory window and create record
4. Add inventory line, using Product selector filter by search key "a" and stocked='N'. Select product "a1", set storage bin and save.
5. Navigate using Product link and realize that you are carried to product a1 (which is OK)
6. Add inventory line, using Product selector filter by search key "a" and stocked='N'. Select product "a", set storage bin and save
7. Navigate using Product link and realize that you are carried to product a1 (which is NOT OK)

Also, you can verify that m_product_id in m_inventoryline is the same for both lines, while you have chosen different products in Product selector
No tags attached.
related to defect 00200683.0MP10 closed alostale Products with different search key but same name are considered the same 
Issue History
2012-03-06 17:44maiteNew Issue
2012-03-06 17:44maiteAssigned To => alostale
2012-03-06 17:44maiteModules => Core
2012-03-06 17:44maiteIssue Monitored: networkb
2012-03-06 17:47alostaleAssigned Toalostale => vmromanos
2012-03-09 09:53vmromanosAssigned Tovmromanos => alostale
2012-03-09 09:55alostalePriorityimmediate => urgent
2012-03-09 09:55alostaleStatusnew => scheduled
2012-03-09 09:55alostaleTarget Version => 3.0MP10
2012-03-09 11:38alostaleNote Added: 0046224
2012-03-12 16:32alostaleNote Added: 0046277
2012-03-12 16:35hgbotCheckin
2012-03-12 16:35hgbotNote Added: 0046278
2012-03-12 16:35hgbotStatusscheduled => resolved
2012-03-12 16:35hgbotResolutionopen => fixed
2012-03-12 16:35hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/765405ae06874583cdde5f731a27d3270f6a45aa [^]
2012-03-13 11:14maiteNote Added: 0046321
2012-03-13 11:14maiteStatusresolved => closed
2012-03-21 16:47alostaleRelationship addedrelated to 0020068
2012-03-23 11:59hgbotCheckin
2012-03-23 11:59hgbotNote Added: 0046672
2012-04-02 06:09hudsonbotCheckin
2012-04-02 06:09hudsonbotNote Added: 0047097
2012-04-02 06:11hudsonbotCheckin
2012-04-02 06:11hudsonbotNote Added: 0047208

Notes
(0046224)
alostale   
2012-03-09 11:38   
I can reproduce this issue when editing in form view, but not when in grid view.
(0046277)
alostale   
2012-03-12 16:32   
The problem is caused because the valueMap associated with the selector, which is populated on record selection is adding ID + displayed text. In the case of same displayed text, there are 2 values for the same text, making SmartClient not able to decide which one to select.

The solution is to remove duplicated entries when selecting a value in the selector.

The fix is riskless as it only affect this corner case.

Test plan: follow steps to reproduce in both grid and form views.
(0046278)
hgbot   
2012-03-12 16:35   
Repository: erp/devel/pi
Changeset: 765405ae06874583cdde5f731a27d3270f6a45aa
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Mar 12 16:34:22 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/765405ae06874583cdde5f731a27d3270f6a45aa [^]

fixed bug 19968: Selectors don't work having different items with same displayed value

  Removing duplicated entrie on item selection fixes the problem.

---
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0046321)
maite   
2012-03-13 11:14   
verified
(0046672)
hgbot   
2012-03-23 11:59   
Repository: erp/devel/pi
Changeset: a0e58b778cf63bb2eebffdcb00c11c008719d74e
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Mar 23 11:53:50 2012 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a0e58b778cf63bb2eebffdcb00c11c008719d74e [^]

fixed bug 20068: Selector doesn't work when 2 items have same identifier

  Reimplemented fix for bug 19968 in a more generic way: do not only clean the valueMap
  when selecting an item in the selector pop up but whenever value is set.

---
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0047097)
hudsonbot   
2012-04-02 06:09   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/7814864461ac [^]

Maturity status: Test
(0047208)
hudsonbot   
2012-04-02 06:11   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/7814864461ac [^]

Maturity status: Test