Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0022131
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] 01. General setupmajoralways2012-10-29 11:182012-11-20 20:53
ReportercaristuView Statuspublic 
Assigned Toshankarb 
PriorityurgentResolutionfixedFixed in Version3.0MP18
StatusclosedFix in branchpiFixed in SCM revision13c3d71a21b2
ProjectionnoneETAnoneTarget Version3.0MP18
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionpiSCM revision 
Merge Request Status
Review Assigned Todbaz
OBNetwork customerOBPS
Web browser
ModulesCore
Support ticket17688
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0022131: AD_Tab_Access for inactive tabs is causing javascript errors

DescriptionIf we mark as inactive a tab that is included in the tab_access for a particular role causes the following error when accessing to the window that includes the tab: "Cannot read property 'viewForm' of null"

In same cases this error prohibits the access to the window when accessing a second time.
Steps To Reproduce- As group admin role, go to the [Role] window
- Create a record in [Window Access] tab for an specific role (i.e Sales Role) and for an specific window (i.e Business Partner).
- Add a record in [Tab Access] window for any tab in Business Partner Window (i.e Customer)
- Go as a System Administrator and set Active = 'N' for the tab Customer in Business Partner Window.
- Log in as Sales Role and navigate to the Business Partner Window. The following javascript error is thrown (use Google Chrome Developer Tools): "Uncaught TypeError: Cannot read property 'viewForm' of null "
Proposed SolutionThis error is caused in the following line of the ob-standard-window.js file:

for (i = 0; i < view.viewForm.getFields().length; i++) {

view in null, because we are assigning its value with the following statement:

view = this.getView(tab.tabId);

we can't get the tab view because is set as inactive.

This problem is solved if we just add a condition to check if view is null before accesing to its fields:

if (view != null){
  for (i = 0; i < view.viewForm.getFields().length; i++) {
  ....
  
}
TagsNo tags attached.
Attached Filesdiff file icon FixIssue22131.diff [^] (4,550 bytes) 2012-11-08 14:34 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0054353)
dbaz (viewer)
2012-11-20 20:53

Reviewed @ changeset: 18577 - 776d5accc58d

- Issue History
Date Modified Username Field Change
2012-10-29 11:18 caristu New Issue
2012-10-29 11:18 caristu Assigned To => dmiguelez
2012-10-29 11:18 caristu Modules => Core
2012-10-29 11:18 caristu OBNetwork customer => Yes
2012-10-29 11:18 caristu Support ticket => 17688
2012-10-29 11:18 caristu Resolution time => 1354230000
2012-10-29 11:18 caristu Issue Monitored: networkb
2012-10-29 11:23 dmiguelez Assigned To dmiguelez => jonalegriaesarte
2012-10-29 11:46 jonalegriaesarte Assigned To jonalegriaesarte => AugustoMauch
2012-11-08 11:15 shankarb Assigned To AugustoMauch => shankarb
2012-11-08 14:34 shankarb File Added: FixIssue22131.diff
2012-11-12 15:58 shankarb Review Assigned To => dbaz
2012-11-12 15:58 shankarb Issue Monitored: dbaz
2012-11-12 15:59 shankarb Status new => scheduled
2012-11-12 15:59 shankarb fix_in_branch => pi
2012-11-12 15:59 shankarb Status scheduled => resolved
2012-11-12 15:59 shankarb Fixed in Version => pi
2012-11-12 15:59 shankarb Fixed in SCM revision => https://code.openbravo.com/erp/devel/pi/rev/13c3d71a21b2 [^]
2012-11-12 15:59 shankarb Resolution open => fixed
2012-11-20 20:53 dbaz Note Added: 0054353
2012-11-20 20:53 dbaz Status resolved => closed
2012-11-20 20:53 dbaz Fixed in Version pi => 3.0MP18


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker