Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0021533 | Openbravo ERP | A. Platform | public | 2012-09-03 13:08 | 2012-09-26 17:18 |
|
Reporter | mtaal | |
Assigned To | AugustoMauch | |
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0MP16 | |
Merge Request Status | |
Review Assigned To | mtaal |
OBNetwork customer | No |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0021533: ShowIf computation incorrect for showIf values which are a boolean |
Description | In the ob-main-view.js the showIf property is replaced with a function, see this line:
fld.showIf = function (item, value, form, values) {
then the original value of showIf is stored in the originalShowIf property. And it is then called in the function above:
originalShowIfValue = this.originalShowIf(item, value, form, currentValues, context);
But this fails if the original show If value is not a function but a string (for example: "false").
For fields initially not displayed in the grid the showIf has the value "false", see this snippet in the view field ftl:
<#if !field.showInitiallyInGrid>
, showIf: '${field.showInitiallyInGrid?string}'
</#if>
and this is not a function, so treating it as a function call in the ob-view-main.js is wrong. The function definition in ob-view-main.js should be changed to take into account string values. |
Steps To Reproduce | See for example the net list price in the sales order line tab. |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | related to | defect | 0021530 | | closed | shankarb | Grid editing: columns with displaylogic do not work correctly |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2012-09-03 13:08 | mtaal | New Issue | |
2012-09-03 13:08 | mtaal | Assigned To | => marvintm |
2012-09-03 13:08 | mtaal | Modules | => Core |
2012-09-03 13:08 | mtaal | OBNetwork customer | => No |
2012-09-03 13:10 | mtaal | Relationship added | related to 0021530 |
2012-09-05 17:22 | AugustoMauch | Assigned To | marvintm => AugustoMauch |
2012-09-07 13:58 | AugustoMauch | Closed by | => mtaal |
2012-09-07 13:59 | hgbot | Checkin | |
2012-09-07 13:59 | hgbot | Note Added: 0051932 | |
2012-09-07 13:59 | hgbot | Status | new => resolved |
2012-09-07 13:59 | hgbot | Resolution | open => fixed |
2012-09-07 13:59 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/6b2ba000fb7a772d810be7fb7ace8d17a64fff18 [^] |
2012-09-07 14:41 | hgbot | Checkin | |
2012-09-07 14:41 | hgbot | Note Added: 0051942 | |
2012-09-14 11:39 | mtaal | Note Added: 0052123 | |
2012-09-14 11:39 | mtaal | Status | resolved => closed |
2012-09-14 11:39 | mtaal | Fixed in Version | => 3.0MP16 |
2012-09-26 17:18 | hudsonbot | Checkin | |
2012-09-26 17:18 | hudsonbot | Note Added: 0052713 | |
2012-09-26 17:18 | hudsonbot | Checkin | |
2012-09-26 17:18 | hudsonbot | Note Added: 0052717 | |
Notes |
|
(0051932)
|
hgbot
|
2012-09-07 13:59
|
|
Repository: erp/devel/pi
Changeset: 6b2ba000fb7a772d810be7fb7ace8d17a64fff18
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Sep 07 13:57:57 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6b2ba000fb7a772d810be7fb7ace8d17a64fff18 [^]
Fixes issue 21533: Showif computation now supports boolean values
Now, before trying to execute the originalShowIf property, it is checked if it is set to 'true' or 'false'. In that case, it is assigned to originalShowIfValue the corresponding boolean. If not, it is executed as a function as usual.
---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
|
|
|
(0051942)
|
hgbot
|
2012-09-07 14:41
|
|
Repository: erp/devel/pi
Changeset: c60e1cf42d3b190810fdddfe4dfc2c2d2d53def4
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Sep 07 14:40:32 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/c60e1cf42d3b190810fdddfe4dfc2c2d2d53def4 [^]
Related to issue 21533: Fix refactored to detect if input is a function
The code has been refactored, so that if the input is a function is executes it, while if it is not a function, it tries to decode using isc.JSON.decode.
---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-view.js
---
|
|
|
(0052123)
|
mtaal
|
2012-09-14 11:39
|
|
|
|
|
|
|
|
|