Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||||||||||||||||
View Issue Details | ||||||||||||||||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||||||||||||||||
0045768 | Openbravo ERP | A. Platform | public | 2021-01-21 11:09 | 2021-01-25 09:34 | |||||||||||||||||||||
Reporter | vmromanos | |||||||||||||||||||||||||
Assigned To | cberner | |||||||||||||||||||||||||
Priority | normal | Severity | trivial | Reproducibility | always | |||||||||||||||||||||
Status | closed | Resolution | fixed | |||||||||||||||||||||||
Platform | OS | 5 | OS Version | |||||||||||||||||||||||
Product Version | ||||||||||||||||||||||||||
Target Version | Fixed in Version | PR21Q2 | ||||||||||||||||||||||||
Merge Request Status | approved | |||||||||||||||||||||||||
Review Assigned To | alostale | |||||||||||||||||||||||||
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 | 0045768: 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-21 11:09 | vmromanos | New Issue | ||||||||||||||||||||||||
2021-01-21 11:09 | vmromanos | Assigned To | => platform | |||||||||||||||||||||||
2021-01-21 11:09 | vmromanos | OBNetwork customer | => No | |||||||||||||||||||||||
2021-01-21 11:09 | vmromanos | Modules | => Core | |||||||||||||||||||||||
2021-01-21 11:09 | vmromanos | Triggers an Emergency Pack | => No | |||||||||||||||||||||||
2021-01-21 12:10 | cberner | Assigned To | platform => cberner | |||||||||||||||||||||||
2021-01-21 12:23 | hgbot | Merge Request Status | => open | |||||||||||||||||||||||
2021-01-21 12:23 | hgbot | Note Added: 0125710 | ||||||||||||||||||||||||
2021-01-25 06:56 | alostale | Status | new => scheduled | |||||||||||||||||||||||
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 | Fixed in Version | => PR21Q2 | |||||||||||||||||||||||
2021-01-25 09:32 | hgbot | Note Added: 0125747 | ||||||||||||||||||||||||
2021-01-25 09:32 | hgbot | Note Added: 0125748 | ||||||||||||||||||||||||
2021-01-25 09:32 | cberner | Status | closed => new | |||||||||||||||||||||||
2021-01-25 09:32 | cberner | Resolution | fixed => open | |||||||||||||||||||||||
2021-01-25 09:32 | cberner | Fixed in Version | PR21Q2 => | |||||||||||||||||||||||
2021-01-25 09:33 | cberner | Status | new => scheduled | |||||||||||||||||||||||
2021-01-25 09:33 | cberner | Note Added: 0125753 | ||||||||||||||||||||||||
2021-01-25 09:33 | cberner | Status | scheduled => resolved | |||||||||||||||||||||||
2021-01-25 09:33 | cberner | Fixed in Version | => PR21Q2 | |||||||||||||||||||||||
2021-01-25 09:33 | cberner | Fixed in SCM revision | => c46750835f6e84c13e79ce45496d28a85e9acb74 | |||||||||||||||||||||||
2021-01-25 09:33 | cberner | Resolution | open => fixed | |||||||||||||||||||||||
2021-01-25 09:34 | cberner | Review Assigned To | => alostale | |||||||||||||||||||||||
2021-01-25 09:34 | cberner | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|