Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0021049Openbravo ERPA. Platformpublic2012-07-12 16:022012-07-30 12:40
jecharri 
AugustoMauch 
highmajoralways
closedfixed 
5
pi 
3.0MP143.0MP14 
Google Chrome
Core
No
0021049: Callouts have different behaviour if you push enter or Tab key
Callouts have different behaviour if you push enter or Tab key

If you need to execute js code or you want to show a message in a callout, it is imposible if you push in enter and not in Tab key

In function processFICReturn:

-when you push Tab key the code "if (calloutMessages && calloutMessages.length > 0 && calloutMessages[calloutMessages.length - 1].text !== '') {
                                    this.view.messageBar.setMessage(isc.OBMessageBar[calloutMessages[calloutMessages.length - 1].severity], null, calloutMessages[calloutMessages.length - 1].text);
                                }"
OR
"if (data.jscode) {
                                    length = data.jscode.length;
                                    for (i = 0; i < length; i++) {
                                        eval(data.jscode[i]);
                                    }
                                }"
is executed but when you push "Enter" or "Save" this isf is "True":
if (this.grid && gridEditInformation && this.grid.getEditRow() !== gridEditInformation.editRow) {
So return is executed and not the neccesary code
Change SL_Order_amt.java by attaced code.
As it can see in lines 353 I have added next code:
msg = msg + "Muestra el mensaje";
// resultado.append("new Array('JSEXECUTE', 'isc.warn(\"" + msg + "\")')");
resultado.append("new Array('MESSAGE', '" + msg + ")')");

Now is configured to show a message when the callout is executed.
Now do the next executions:
-go to sales order and create a header and one line.
-in grid view edit the line and change the qty--> you will see the message.
-it happens the same in form view
-but now change the qty and push enter or save--> you will not see the message.

It happens the same with js Code.

No tags attached.
? SL_Order_Amt.java (18,572) 2012-07-13 08:47
https://issues.openbravo.com/file_download.php?file_id=5420&type=bug
Issue History
2012-07-12 16:02jecharriNew Issue
2012-07-12 16:02jecharriAssigned To => alostale
2012-07-12 16:02jecharriWeb browser => Google Chrome
2012-07-12 16:02jecharriModules => Core
2012-07-12 16:02jecharriResolution time => 1344808800
2012-07-12 16:07jecharriWeb browserGoogle Chrome => Google Chrome
2012-07-12 16:07jecharriSummaryCallouts have different behaviour in you push enter or Tab key => Callouts have different behaviour if you push enter or Tab key
2012-07-12 16:07jecharriDescription Updatedbug_revision_view_page.php?rev_id=3628#r3628
2012-07-13 08:47jecharriFile Added: SL_Order_Amt.java
2012-07-16 18:47RafaelCruzIssue Monitored: RafaelCruz
2012-07-20 12:59AugustoMauchAssigned Toalostale => AugustoMauch
2012-07-20 12:59AugustoMauchWeb browserGoogle Chrome => Google Chrome
2012-07-20 12:59AugustoMauchNote Added: 0050781
2012-07-20 12:59AugustoMauchDescription Updatedbug_revision_view_page.php?rev_id=3644#r3644
2012-07-20 12:59AugustoMauchProposed Solution updated
2012-07-20 13:08AugustoMauchNote Added: 0050782
2012-07-26 11:49hgbotCheckin
2012-07-26 11:49hgbotNote Added: 0050900
2012-07-26 11:49hgbotStatusnew => resolved
2012-07-26 11:49hgbotResolutionopen => fixed
2012-07-26 11:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/dae17862ff355c9563dfc87b62e3b5c219f8dfbd [^]
2012-07-26 12:11hgbotCheckin
2012-07-26 12:11hgbotNote Added: 0050902
2012-07-27 02:18hudsonbotCheckin
2012-07-27 02:18hudsonbotNote Added: 0050918
2012-07-27 02:18hudsonbotCheckin
2012-07-27 02:18hudsonbotNote Added: 0050919
2012-07-30 12:40guilleaerNote Added: 0050982
2012-07-30 12:40guilleaerStatusresolved => closed
2012-07-30 12:40guilleaerFixed in Version => 3.0MP14

Notes
(0050781)
AugustoMauch   
2012-07-20 12:59   
Move Proposed Solution text to the Description section.
(0050782)
AugustoMauch   
2012-07-20 13:08   
There is at least one reason why not to show a callout message when the record has been saved and the focus is in another one: The callout message may refer to the record in which the callout was executed, and not make sense for the currently selected record.
(0050900)
hgbot   
2012-07-26 11:49   
Repository: erp/devel/pi
Changeset: dae17862ff355c9563dfc87b62e3b5c219f8dfbd
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Jul 26 11:48:34 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/dae17862ff355c9563dfc87b62e3b5c219f8dfbd [^]

Fixes issue 21049: Callout messages are shown even if saving row

Callout messages will be shown always, regardless of if the callout has been called upon tabbing out of the field, saving its row or moving to another row.

To prevent the autosave from hiding the messagebar, now it will do it only if the message bar is showing an error message (as it was supposed to work, looking at the comments).

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0050902)
hgbot   
2012-07-26 12:11   
Repository: erp/devel/pi
Changeset: 07e950437362a3313a66317521e193779563e9bd
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Jul 26 12:10:54 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/07e950437362a3313a66317521e193779563e9bd [^]

Related to issue 21049: Fixed wrong hardcoded message severity

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
---
(0050918)
hudsonbot   
2012-07-27 02:18   
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/4cfe6f4cd84a [^]

Maturity status: Test
(0050919)
hudsonbot   
2012-07-27 02:18   
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/4cfe6f4cd84a [^]

Maturity status: Test
(0050982)
guilleaer   
2012-07-30 12:40   
Code reviewed and tested in pi@b6862b1e8f54