Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0026011Openbravo ERPA. Platformpublic2014-03-15 14:482014-03-24 12:10
iperdomo 
AugustoMauch 
normalmajoralways
closedfixed 
30Oracle Linux 3.8.13-26.1.1.el6ue
3.0MP29.1 
3.0PR14Q23.0PR14Q2 
shankarb
Apple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
Core
No
0026011: Selector Out Field don't work in grid mode
Selector Out Fields works fine when editing a record in form view, but it fails on grid view.
* Install the attached module and template
* The module changes the Dependency tab in Module window
* Pick a module
* Create a new dependency in form view, select a module and see that the field `Last Version` gets populated with the module version - OK
* Delete the dependency
* Repeat the process in Grid view, when selecting a module using the selector, the process of setting the `Last Version` value fails - KO
Attached you'll find a proposed patch
NOTE: this needs to be tested setting a value for a List|Table references
No tags attached.
zip selector-outfields.zip (6,132) 2014-03-15 14:48
https://issues.openbravo.com/file_download.php?file_id=6749&type=bug
diff selector-outfield.diff (709) 2014-03-15 14:49
https://issues.openbravo.com/file_download.php?file_id=6750&type=bug
Issue History
2014-03-15 14:48iperdomoNew Issue
2014-03-15 14:48iperdomoAssigned To => AugustoMauch
2014-03-15 14:48iperdomoFile Added: selector-outfields.zip
2014-03-15 14:48iperdomoWeb browser => Apple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
2014-03-15 14:48iperdomoModules => Core
2014-03-15 14:48iperdomoTriggers an Emergency Pack => No
2014-03-15 14:49iperdomoFile Added: selector-outfield.diff
2014-03-17 08:21alostaleWeb browserApple Safari, Google Chrome, Internet Explorer, Mozilla Firefox => Apple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
2014-03-17 08:21alostaleTarget Version => PR14Q2
2014-03-17 09:25jonalegriaesarteWeb browserApple Safari, Google Chrome, Internet Explorer, Mozilla Firefox => Apple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
2014-03-17 09:25jonalegriaesarteResolution time => 1395961200
2014-03-17 09:25jonalegriaesarteWeb browserApple Safari, Google Chrome, Internet Explorer, Mozilla Firefox => Apple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
2014-03-18 11:56shankarbAssigned ToAugustoMauch => shankarb
2014-03-20 10:11AugustoMauchAssigned Toshankarb => AugustoMauch
2014-03-20 11:16AugustoMauchIssue Monitored: shankarb
2014-03-20 11:16AugustoMauchReview Assigned To => shankarb
2014-03-20 11:16AugustoMauchWeb browserApple Safari, Google Chrome, Internet Explorer, Mozilla Firefox => Apple Safari, Google Chrome, Internet Explorer, Mozilla Firefox
2014-03-20 11:21hgbotCheckin
2014-03-20 11:21hgbotNote Added: 0065299
2014-03-20 11:21hgbotStatusnew => resolved
2014-03-20 11:21hgbotResolutionopen => fixed
2014-03-20 11:21hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a4bac660abf106f290fc270dc7a0f077dc02a96a [^]
2014-03-20 11:22AugustoMauchNote Added: 0065300
2014-03-21 07:34hudsonbotCheckin
2014-03-21 07:34hudsonbotNote Added: 0065325
2014-03-21 07:53iperdomoNote Added: 0065329
2014-03-21 08:14AugustoMauchNote Added: 0065330
2014-03-24 12:10shankarbNote Added: 0065390
2014-03-24 12:10shankarbStatusresolved => closed
2014-03-24 12:10shankarbFixed in Version => PR14Q2

Notes
(0065299)
hgbot   
2014-03-20 11:21   
Repository: erp/devel/pi
Changeset: a4bac660abf106f290fc270dc7a0f077dc02a96a
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Mar 20 11:21:11 2014 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a4bac660abf106f290fc270dc7a0f077dc02a96a [^]

Fixes issue 26011: Selector Out Field don't work in grid mode

The problem was that the fields[j].setValue function was being used to apply store the value of the out fields, and that function is not available when the sel
ector is used in the grid view. To solve this, grid.setEditValue is used if the fields[j].setValue function is not available.

---
M modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js
---
(0065300)
AugustoMauch   
2014-03-20 11:22   
It has been tested with:
- Text out fields
- Foreign key out fields
(0065325)
hudsonbot   
2014-03-21 07:34   
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/264e48f53209 [^]
Maturity status: Test
(0065329)
iperdomo   
2014-03-21 07:53   
@AugustoMuach

On using guard `&&` operator

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_Operators [^]
(0065330)
AugustoMauch   
2014-03-21 08:14   
@iperdomo

Thanks Ivan. It is not that I did not understand it, the problem was that jslint did not like it:

jslint:modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js:719:34:The '&&' subexpression should be wrapped in parens.
jslint:modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js:719:111:Expected an assignment or function call and instead saw an expression.
(0065390)
shankarb   
2014-03-24 12:10   
Code reviewed and verified in pi changeset b24d8a94df0e.