Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0056371Openbravo ERPZ. Otherspublic2024-09-05 08:242024-09-05 13:41
alostale 
alostale 
normalminorhave not tried
closedfixed 
5
 
PR24Q4 
approved
No
Core
No
0056371: Backoffice print button does not work if there is no email definition
In backoffice trying to (re)print the document whose type has not an email definition, you get a message saying org.openbravo.erpCommon.utility.reporting.ReportingException: No email definitions found for template with id: 498DAE87AC4A4BCA818B929C568B0445
1. Make sure you DON’T have an email configuration setup for the invoice document type
2. In POS, do sales with invoices
3. Go to SALES INVOICE window in BACKOFFICE and look for the invoice created
4. Click on the icon to (RE)PRINT of backoffice
    You will get error message org.openbravo.erpCommon.utility.reporting.ReportingException: No email definitions found for template with id: 498DAE87AC4A4BCA818B929C568B0445*
No tags attached.
Issue History
2024-09-05 08:24alostaleNew Issue
2024-09-05 08:24alostaleAssigned To => Triage Omni OMS
2024-09-05 08:24alostaleOBNetwork customer => No
2024-09-05 08:24alostaleModules => Core
2024-09-05 08:24alostaleTriggers an Emergency Pack => No
2024-09-05 08:29alostaleAssigned ToTriage Omni OMS => alostale
2024-09-05 09:48hgbotMerge Request Status => open
2024-09-05 09:48hgbotNote Added: 0168764
2024-09-05 10:03hgbotNote Added: 0168765
2024-09-05 10:14alostaleNote Added: 0168766
2024-09-05 10:18hgbotNote Added: 0168768
2024-09-05 10:18hgbotMerge Request Statusopen => merged
2024-09-05 10:18hgbotNote Added: 0168769
2024-09-05 11:55hgbotMerge Request Statusmerged => approved
2024-09-05 13:41hgbotNote Added: 0168813
2024-09-05 13:41hgbotResolutionopen => fixed
2024-09-05 13:41hgbotStatusnew => closed
2024-09-05 13:41hgbotFixed in Version => PR24Q4
2024-09-05 13:41hgbotNote Added: 0168814

Notes
(0168764)
hgbot   
2024-09-05 09:48   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1344 [^]
(0168765)
hgbot   
2024-09-05 10:03   
Merge Request created: https://gitlab.com/openbravo/ci/backoffice-api/-/merge_requests/75 [^]
(0168766)
alostale   
2024-09-05 10:14   
Tested:

In all cases with and without email definition for the document being printed/emailed:

1. Reprintable reports inactive
1.1. Print
1.2. Send email: when there is an email definition, it is taken, if not empty fields appear for the user to complete

2. Reprintable reports active
2.1. Print
2.2. Reprint
2.3. Send email for first time, so the doc is generated
2.4. Send email having a document already created (reprint). In both 2.3 and 2.4 email templates behave as in 1.2
(0168768)
hgbot   
2024-09-05 10:18   
Repository: https://gitlab.com/openbravo/ci/backoffice-api [^]
Changeset: f0a2e5244c4c08d7bc37aa3c0a9ccdef823d4dee
Author: Asier Lostalé <a.lostale@orisha.com>
Date: 05-09-2024 10:02:48
URL: https://gitlab.com/openbravo/ci/backoffice-api/-/commit/f0a2e5244c4c08d7bc37aa3c0a9ccdef823d4dee [^]

related to BUG-56371: unused message removal API change

---
M model/src-db/database/sourcedata/AD_MESSAGE.xml
---
(0168769)
hgbot   
2024-09-05 10:18   
Merge request merged: https://gitlab.com/openbravo/ci/backoffice-api/-/merge_requests/75 [^]
(0168813)
hgbot   
2024-09-05 13:41   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/1344 [^]
(0168814)
hgbot   
2024-09-05 13:41   
Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 8df44808554ff6053adc7af33d6e4a73a94a032f
Author: Asier Lostalé <a.lostale@orisha.com>
Date: 05-09-2024 09:53:50
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/8df44808554ff6053adc7af33d6e4a73a94a032f [^]

fixes BUG-56371: print button does not work if there is no email definition

Whenever a document was going to be printed it was assumed there should be at
least one email definition, which is not necessary for printing.

Now email definitions are never mandatory:
  * When just printing without emailing, they are not used at all.
  * When also emailing, in case of not being defined, an empty template is used.

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M src/org/openbravo/erpCommon/utility/reporting/TemplateInfo.java
---