To solve this problem, edit on your module the file: vtigerinstallation_path\modules\module_name\views\Detail.php comment all lines inside the function public function getHeaderScripts(Vtiger_Request $request) { }
but not comment the function.
Example: Disable editing on service module.
public function getHeaderScripts(Vtiger_Request $request) {
// I will to comment from here
/*
parent::getHeaderScripts($request);
$headerScriptInstances = parent::getHeaderScripts($request);
$moduleName = $request->getModule();
$modulePopUpFile = 'modules.'.$moduleName.'.resources.Edit';
unset($headerScriptInstances[$modulePopUpFile]);
$jsFileNames = array(
'modules.Products.resources.Edit',
);
$jsFileNames[] = $modulePopUpFile;
$jsScriptInstances = $this->checkAndConvertJsScripts($jsFileNames);
$headerScriptInstances = array_merge($headerScriptInstances, $jsScriptInstances);
return $headerScriptInstances;
*/
//to here
}
// I will to comment from here
/*
parent::getHeaderScripts($request);
$headerScriptInstances = parent::getHeaderScripts($request);
$moduleName = $request->getModule();
$modulePopUpFile = 'modules.'.$moduleName.'.resources.Edit';
unset($headerScriptInstances[$modulePopUpFile]);
$jsFileNames = array(
'modules.Products.resources.Edit',
);
$jsFileNames[] = $modulePopUpFile;
$jsScriptInstances = $this->checkAndConvertJsScripts($jsFileNames);
$headerScriptInstances = array_merge($headerScriptInstances, $jsScriptInstances);
return $headerScriptInstances;
*/
//to here
}
Now you can't edit the fields from details view.
Best regards.
Update:
Another way by Anonymous
On the showModuleDetailView function. I erased few lines, just to show that I comment the