Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028103Openbravo ERP07. Sales managementpublic2014-11-06 00:552014-12-30 23:24
jecharri 
AtulOpenbravo 
immediatemajoralways
closedfixed 
5
 
 
pramakrishnan
OBPS
Google Chrome
Core
32237
No
0028103: If you have two Reports Templates defined the generated report is duplicated
If you have two Report Templates defined the generated report is duplicated
-Configure the client to be able to send emails
-Configure one order document type to have 2 Report Templates related with one document type -> report_template.png
-Also define two different Emails definitions
-Go to sales order window
-Select an order with the modified document type and send to your email

Verify that the report is duplicated, attached an example
No tags attached.
png report_template.png (164,978) 2014-11-06 00:55
https://issues.openbravo.com/file_download.php?file_id=7485&type=bug
png

pdf Sales_Order_VBS1_0000097.20141105-174323.pdf (41,798) 2014-11-06 00:56
https://issues.openbravo.com/file_download.php?file_id=7486&type=bug
Issue History
2014-11-06 00:55jecharriNew Issue
2014-11-06 00:55jecharriAssigned To => AugustoMauch
2014-11-06 00:55jecharriFile Added: report_template.png
2014-11-06 00:55jecharriOBNetwork customer => Yes
2014-11-06 00:55jecharriWeb browser => Google Chrome
2014-11-06 00:55jecharriModules => Core
2014-11-06 00:55jecharriSupport ticket => 32237
2014-11-06 00:55jecharriResolution time => 1418079600
2014-11-06 00:55jecharriTriggers an Emergency Pack => No
2014-11-06 00:56jecharriFile Added: Sales_Order_VBS1_0000097.20141105-174323.pdf
2014-11-06 19:20ngarciaIssue Monitored: networkb
2014-11-06 19:21ngarciaIssue Monitored: ngarcia
2014-11-06 19:23ngarciaWeb browserGoogle Chrome => Google Chrome
2014-11-06 19:23ngarciaResolution time1418079600 => 1415401200
2014-11-06 19:23ngarciaPriorityurgent => immediate
2014-11-07 12:09alostaleNote Added: 0071497
2014-11-07 12:09alostaleWeb browserGoogle Chrome => Google Chrome
2014-11-07 12:09alostaleAssigned ToAugustoMauch => vmromanos
2014-11-07 12:09alostaleCategoryA. Platform => 07. Sales management
2014-11-07 12:11alostaleNote Edited: 0071497bug_revision_view_page.php?bugnote_id=0071497#r6993
2014-11-09 18:36AtulOpenbravoAssigned Tovmromanos => AtulOpenbravo
2014-11-09 18:36AtulOpenbravoStatusnew => scheduled
2014-11-09 18:36AtulOpenbravofix_in_branch => pi
2014-11-10 10:13AtulOpenbravoNote Added: 0071517
2014-11-12 05:06AtulOpenbravoReview Assigned To => pramakrishnan
2014-11-12 05:06AtulOpenbravoWeb browserGoogle Chrome => Google Chrome
2014-11-12 05:06AtulOpenbravofix_in_branchpi =>
2014-11-12 05:08hgbotCheckin
2014-11-12 05:08hgbotNote Added: 0071575
2014-11-12 05:08hgbotStatusscheduled => resolved
2014-11-12 05:08hgbotResolutionopen => fixed
2014-11-12 05:08hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/714c75ed4d9aaf33560e1becc11bf98f5a1df436 [^]
2014-11-12 05:56pramakrishnanNote Added: 0071576
2014-11-12 05:56pramakrishnanStatusresolved => closed
2014-12-30 23:24hudsonbotCheckin
2014-12-30 23:24hudsonbotNote Added: 0073043

Notes
(0071497)
alostale   
2014-11-07 12:09   
(edited on: 2014-11-07 12:11)
The problem is not in the platform but in the query C_OrderJR_new.jrxml has:

select ...
  from ...
       AD_USER right join C_ORDER on AD_USER.AD_USER_ID = C_ORDER.AD_USER_ID
                         left join C_POC_DOCTYPE_TEMPLATE ON C_POC_DOCTYPE_TEMPLATE.C_DOCTYPE_ID = C_ORDER.C_DOCTYPETARGET_ID,
...

which is joining c_order with templates resulting in as many rows as templates for that document type. Having multiple lines makes the detail section, where the subreports for lines are inserted, to be repeated.

This query should be reviewed (is this join needed at all?).

(0071517)
AtulOpenbravo   
2014-11-10 10:13   
Test Plan
- Configure client definition to send email as per
http://wiki.openbravo.com/wiki/Client#Email_Configuration [^]
- Create a two report templates for Order document type. Also add email definition to templates.
- Go to Sales Order window. Either send email with report attachment or try to print any order record.
- Check in sent email attachment document or order print, that lines information is not repeated.
(0071575)
hgbot   
2014-11-12 05:08   
Repository: erp/devel/pi
Changeset: 714c75ed4d9aaf33560e1becc11bf98f5a1df436
Author: Atul Gaware <atul.gaware <at> openbravo.com>
Date: Mon Nov 10 15:17:25 2014 +0530
URL: http://code.openbravo.com/erp/devel/pi/rev/714c75ed4d9aaf33560e1becc11bf98f5a1df436 [^]

Fixes Issue 28103:If you have two Reports Templates defined the generated
report is duplicated

With reference to changes in RptC_Invoice_new.jrxml during fix for issue
23745, left join for table C_POC_DOCTYPE_TEMPLATE is removed and necessary
changes are done.

---
M src/org/openbravo/erpReports/C_OrderJR_new.jrxml
---
(0071576)
pramakrishnan   
2014-11-12 05:56   
Code review + Testing - OK.
(0073043)
hudsonbot   
2014-12-30 23:24   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/6525fe229e06 [^]
Maturity status: Test