Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0044871 | Openbravo ERP | A. Platform | public | 2020-08-24 09:06 | 2020-08-24 20:07 | |||||||
Reporter | joniturralde93 | |||||||||||
Assigned To | platform | |||||||||||
Priority | urgent | Severity | major | Reproducibility | always | |||||||
Status | closed | Resolution | out of date | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | ||||||||||||
Target Version | Fixed in Version | |||||||||||
Merge Request Status | ||||||||||||
Review Assigned To | ||||||||||||
OBNetwork customer | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0044871: Callout SE_Invoice_BPartner doesn't work when there is too much data | |||||||||||
Description | When selecting a business partner when creating a sales invoice, the callout won't work for too much data, specifically number of vendors (users marked as vendors and related to a business partner). The business partner gets selected, but the related fields are not automatically selected (payment method and payment terms). This is the error shown in openbravo.log: 2020-08-22 05:49:07,863 [http-194] ERROR org.openbravo.client.application.window.FormInitializationComponent - Couldn't parse callout response. The parsed response was: var calloutName='SE_Invoice_BPartner'; (...) org.mozilla.javascript.EvaluatorException: Encountered code generation error while compiling script: generated bytecode for method exceeds 64K limit. (<cmd>#1) at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109) at org.mozilla.javascript.Context.reportRuntimeError(Context.java:938) at org.mozilla.javascript.optimizer.Codegen.reportClassFileFormatException(Codegen.java:196) at org.mozilla.javascript.optimizer.Codegen.generateCode(Codegen.java:329) at org.mozilla.javascript.optimizer.Codegen.compileToClassFile(Codegen.java:182) at org.mozilla.javascript.optimizer.Codegen.compile(Codegen.java:91) at org.mozilla.javascript.Context.compileImpl(Context.java:2391) at org.mozilla.javascript.Context.compileString(Context.java:1359) at org.mozilla.javascript.Context.compileString(Context.java:1348) at org.mozilla.javascript.Context.evaluateString(Context.java:1101) at org.openbravo.client.application.window.FormInitializationComponent.parseCalloutResponse(FormInitializationComponent.java:1744) at org.openbravo.client.application.window.FormInitializationComponent.runCallouts(FormInitializationComponent.java:1540) at org.openbravo.client.application.window.FormInitializationComponent.executeCallouts(FormInitializationComponent.java:1444) at org.openbravo.client.application.window.FormInitializationComponent.execute(FormInitializationComponent.java:276) This error means that the javascript generated by FormInitializationComponent is too large (Rhino javascript engine doesn't support that). In our case, there were 1772 results when executing this query: select count(1) from ad_user inner join c_bpartner on ad_user.c_bpartner_id=c_bpartner.c_bpartner_id where issalesrep='Y' and ad_user.isactive='Y'; After we set as inactive the ones created in the last days (440 records), the callout started working again. | |||||||||||
Steps To Reproduce | - Configure a lot of vendors (active users with a business partner assigned which has "sales representative" checked), in our case there were 1772 - Create a sales invoice - Select a business partner - The callout doesn't work, the related fields are not automatically selected and there is an error in openbravo.log | |||||||||||
Proposed Solution | In this case, in my opinion the first thing would be to review the callout, because the code that is generating a very large amount of data (the ComboTableData call to read the sales representatives) maybe is not needed, as the new selectors should already compute this information in a lazy way if I'm not mistaken | |||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Relationships |
| |||||||||||
Attached Files | ||||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2020-08-24 09:06 | joniturralde93 | New Issue | ||||||||||
2020-08-24 09:06 | joniturralde93 | Assigned To | => platform | |||||||||
2020-08-24 09:06 | joniturralde93 | Modules | => Core | |||||||||
2020-08-24 09:06 | joniturralde93 | Resolution time | => 1600034400 | |||||||||
2020-08-24 09:06 | joniturralde93 | Triggers an Emergency Pack | => No | |||||||||
2020-08-24 09:09 | marvintm | Proposed Solution updated | ||||||||||
2020-08-24 09:42 | joniturralde93 | Relationship added | related to 0020455 | |||||||||
2020-08-24 13:45 | AugustoMauch | Note Added: 0122304 | ||||||||||
2020-08-24 13:45 | AugustoMauch | Status | new => closed | |||||||||
2020-08-24 13:45 | AugustoMauch | Resolution | open => out of date | |||||||||
2020-08-24 20:06 | AugustoMauch | Note Added: 0122317 | ||||||||||
2020-08-24 20:07 | AugustoMauch | Note Added: 0122318 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|