Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0019026Openbravo ERP01. General setuppublic2011-11-09 11:082011-11-12 16:04
0019026: Logo does not appear in jasper reports when you use a role different from Admin
The logo of the company does not show in jasper reports when your role is different from Admin.
As Group Admin role
Navigate to Sales Invoice:
   select one invoice
   print it
   export in pdf
We realise that the logo appears in print.
As other role, either Sales, Warehouse or Finance role:
Navigate to Sales Order window, for example:
   select one order
   print it
   export in pdf
We realise that the logo does not appear in print.
related to defect 00180823.0MP3 closed marvintm Performance improvements in image showing 
Issue History
2011-11-09 11:08VictorVillarNew Issue
2011-11-09 11:08VictorVillarAssigned To => marvintm
2011-11-09 11:08VictorVillarModules => Core
2011-11-10 15:52shuehnerNote Added: 0042731
2011-11-10 15:52shuehnerTarget Version3.0MP6 => 3.0MP5
2011-11-10 15:54shuehnerPriorityurgent => immediate
2011-11-10 15:56shuehnerNote Added: 0042732
2011-11-10 16:05dmitry_mezentsevTag Attached: Regression
2011-11-10 16:05dmitry_mezentsevRelationship addedrelated to 0018082
2011-11-10 16:05dmitry_mezentsevNote Added: 0042733
2011-11-10 16:12hgbotCheckin
2011-11-10 16:12hgbotNote Added: 0042734
2011-11-10 16:12hgbotStatusnew => resolved
2011-11-10 16:12hgbotResolutionopen => fixed
2011-11-10 16:12hgbotFixed in SCM revision => [^]
2011-11-10 16:51VictorVillarNote Added: 0042736
2011-11-10 16:51VictorVillarStatusresolved => closed
2011-11-10 16:51VictorVillarFixed in Version => 3.0MP5
2011-11-10 17:36shuehnerNote Added: 0042743
2011-11-12 15:47hgbotCheckin
2011-11-12 15:47hgbotNote Added: 0042768
2011-11-12 15:47hgbotStatusclosed => resolved
2011-11-12 15:47hgbotFixed in SCM revision [^] => [^]
2011-11-12 15:49hudsonbotCheckin
2011-11-12 15:49hudsonbotNote Added: 0042793
2011-11-12 16:04shuehnerNote Added: 0042801
2011-11-12 16:04shuehnerStatusresolved => closed

2011-11-10 15:52   
Re-targeting for MP5.
Note: Workaround exists if needed until fix is available: Give read permission to the window 'Application image' to the roles which need access to the logos.
2011-11-10 15:56   
Bug is that the call to 'imageByte = img.getBindaryData();' in line 2563 in is outside of the adminMode block. So the permission check will fail if called by a role not having explicit access to 'ad_image'. Just having the OBDal.get calls inside adminMode is not enough, all property access must be also in an adminMode block.
2011-11-10 16:05 [^] is the issue that introduced regression.
2011-11-10 16:12   
Repository: erp/devel/pi
Changeset: 38db7358cec3df00dfa158ed6da792eb359ad73d
Author: Antonio Moreno <antonio.moreno <at>>
Date: Thu Nov 10 16:11:30 2011 +0100
URL: [^]

Fixed issue 19026. Images will be read correctly when the role doesn't have access to the Image window.

M src/org/openbravo/erpCommon/utility/
2011-11-10 16:51   
2011-11-10 17:36   
Reviewed & test in pi/pgsql (rev id: 38db7358cec3). Now showing the logo image works with a non-admin role.
Tested with printing sales order with the 'f&b espana sales' role for which printing a sales order before did not show the logo + reported an error to the application log. After applying this fix this use case works fine.
Code change adds adminMode calls around the property access of the Image object also to allows this even in case the user/role used to call this code does not have direct access the ad_image entity.
2011-11-12 15:47   
Repository: erp/devel/pi
Changeset: 2532ebd3c0b982d6bff7fc63eb2b8de0c17143a8
Author: Antonio Moreno <antonio.moreno <at>>
Date: Thu Nov 10 16:11:30 2011 +0100
URL: [^]

Fixed issue 19026. Images will be read correctly when the role doesn't have access to the Image window.

M src/org/openbravo/erpCommon/utility/
2011-11-12 15:49   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: [^]

Maturity status: Test
2011-11-12 16:04   
re-closing: has been reopened only because of code-line merge during mp5 release.