Openbravo Issue Tracking System - Openbravo ERP  | 
| View Issue Details | 
  | 
| ID | Project | Category | View Status | Date Submitted | Last Update | 
| 0033572 | Openbravo ERP | A. Platform | public | 2016-08-01 09:46 | 2016-09-02 13:27 | 
  | 
| Reporter | caristu |   | 
| Assigned To | caristu |   | 
| Priority | normal | Severity | minor | Reproducibility | always | 
| Status | closed | Resolution | fixed |   | 
| Platform |  | OS | 5 | OS Version |  | 
| Product Version |  |   | 
| Target Version |  | Fixed in Version | 3.0PR16Q4 |   | 
| Merge Request Status |  | 
| Review Assigned To | alostale | 
| OBNetwork customer | No | 
| Web browser |  | 
| Modules | Core | 
| Support ticket |  | 
| Regression level |  | 
| Regression date |  | 
| Regression introduced in release |  | 
| Regression introduced by commit |  | 
| Triggers an Emergency Pack | No | 
  | 
| Summary | 0033572: Ability to define a Report Template as default | 
| Description | 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 | 
| Steps To Reproduce | In description | 
| Proposed Solution |  | 
| Additional Information |  | 
| Tags | No tags attached. | 
| Relationships | | related to  | design defect  | 0021594 | 3.0MP16  | new  | Triage Omni OMS  | Core update turns inactive report template into active in Document type window  |  
  | 
| Attached Files |  | 
  | 
| Issue History | 
| Date Modified | Username | Field | Change | 
| 2016-08-01 09:46 | caristu | New Issue |  | 
| 2016-08-01 09:46 | caristu | Assigned To |  => caristu | 
| 2016-08-01 09:46 | caristu | OBNetwork customer |  => No | 
| 2016-08-01 09:46 | caristu | Modules |  => Core | 
| 2016-08-01 09:46 | caristu | Triggers an Emergency Pack |  => No | 
| 2016-08-01 09:46 | caristu | Status | new => scheduled | 
| 2016-08-01 09:47 | caristu | Relationship added | related to 0021594 | 
| 2016-08-02 10:51 | hgbot | Checkin |  | 
| 2016-08-02 10:51 | hgbot | Note Added: 0088729 |  | 
| 2016-08-02 10:51 | hgbot | Status | scheduled => resolved | 
| 2016-08-02 10:51 | hgbot | Resolution | open => fixed | 
| 2016-08-02 10:51 | hgbot | Fixed in SCM revision |  => http://code.openbravo.com/erp/devel/pi/rev/5dd3611e71646bff6e1a05480582fba96c254fbf [^] | 
| 2016-08-02 10:54 | hgbot | Checkin |  | 
| 2016-08-02 10:54 | hgbot | Note Added: 0088730 |  | 
| 2016-08-02 10:55 | caristu | Review Assigned To |  => alostale | 
| 2016-08-02 10:55 | caristu | Issue Monitored: alostale |  | 
| 2016-08-11 18:40 | hudsonbot | Checkin |  | 
| 2016-08-11 18:40 | hudsonbot | Note Added: 0089030 |  | 
| 2016-08-11 18:40 | hudsonbot | Checkin |  | 
| 2016-08-11 18:40 | hudsonbot | Note Added: 0089031 |  | 
| 2016-08-30 10:25 | alostale | Note Added: 0089535 |  | 
| 2016-08-30 10:25 | alostale | Status | resolved => new | 
| 2016-08-30 10:25 | alostale | Resolution | fixed => open | 
| 2016-08-31 08:41 | caristu | Status | new => scheduled | 
| 2016-08-31 08:47 | caristu | Note Added: 0089576 |  | 
| 2016-08-31 08:47 | caristu | Status | scheduled => resolved | 
| 2016-08-31 08:47 | caristu | Resolution | open => fixed | 
| 2016-08-31 08:50 | caristu | Note Edited: 0089576 | bug_revision_view_page.php?bugnote_id=0089576#r12987 | 
| 2016-09-02 13:27 | alostale | Note Added: 0089702 |  | 
| 2016-09-02 13:27 | alostale | Status | resolved => closed | 
| 2016-09-02 13:27 | alostale | Fixed 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   
							 | 
		 
		 
	 | 
	
		
	 | 
	
		 
	 | 
	| 
		
	 | 
	
		
	 | 
	
		 
	 | 
	| 
		
	 | 
	
		
	 | 
	
		 
	 | 
	| 
		
	 | 
	
		
	 | 
	
		 
	 | 
	
		
		
			| 
				(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. 
 
			 | 
		 
		 
	 | 
	
		 
	 | 
	| 
		
	 | 
	
		
	 |