Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0033572Openbravo ERPA. Platformpublic2016-08-01 09:462016-09-02 13:27
caristu 
caristu 
normalminoralways
closedfixed 
5
 
3.0PR16Q4 
alostale
Core
No
0033572: Ability to define a Report Template as default
It would be nice if it would be possible to set the default report template of a document type.

This will help to overcome the problem caused by issue 0021594
In description
No tags attached.
related to design defect 00215943.0MP16 new Triage Omni OMS Core update turns inactive report template into active in Document type window 
Issue History
2016-08-01 09:46caristuNew Issue
2016-08-01 09:46caristuAssigned To => caristu
2016-08-01 09:46caristuModules => Core
2016-08-01 09:46caristuTriggers an Emergency Pack => No
2016-08-01 09:46caristuStatusnew => scheduled
2016-08-01 09:47caristuRelationship addedrelated to 0021594
2016-08-02 10:51hgbotCheckin
2016-08-02 10:51hgbotNote Added: 0088729
2016-08-02 10:51hgbotStatusscheduled => resolved
2016-08-02 10:51hgbotResolutionopen => fixed
2016-08-02 10:51hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5dd3611e71646bff6e1a05480582fba96c254fbf [^]
2016-08-02 10:54hgbotCheckin
2016-08-02 10:54hgbotNote Added: 0088730
2016-08-02 10:55caristuReview Assigned To => alostale
2016-08-02 10:55caristuIssue Monitored: alostale
2016-08-11 18:40hudsonbotCheckin
2016-08-11 18:40hudsonbotNote Added: 0089030
2016-08-11 18:40hudsonbotCheckin
2016-08-11 18:40hudsonbotNote Added: 0089031
2016-08-30 10:25alostaleNote Added: 0089535
2016-08-30 10:25alostaleStatusresolved => new
2016-08-30 10:25alostaleResolutionfixed => open
2016-08-31 08:41caristuStatusnew => scheduled
2016-08-31 08:47caristuNote Added: 0089576
2016-08-31 08:47caristuStatusscheduled => resolved
2016-08-31 08:47caristuResolutionopen => fixed
2016-08-31 08:50caristuNote Edited: 0089576bug_revision_view_page.php?bugnote_id=0089576#r12987
2016-09-02 13:27alostaleNote Added: 0089702
2016-09-02 13:27alostaleStatusresolved => closed
2016-09-02 13:27alostaleFixed in Version => 3.0PR16Q4

Notes
(0088729)
hgbot   
2016-08-02 10:51   
Repository: erp/devel/pi
Changeset: 5dd3611e71646bff6e1a05480582fba96c254fbf
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Aug 02 10:49:13 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5dd3611e71646bff6e1a05480582fba96c254fbf [^]

fixes issue 33572: Ability to define a Report Template as default

A new field is added to the Report Template tab in the Document Type window. It is a checkbox that can be used to mark a template as default. If a template is marked as default, is the one that will be selected when printing the document. Also a new trigger has been created in order to allow just one default template per document type.

---
M src-db/database/model/tables/C_POC_DOCTYPE_TEMPLATE.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src-db/database/sourcedata/AD_FIELD.xml
M src/org/openbravo/erpCommon/utility/reporting/Template_data.xsql
A src-db/database/model/triggers/C_POC_DOCTYPE_TEMPLATE_TRG.xml
---
(0088730)
hgbot   
2016-08-02 10:54   
Repository: erp/devel/pi
Changeset: 990a797ec886c7484cf199f698e18a99d8c393de
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Tue Aug 02 10:54:05 2016 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/990a797ec886c7484cf199f698e18a99d8c393de [^]

related to issue 33572: Updated copyright year

---
M src/org/openbravo/erpCommon/utility/reporting/Template_data.xsql
---
(0089030)
hudsonbot   
2016-08-11 18:40   
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/edaa05b1fb18 [^]
Maturity status: Test
(0089031)
hudsonbot   
2016-08-11 18:40   
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/edaa05b1fb18 [^]
Maturity status: Test
(0089535)
alostale   
2016-08-30 10:25   
reopening due mini performance problem in trigger: see https://docs.google.com/spreadsheets/d/18l2biKWeG6iGDIPqO6VuYQ_TtP_6YxyQU4KSrPvQlJ8/edit#gid=0 [^]
(0089576)
caristu   
2016-08-31 08:47   
(edited on: 2016-08-31 08:50)
C_POC_DOCTYPE_TEMPLATE_TRG is executed for each statement instead of for each row, so it is not possible to use NEW/OLD to know if the isDefault column has changed.

So within this trigger is not possible to check which column in particular has been updated.

Not adding changes, as the C_POC_DOCTYPE_TEMPLATE is not a table where the number of update operations is significant.

(0089702)
alostale   
2016-09-02 13:27   
code reviewed + tested