Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
related list different column depending on Parent module
#4
A quick a dirty Hack :


1.
in include/utils/ListViewUtils.php
function getListViewHeader

(line 60)

//Get the vtiger_tabid of the module
$tabid = getTabid($module);
$tabname = getParentTab();
global $current_user;

// MSL : different list as parent module
if (isset($focus->rellist_fields)) {
if (isset($focus->rellist_fields[$relatedmodule])) {
$focus->list_fields = $focus->rellist_fields[$relatedmodule];
$focus->list_fields_name = $focus->rellist_fields_name[$relatedmodule];
}
}


2. modify the <module>.php
after
"var $list_fields_name" declaration


Ex : (change correspondingly)
// MSL
var $rellist_fields = Array ('ProjectTask' =>
Array (
/* Format: Field Label => Array(tablename, columnname) */
// tablename should not have prefix 'vtiger_'
'Title'=> Array('candidates', 'title'),
'Expert'=> Array('candidates', 'expert'),
'Consultant'=> Array('candidates', 'consultant'),
'Proposed Fee'=> Array('candidates', 'amount'),
'Currency'=> Array('candidates', 'currency'),
'Assigned To' => Array('crmentity','smownerid')
)
);
var $rellist_fields_name = Array ('ProjectTask' =>
Array (
/* Format: Field Label => fieldname */
'Title'=> 'title',
'Expert' => 'expert',
'Consultant' => 'consultant',
'Proposed Fee' => 'amount',
'Currency' => 'currency',
'Assigned To' => 'assigned_user_id'
)
);
//----------------------------------------------------
Reply


Messages In This Thread
Re: related list different column depending on Parent module - saidmsl - 03-27-2015, 04:53 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)