Openbravo Issue Tracking System - Retail Modules
View Issue Details
0058090Retail ModulesWeb POSpublic2025-02-27 09:232025-02-28 12:15
caristu 
caristu 
highminorhave not tried
closedfixed 
5
 
 
approved
No
No
0058090: Cannot parse images without read access to ADSystemInformation entity
Is not possible to transform an XML template with images into PDF if the role executing the printing does not have read access to the ADSystemInformation entity. In such a case, the following exception is thrown:

org.openbravo.base.exception.OBException: Could not transform XML into PDF
    at org.openbravo.mobile.core.XMLtoPDFReprintableDocumentTransformer.transform(XMLtoPDFReprintableDocumentTransformer.java:46) ~[classes/:?]

....

Caused by: org.openbravo.base.exception.OBSecurityException: Entity ADSystemInformation is not readable by the user B19C90FE4D6748D29C0662C7AAA7BC58
    at org.openbravo.dal.security.EntityAccessChecker.checkReadable(EntityAccessChecker.java:639) ~[classes/:?]
1) Enable the Reprintable Documents feature[1]
2) Create a ticket in the POS and print it. The print template must have an image.
3) Access to the backoffice with a role that does not have access to the ADSystemInformation entity
4) Navigate to the Sales Order window, and reprint the order generated in step 2. The document is not generated due to the error mentioned in the Description.


[1] https://wiki.openbravo.com/wiki/Reprintable_Documents [^]
No tags attached.
related to feature request 0056385 closed adrianromero Send Email refactor 
related to defect 0058104 closed caristu Is not possible to reprint an XML document with nested elements of the same type 
Issue History
2025-02-27 09:23caristuNew Issue
2025-02-27 09:23caristuAssigned To => caristu
2025-02-27 09:23caristuOBNetwork customer => No
2025-02-27 09:23caristuTriggers an Emergency Pack => No
2025-02-27 09:23caristuIssue generated from0056385
2025-02-27 09:23caristuRelationship addedrelated to 0056385
2025-02-27 16:54caristuIssue cloned0058104
2025-02-27 16:54caristuRelationship addedrelated to 0058104
2025-02-27 16:55caristuRelationship deletedrelated to 0058104
2025-02-27 19:08hgbotMerge Request Status => open
2025-02-27 19:08hgbotNote Added: 0176249
2025-02-28 07:43alostaleRelationship addedrelated to 0058104
2025-02-28 12:15hgbotMerge Request Statusopen => approved
2025-02-28 12:15hgbotNote Added: 0176290
2025-02-28 12:15hgbotResolutionopen => fixed
2025-02-28 12:15hgbotStatusnew => closed
2025-02-28 12:15hgbotNote Added: 0176291

Notes
(0176249)
hgbot   
2025-02-27 19:08   
Merge Request created: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.mobile.transformtopdf/-/merge_requests/6 [^]
(0176290)
hgbot   
2025-02-28 12:15   
Merge request merged: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.mobile.transformtopdf/-/merge_requests/6 [^]
(0176291)
hgbot   
2025-02-28 12:15   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.mobile.transformtopdf [^]
Changeset: e0a24652dc9c1d2e296aadd383f81e69cf9cef8c
Author: Carlos Aristu <c.aristu@orisha.com>
Date: 28-02-2025 08:31:26
URL: https://gitlab.com/orisha-group/bu-commerce/openbravo/product/pmods/org.openbravo.mobile.transformtopdf/-/commit/e0a24652dc9c1d2e296aadd383f81e69cf9cef8c [^]

fixes BUG-58090: cannot parse images without read access to ADSystemInformation

  Retrieve the company logo in admin mode to allow the reprinting to
those roles that do not have read access to the ADSystemInformation
entity.

  Besides, reload the image with DAL to avoid a
LazyInitializationException because of the usage of the Organization
instance cached in the context.

  Note that instead of retrieving the organization from the context the
one of the ticket should be used. This will be fixed in a separate
issue. Most probably this last change will not be necessary when
retrieving the organization from the ticket.

---
M src/org/openbravo/mobile/transformtopdf/ImageParser.java
---