Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028761Openbravo ERPA. Platformpublic2015-01-26 10:012015-02-27 12:43
jecharri 
inigosanchez 
urgentmajoralways
closedfixed 
5
 
3.0PR15Q2 
AugustoMauch
Google Chrome
Core
No
0028761: Navigate to read only logic tab does not work an empty tab is displayed
Navigate to read only logic tab does not work an empty tab is displayed
-Go to ERP
-Mark the role that you are using as tab Product not editable (role -> window access -> product -> not editable)
-Go to sales order window
-Go to line and press right button and select "open on tab"
-You will be redirect to product tab but the header will be empty
-Only child tabs will have values
No tags attached.
related to defect 00168413.0MP0 closed shuehner It is possible to click New in Audit Trail 
related to defect 0017441 closed guilleaer 'No data in grid. Create One' still shown when tab is writable in general but current user/role has only readonly access 
png empty.png (110,463) 2015-01-26 10:01
https://issues.openbravo.com/file_download.php?file_id=7738&type=bug
png
Issue History
2015-01-26 10:01jecharriNew Issue
2015-01-26 10:01jecharriAssigned To => AugustoMauch
2015-01-26 10:01jecharriFile Added: empty.png
2015-01-26 10:01jecharriWeb browser => Google Chrome
2015-01-26 10:01jecharriModules => Core
2015-01-26 10:01jecharriResolution time => 1425078000
2015-01-26 10:01jecharriTriggers an Emergency Pack => No
2015-01-26 10:12eugeniIssue Monitored: eugeni
2015-01-29 10:12alostaleStatusnew => acknowledged
2015-02-05 10:42alostaleAssigned ToAugustoMauch => inigosanchez
2015-02-05 10:42alostaleStatusacknowledged => scheduled
2015-02-05 10:42alostalefix_in_branch => pi
2015-02-05 11:47dbazIssue Monitored: dbaz
2015-02-19 10:03inigosanchezReview Assigned To => AugustoMauch
2015-02-19 10:03inigosanchezWeb browserGoogle Chrome => Google Chrome
2015-02-19 10:03inigosanchezResolutionopen => fixed
2015-02-19 10:03inigosanchezfix_in_branchpi =>
2015-02-19 10:04inigosanchezIssue Monitored: AugustoMauch
2015-02-19 10:05hgbotCheckin
2015-02-19 10:05hgbotNote Added: 0074641
2015-02-19 10:05hgbotStatusscheduled => resolved
2015-02-19 10:05hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/00eaadc3ade7bdd01fbef1cd73089139c038f70e [^]
2015-02-19 10:06inigosanchezNote Added: 0074642
2015-02-19 10:07inigosanchezRelationship addedrelated to 0016841
2015-02-19 10:07inigosanchezRelationship addedrelated to 0017441
2015-02-19 10:12inigosanchezNote Edited: 0074642bug_revision_view_page.php?bugnote_id=0074642#r7709
2015-02-23 05:11hudsonbotCheckin
2015-02-23 05:11hudsonbotNote Added: 0074787
2015-02-27 12:43AugustoMauchNote Added: 0075030
2015-02-27 12:43AugustoMauchStatusresolved => closed

Notes
(0074641)
hgbot   
2015-02-19 10:05   
Repository: erp/devel/pi
Changeset: 00eaadc3ade7bdd01fbef1cd73089139c038f70e
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Thu Feb 19 10:03:12 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/00eaadc3ade7bdd01fbef1cd73089139c038f70e [^]

Fixed issue 28761: A tab will be empty when the user role has readOnly access

The problem was that if a user role has readOnly access to a particular tab and this tab is
opened by using "open on tab", an empty tab is displayed. This problem was because there was
a invalidate cache between a request to the datasource and receipt of the answer.


The cache invalidation occurred because refreshContents() were called in "setReadOnlyMode".
This cache invalidation generated a bad behaviour for displaying the tab.

To check this, It has been obtained a trace of the functions that are invoked. Briefly, after
each call to the DataSource it must be seen as the data arrives (arrives in fetchRemoteDataReply())
 without invalidating cache. It should be noted, in the first call to DataSource we can find an
invalidateCache (main problem):

*** 2 *** Run invalidateCache() for isc_OBViewGrid_7. (ResultSet.js)
*** 1 *** Call to DataSource: sendDSRequest for isc_OBViewGrid_7. (DataSource.js)
*** 2 *** Run invalidateCache() for isc_OBViewGrid_7. (ResultSet.js)
*** 1 *** Call to DataSource: sendDSRequest for isc_OBViewGrid_7. (DataSource.js)
*** 3 *** Run fetchRemoteDataReply() for isc_OBViewGrid_7. (ResultSet.js).
It has been detected that the cache is invalidated. (ResultSet.js)
*** 3 *** Run fetchRemoteDataReply() for isc_OBViewGrid_7. (ResultSet.js)

To avoid this problem, it has been deleted method refresContent() in method setReadOnlyMode() because
it was not necessary. This action avoids the invalidation of the cache.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0074642)
inigosanchez   
2015-02-19 10:06   
(edited on: 2015-02-19 10:12)
Test related issues [16841] and [17441]:
It has been checked the issues that created and modified the setReadOnlyMode() function. It has been verified that works fine by testing with:
- User/role readOnly access to a product tab.
- Product tab UI Pattern: readOnly.
- Both.

(0074787)
hudsonbot   
2015-02-23 05:11   
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/6856352d7235 [^]
Maturity status: Test
(0075030)
AugustoMauch   
2015-02-27 12:43   
Code reviewed and verified in pi@60961105cec1