Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
| View Issue Details | ||||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
| 0045776 | Openbravo ERP | A. Platform | public | 2021-01-21 11:09 | 2021-01-25 09:37 | |||||||
| Reporter | vmromanos | |||||||||||
| Assigned To | cberner | |||||||||||
| Priority | normal | Severity | trivial | Reproducibility | always | |||||||
| Status | closed | Resolution | fixed | |||||||||
| Platform | OS | 5 | OS Version | |||||||||
| Product Version | ||||||||||||
| Target Version | PR20Q3.4 | Fixed in Version | PR20Q3.4 | |||||||||
| Merge Request Status | approved | |||||||||||
| Review Assigned To | ||||||||||||
| 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 | 0045776: PrintController.java, increase post() visibility | |||||||||||
| Description | Use case: I want to extend the printing process to: 1) Run some validations before printing a record 2) Run some business logic just after printing a record To achieve that I need to develop a custom class that extends from PrintController and override doPost() to implement my logic and then call the super.doPost(). The problem is that the doPost() runs final VariablesSecureApp vars = new VariablesSecureApp(request); at the beginning of the method, which makes the vars.command to be reset to "DEFAULT". This crashes the "send by email" feature (which expects a vars.command="EMAIL"). To workaround this I could easily override the post() method, which doesn't recalculate the vars variable, and which is called by the doPost(). The problem is that post() has package visibility, so I can't override it outside its package. | |||||||||||
| Steps To Reproduce | Create a class that extends PrintController in an external module. Try to override post(). It's not visible outside the package. | |||||||||||
| Proposed Solution | Change PrintController.post() visibility to public or protected. In the future, we should add some hooks to the printing process to allow easy extensibility. | |||||||||||
| Additional Information | ||||||||||||
| Tags | No tags attached. | |||||||||||
| Relationships |
| |||||||||||
| Attached Files | ||||||||||||
| Issue History | ||||||||||||
| Date Modified | Username | Field | Change | |||||||||
| 2021-01-25 06:56 | alostale | Type | defect => backport | |||||||||
| 2021-01-25 06:56 | alostale | Target Version | => PR20Q3.3 | |||||||||
| 2021-01-25 09:19 | hgbot | Note Added: 0125745 | ||||||||||
| 2021-01-25 09:32 | hgbot | Merge Request Status | open => approved | |||||||||
| 2021-01-25 09:32 | hgbot | Resolution | open => fixed | |||||||||
| 2021-01-25 09:32 | hgbot | Status | scheduled => closed | |||||||||
| 2021-01-25 09:32 | hgbot | Note Added: 0125749 | ||||||||||
| 2021-01-25 09:32 | hgbot | Fixed in Version | => PR20Q3.4 | |||||||||
| 2021-01-25 09:32 | hgbot | Note Added: 0125750 | ||||||||||
| 2021-01-25 09:37 | alostale | Target Version | PR20Q3.3 => PR20Q3.4 | |||||||||
| Notes | |||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||
|
|
|||||
|
|
||||