Migrating from 6.5 to 7.9 - custom/module/Contacts doesn't work more

Hi,

we performed a migration from 6.5 to 7.9.

Our installation of sugar has a lot of custom modules, and fortunally all of this seems to work fine. The issue that we got instead is in the customization of Contacts module.

In custom/modules/Contacts/ we have a lot of scripts (js and php) that should be loaded in Contacts detail view as defined in custom/module/Contacts/metadata/detailviewdef.php

Here the piece of code where scripts are included:

$viewdefs['Contacts']['DetailView'] = array(
'templateMeta' =>
array(
'includes' =>
array(
0 =>
array(
'file' => 'modules/Leads/Lead.js',
),
1 =>
array(
'file' => 'custom/include/javascript/common.js',
),
2 =>
array(
'file' => 'custom/modules/Contacts/javascript/ContactsCustom.js',
),
3 =>
array(
'file' => 'custom/include/javascript/knockout-3.4.0.js',
),
4 =>
array(
'file' => 'custom/modules/Contacts/javascript/ContactsCustomApp.js',
),
5 =>
array(
'file' => 'custom/modules/Contacts/javascript/ContactsCustomViewModel.js',
),
6 =>
array(
'file' => 'custom/modules/Contacts/javascript/ContactsCustomModel.js',
),
),
...

According to http://support.sugarcrm.com/Knowledge_Base/Installation_Upgrade/Migrating_from_Sugar_6.x_to_7/#Metadata I have appended this piece of detailviewdef.php in clients/base/views/record/record.php but scripts are not loaded.

Can someone help me?