Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0018122Openbravo ERPA. Platformpublic2011-07-28 18:482011-08-12 13:04
elopio 
alostale 
immediatemajoralways
closedfixed 
5
pi 
3.0MP2 
Core
No
0018122: When the filter returns only one record, toolbar buttons dissapear
When the grid filter returns only one record, that record is selected (highlighted in orange), but the toolbar buttons are not visible.

This is affecting the smoke test, because it assumes that after filtering, the first result will be selected.
Go to http://live.builds.openbravo.com/int-full-pgsql/ [^]
Login with Openbravo/openbravo
Go to Sales Management > Transactions > Sales order
Click the first record with document No. PR/1
(the tool bar buttons appear)
Filter by Document No. = PR/1 and Total Gross Amount = 59.13, so you get only one result.
(the tool bar buttons do not appear)
Always show the toolbar buttons when a record is selected.
Automated
png Openbravo - Sales Order - PR1 - 13-09-201... 2011-07-28 11-58-34.png (45,344) 2011-07-28 19:59
https://issues.openbravo.com/file_download.php?file_id=4400&type=bug
png
Issue History
2011-07-28 18:48elopioNew Issue
2011-07-28 18:48elopioAssigned To => alostale
2011-07-28 18:48elopioModules => Core
2011-07-28 18:49elopioTag Attached: Automated
2011-07-28 18:56elopioversion => pi
2011-07-28 19:58elopioIssue Monitored: elopio
2011-07-28 19:59elopioFile Added: Openbravo - Sales Order - PR1 - 13-09-201... 2011-07-28 11-58-34.png
2011-07-29 13:46alostaleNote Added: 0039550
2011-07-29 14:05hgbotCheckin
2011-07-29 14:05hgbotNote Added: 0039552
2011-07-29 14:05hgbotStatusnew => resolved
2011-07-29 14:05hgbotResolutionopen => fixed
2011-07-29 14:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/540b30e15ffacec03b4cf952df2220b1b637ba1b [^]
2011-08-01 14:22hudsonbotCheckin
2011-08-01 14:22hudsonbotNote Added: 0039742
2011-08-12 13:04jonalegriaesarteNote Added: 0040160
2011-08-12 13:04jonalegriaesarteStatusresolved => closed
2011-08-12 13:04jonalegriaesarteFixed in Version => 3.0MP2

Notes
(0039550)
alostale   
2011-07-29 13:46   
The problem appears when having a record selected, a filter criteria which result includes the selected record is applied.

If having selected a record a filter criteria that returns just one record different than the selected one, it works fine.

Technically, the problem is in OBToolbar.updateButtonState. In the case that fails this.view.viewGrid.getSelectedRecord() does not return any record, so it is treated as empty selection removing all the buttons.
(0039552)
hgbot   
2011-07-29 14:05   
Repository: erp/devel/pi
Changeset: 540b30e15ffacec03b4cf952df2220b1b637ba1b
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Fri Jul 29 14:05:01 2011 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/540b30e15ffacec03b4cf952df2220b1b637ba1b [^]

fixed bug 18122: When the filter returns selected record, toolbar buttons dissapear

  Do not update button state when data arrives. This action should only be performed in
  record selection/deselection which is already properly managed.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0039742)
hudsonbot   
2011-08-01 14:22   
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/cf2afed6e8ef [^]

Maturity status: Test
(0040160)
jonalegriaesarte   
2011-08-12 13:04   
Verified