Openbravo Issue Tracking System - POS2
View Issue Details
0056392POS2Corepublic2024-09-06 08:412024-09-06 13:17
azzeddine_meftoh 
ifernandez 
normalcriticalhave not tried
closedfixed 
5
 
 
No
0056392: subsitutive invoice not working with azure storage
when generating a substitutive invoice in POS2 we get the following error in the BO logs :
2024-09-05 20:53:29,974 [NonBlocking - 1] WARN org.openbravo.dal.core.OBInterceptor - The object C_IMPORT_ENTRY(3EFDE01CBF1240F1A99166B536873F61) (organization: B430FD49274844F2B1A3C44A5EB7912D, typeofdata: OBEDL_Request) is detected as not new (is its id != null?) but it does not have a current state in the database. This can happen when the id is set but not setNewObject(true); has been called.
2024-09-05 21:01:46,535 [Import Entry - 1] ERROR org.openbravo.retail.posterminal.POSDataSynchronizationErrorHandler - An error happened when processing a record:
org.openbravo.base.exception.OBException: Error uploading reprintable document
    at org.openbravo.client.application.attachment.ReprintableDocumentManager.upload(ReprintableDocumentManager.java:202) ~[classes/:?]
    at org.openbravo.client.application.attachment.ReprintableDocumentManager.upload(ReprintableDocumentManager.java:161) ~[classes/:?]
    at org.openbravo.client.application.attachment.ReprintableDocumentManager$Proxy$_$$_WeldClientProxy.upload(Unknown Source) ~[classes/:?]
    at org.openbravo.retail.posterminal.importprocess.ReprintableDocumentLoader.saveRecord(ReprintableDocumentLoader.java:44) ~[classes/:?]
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.saveRecord(DataSynchronizationProcess.java:214) [classes/:?]
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:165) [classes/:?]
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:97) [classes/:?]
    at org.openbravo.mobile.core.process.MobileImportEntryProcessorRunnable.processEntry(MobileImportEntryProcessorRunnable.java:55) [classes/:?]
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.doRunCycle(ImportEntryProcessor.java:447) [classes/:?]
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.run(ImportEntryProcessor.java:370) [classes/:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
    at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.lang.IllegalArgumentException: Unknown source document linked to ReprintableDocument 5D58165E58314A86B4D5791FB48C3067
    at org.openbravo.service.integration.azure.storage.attachments.AzureStorageReprintableDocumentClient.getTableId(AzureStorageReprintableDocumentClient.java:62) ~[classes/:?]
    at org.openbravo.service.integration.azure.storage.attachments.AzureStorageReprintableDocumentClient.mapAsKey(AzureStorageReprintableDocumentClient.java:46) ~[classes/:?]
    at org.openbravo.service.integration.azure.storage.attachments.AzureStorageReprintableDocumentClient.mapAsKey(AzureStorageReprintableDocumentClient.java:19) ~[classes/:?]
    at org.openbravo.service.integration.azure.storage.attachments.BaseAzureStorageAttachmentClient.upload(BaseAzureStorageAttachmentClient.java:94) ~[classes/:?]
    at org.openbravo.service.integration.azure.storage.attachments.AzureStorageAttachImplementation.upload(AzureStorageAttachImplementation.java:144) ~[classes/:?]
    at org.openbravo.service.integration.azure.storage.attachments.AzureStorageAttachImplementation$Proxy$_$$_WeldClientProxy.upload(Unknown Source) ~[classes/:?]
    at org.openbravo.client.application.attachment.ReprintableDocumentManager.upload(ReprintableDocumentManager.java:200) ~[classes/:?]
    ... 14 more
2024-09-05 21:01:46,541 [Import Entry - 1] ERROR org.openbravo.retail.posterminal.POSDataSynchronizationErrorHandler - Error while loading order
org.openbravo.base.exception.OBException: Error uploading reprintable document
    at org.openbravo.client.application.attachment.ReprintableDocumentManager.upload(ReprintableDocumentManager.java:202) ~[classes/:?]
    at org.openbravo.client.application.attachment.ReprintableDocumentManager.upload(ReprintableDocumentManager.java:161) ~[classes/:?]
    at org.openbravo.client.application.attachment.ReprintableDocumentManager$Proxy$_$$_WeldClientProxy.upload(Unknown Source) ~[classes/:?]
    at org.openbravo.retail.posterminal.importprocess.ReprintableDocumentLoader.saveRecord(ReprintableDocumentLoader.java:44) ~[classes/:?]
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.saveRecord(DataSynchronizationProcess.java:214) [classes/:?]
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:165) [classes/:?]
    at org.openbravo.mobile.core.process.DataSynchronizationProcess.exec(DataSynchronizationProcess.java:97) [classes/:?]
    at org.openbravo.mobile.core.process.MobileImportEntryProcessorRunnable.processEntry(MobileImportEntryProcessorRunnable.java:55) [classes/:?]
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.doRunCycle(ImportEntryProcessor.java:447) [classes/:?]
    at org.openbravo.service.importprocess.ImportEntryProcessor$ImportEntryProcessRunnable.run(ImportEntryProcessor.java:370) [classes/:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
    at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: java.lang.IllegalArgumentException: Unknown source document linked to ReprintableDocument 5D58165E58314A86B4D5791FB48C3067
    at org.openbravo.service.integration.azure.storage.attachments.AzureStorageReprintableDocumentClient.getTableId(AzureStorageReprintableDocumentClient.java:62) ~[classes/:?]
    at org.openbravo.service.integration.azure.storage.attachments.AzureStorageReprintableDocumentClient.mapAsKey(AzureStorageReprintableDocumentClient.java:46) ~[classes/:?]
    at org.openbravo.service.integration.azure.storage.attachments.AzureStorageReprintableDocumentClient.mapAsKey(AzureStorageReprintableDocumentClient.java:19) ~[classes/:?]
    at org.openbravo.service.integration.azure.storage.attachments.BaseAzureStorageAttachmentClient.upload(BaseAzureStorageAttachmentClient.java:94) ~[classes/:?]
    at org.openbravo.service.integration.azure.storage.attachments.AzureStorageAttachImplementation.upload(AzureStorageAttachImplementation.java:144) ~[classes/:?]
    at org.openbravo.service.integration.azure.storage.attachments.AzureStorageAttachImplementation$Proxy$_$$_WeldClientProxy.upload(Unknown Source) ~[classes/:?]
    at org.openbravo.client.application.attachment.ReprintableDocumentManager.upload(ReprintableDocumentManager.java:200) ~[classes/:?]
    ... 14 more
generate substitutive invoice on POS2
check the substitutive invoice in BO ok
check the reprint of the substitutive invoice -> KO

there is an error when uploading to azure storage as shown in the description
No tags attached.
related to feature request 0056228 closed ifernandez Factura Substitutiva should work with Immutable reports 
Issue History
2024-09-06 08:41azzeddine_meftohNew Issue
2024-09-06 08:41azzeddine_meftohAssigned To => Triage Platform Base
2024-09-06 08:41azzeddine_meftohTriggers an Emergency Pack => No
2024-09-06 09:17aferrazAssigned ToTriage Platform Base => ifernandez
2024-09-06 09:29martinsdanIssue Monitored: martinsdan
2024-09-06 09:47frank_gonzalezNote Added: 0168851
2024-09-06 11:00hgbotNote Added: 0168853
2024-09-06 11:35hgbotNote Added: 0168858
2024-09-06 11:40hgbotNote Added: 0168859
2024-09-06 12:07caristuRelationship addedrelated to 0056228
2024-09-06 13:14hgbotNote Added: 0168862
2024-09-06 13:14hgbotNote Added: 0168863
2024-09-06 13:16hgbotResolutionopen => fixed
2024-09-06 13:16hgbotStatusnew => closed
2024-09-06 13:16hgbotNote Added: 0168864
2024-09-06 13:16hgbotNote Added: 0168865
2024-09-06 13:17hgbotNote Added: 0168866
2024-09-06 13:17hgbotNote Added: 0168867

Notes
(0168851)
frank_gonzalez   
2024-09-06 09:47   
Jira: https://openbravo.atlassian.net/browse/RM-16796 [^]
(0168853)
hgbot   
2024-09-06 11:00   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1345 [^]
(0168858)
hgbot   
2024-09-06 11:35   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.integration.azure.storage/-/merge_requests/23 [^]
(0168859)
hgbot   
2024-09-06 11:40   
Merge Request created: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.integration.amazon.s3/-/merge_requests/5 [^]
(0168862)
hgbot   
2024-09-06 13:14   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1345 [^]
(0168863)
hgbot   
2024-09-06 13:14   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 600c6c312a3cfeca0c29b739b4b80623114f78f4
Author: Íñigo Fernández <inigo.fernandez@openbravo.com>
Date: 06-09-2024 11:14:20
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/600c6c312a3cfeca0c29b739b4b80623114f78f4 [^]

related to ISSUE-56392: expose methods to build reprintable attach path

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/CoreAttachImplementation.java
M modules/org.openbravo.client.application/src/org/openbravo/client/application/attachment/ReprintableSourceDocument.java
---
(0168864)
hgbot   
2024-09-06 13:16   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.integration.azure.storage [^]
Changeset: 0c20df44a219b516eaae76a745a9c7e7a34a6fda
Author: Íñigo Fernández <inigo.fernandez@openbravo.com>
Date: 06-09-2024 11:16:05
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.integration.azure.storage/-/commit/0c20df44a219b516eaae76a745a9c7e7a34a6fda [^]

Fixes BUG-56392: Reprintale Substitutive Invoice not working in Azure storage

---
M src/org/openbravo/service/integration/azure/storage/attachments/AzureStorageReprintableDocumentClient.java
---
(0168865)
hgbot   
2024-09-06 13:16   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.integration.azure.storage/-/merge_requests/23 [^]
(0168866)
hgbot   
2024-09-06 13:17   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.integration.amazon.s3 [^]
Changeset: fda67cd85408f235bd7c89536eafe833879921ea
Author: Íñigo Fernández <inigo.fernandez@openbravo.com>
Date: 06-09-2024 11:17:12
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.integration.amazon.s3/-/commit/fda67cd85408f235bd7c89536eafe833879921ea [^]

Fixes BUG-56392: Reprintale Substitutive Invoice not working in S3 storage

---
M src/org/openbravo/service/integration/amazon/s3/attachments/AmazonS3ReprintableDocumentClient.java
---
(0168867)
hgbot   
2024-09-06 13:17   
Merge request merged: https://gitlab.com/openbravo/product/pmods/org.openbravo.service.integration.amazon.s3/-/merge_requests/5 [^]