diff --git a/layouts/v7/modules/Campaigns/RelatedList.tpl b/layouts/v7/modules/Campaigns/RelatedList.tpl
index 9b0ee10034af5fa915f0db8fa115fe82260f6e67..c3a57d6f7c034ab0d0dae2292058762589f19edb 100644
--- a/layouts/v7/modules/Campaigns/RelatedList.tpl
+++ b/layouts/v7/modules/Campaigns/RelatedList.tpl
@@ -18,7 +18,7 @@
 			<input type="hidden" name="emailEnabledModules" value=true />
 			<input type="hidden" id="view" value="{$VIEW}" />
 			<input type="hidden" name="currentPageNum" value="{$PAGING->getCurrentPage()}" />
-			<input type="hidden" name="relatedModuleName" class="relatedModuleName" value="{$RELATED_MODULE->get('name')}" />
+			<input type="hidden" name="relatedModuleName" class="relatedModuleName" value="{$RELATED_MODULE_NAME}" />
 			<input type="hidden" value="{$ORDER_BY}" id="orderBy">
 			<input type="hidden" value="{$SORT_ORDER}" id="sortOrder">
 			<input type="hidden" value="{$RELATED_ENTIRES_COUNT}" id="noOfEntries">
@@ -124,7 +124,7 @@
 												<i class="fa fa-sort customsort"></i>
 											{/if}
 											&nbsp;
-											{vtranslate($HEADER_FIELD->get('label'), $RELATED_MODULE->get('name'))}
+											{vtranslate($HEADER_FIELD->get('label'), $RELATED_MODULE_NAME)}
 											&nbsp;{if $COLUMN_NAME eq $HEADER_FIELD->get('column')}<img class="{$SORT_IMAGE}">{/if}&nbsp;
 										</a>
 										{if $COLUMN_NAME eq $HEADER_FIELD->get('column')}
@@ -133,7 +133,7 @@
 									</th>
 								{/foreach}
 								<th class="nowrap">
-									<a href="javascript:void(0);" class="listViewContentHeaderValues noSorting">{vtranslate('Status', $RELATED_MODULE->get('name'))}</a>
+									<a href="javascript:void(0);" class="listViewContentHeaderValues noSorting">{vtranslate('Status', $RELATED_MODULE_NAME)}</a>
 								</th>
 							</tr>
 							<tr class="searchRow">
diff --git a/layouts/v7/modules/PriceBooks/RelatedList.tpl b/layouts/v7/modules/PriceBooks/RelatedList.tpl
index ccd5375e7a4cc72a28471c4cb34994c84782d916..d49874833f1e52158b92783053d61b7d6c1cc848 100644
--- a/layouts/v7/modules/PriceBooks/RelatedList.tpl
+++ b/layouts/v7/modules/PriceBooks/RelatedList.tpl
@@ -9,12 +9,13 @@
 {* modules/PriceBooks/views/Detail.php *}
 
 {strip}
-	{if $RELATED_MODULE->get('name') neq 'Products' && $RELATED_MODULE->get('name') neq 'Services'}
+	{assign var=RELATED_MODULE_NAME value=$RELATED_MODULE->get('name')}
+	{if $RELATED_MODULE_NAME neq 'Products' && $RELATED_MODULE_NAME neq 'Services'}
 		{include file='RelatedList.tpl'|vtemplate_path:'Vtiger'}
 	{else}
 		<div class="relatedContainer">
 			<input type="hidden" name="currentPageNum" value="{$PAGING->getCurrentPage()}" />
-			<input type="hidden" name="relatedModuleName" class="relatedModuleName" value="{$RELATED_MODULE->get('name')}" />
+			<input type="hidden" name="relatedModuleName" class="relatedModuleName" value="{$RELATED_MODULE_NAME}" />
 			<input type="hidden" value="{$ORDER_BY}" id="orderBy">
 			<input type="hidden" value="{$SORT_ORDER}" id="sortOrder">
 			<input type="hidden" value="{$RELATED_ENTIRES_COUNT}" id="noOfEntries">
@@ -33,7 +34,7 @@
 								</th>
 								{foreach item=HEADER_FIELD from=$RELATED_HEADERS}
 									<th nowrap {if $HEADER_FIELD@last} {/if}>
-										<a href="javascript:void(0);" class="listViewContentHeaderValues" data-nextsortorderval="{if $COLUMN_NAME eq $HEADER_FIELD->get('name')}{$NEXT_SORT_ORDER}{else}ASC{/if}" data-fieldname="{$HEADER_FIELD->get('name')}">{vtranslate($HEADER_FIELD->get('label'), $RELATED_MODULE->get('name'))}
+										<a href="javascript:void(0);" class="listViewContentHeaderValues" data-nextsortorderval="{if $COLUMN_NAME eq $HEADER_FIELD->get('name')}{$NEXT_SORT_ORDER}{else}ASC{/if}" data-fieldname="{$HEADER_FIELD->get('name')}">{vtranslate($HEADER_FIELD->get('label'), $RELATED_MODULE_NAME)}
 											{if $COLUMN_NAME eq $HEADER_FIELD->get('column')}
 												<i class="fa fa-sort {$FASORT_IMAGE}"></i>
 											{else}
diff --git a/layouts/v7/modules/Vtiger/RelatedList.tpl b/layouts/v7/modules/Vtiger/RelatedList.tpl
index a66ff70ec94b99d6993fd83f433c97114b7e49e6..eb81218a7df2b53e31099a3c1a427aa29ae3f1a7 100644
--- a/layouts/v7/modules/Vtiger/RelatedList.tpl
+++ b/layouts/v7/modules/Vtiger/RelatedList.tpl
@@ -46,7 +46,7 @@
 								{else}
 									<th class="nowrap">
 									{if $HEADER_FIELD->get('column') eq "access_count" or $HEADER_FIELD->get('column') eq "idlists"}
-										<a href="javascript:void(0);" class="noSorting">{vtranslate($HEADER_FIELD->get('label'), $RELATED_MODULE->get('name'))}</a>
+										<a href="javascript:void(0);" class="noSorting">{vtranslate($HEADER_FIELD->get('label'), $RELATED_MODULE_NAME)}</a>
 									{else}
 										<a href="javascript:void(0);" class="listViewContentHeaderValues" data-nextsortorderval="{if $COLUMN_NAME eq $HEADER_FIELD->get('column')}{$NEXT_SORT_ORDER}{else}ASC{/if}" data-fieldname="{$HEADER_FIELD->get('column')}">
 											{if $COLUMN_NAME eq $HEADER_FIELD->get('column')}
@@ -55,7 +55,7 @@
 												<i class="fa fa-sort customsort"></i>
 											{/if}
 											&nbsp;
-											{vtranslate($HEADER_FIELD->get('label'), $RELATED_MODULE->get('name'))}
+											{vtranslate($HEADER_FIELD->get('label'), $RELATED_MODULE_NAME)}
 											&nbsp;{if $COLUMN_NAME eq $HEADER_FIELD->get('column')}<img class="{$SORT_IMAGE}">{/if}&nbsp;
 										</a>
 										{if $COLUMN_NAME eq $HEADER_FIELD->get('column')}
@@ -86,7 +86,7 @@
 						<tr class="listViewEntries" data-id='{$RELATED_RECORD->getId()}' 
 							{if $RELATED_MODULE_NAME eq 'Calendar'}
 								data-recurring-enabled='{$RELATED_RECORD->isRecurringEnabled()}'
-								{assign var=DETAILVIEWPERMITTED value=isPermitted($RELATED_MODULE->get('name'), 'DetailView', $RELATED_RECORD->getId())}
+								{assign var=DETAILVIEWPERMITTED value=isPermitted($RELATED_MODULE_NAME, 'DetailView', $RELATED_RECORD->getId())}
 								{if $DETAILVIEWPERMITTED eq 'yes'}
 									data-recordUrl='{$RELATED_RECORD->getDetailViewUrl()}'
 								{/if}
@@ -121,7 +121,7 @@
 								{assign var=RELATED_LIST_VALUE value=$RELATED_RECORD->get($RELATED_HEADERNAME)}
 								<td class="relatedListEntryValues" title="{strip_tags($RELATED_RECORD->getDisplayValue($RELATED_HEADERNAME))}" data-field-type="{$HEADER_FIELD->getFieldDataType()}" nowrap>
 									<span class="value textOverflowEllipsis">
-										{if $RELATED_MODULE->get('name') eq 'Documents' && $RELATED_HEADERNAME eq 'document_source'}
+										{if $RELATED_MODULE_NAME eq 'Documents' && $RELATED_HEADERNAME eq 'document_source'}
 											<center>{$RELATED_RECORD->get($RELATED_HEADERNAME)}</center>
 											{else}
 												{if $HEADER_FIELD->isNameField() eq true or $HEADER_FIELD->get('uitype') eq '4'}
@@ -171,7 +171,7 @@
 											{else}
 												{$RELATED_RECORD->getDisplayValue($RELATED_HEADERNAME)}
 												{* Documents list view special actions "view file" and "download file" *}
-												{if $RELATED_MODULE_NAME eq 'Documents' && $RELATED_HEADERNAME eq 'filename' && isPermitted($RELATED_MODULE->get('name'), 'DetailView', $RELATED_RECORD->getId()) eq 'yes'}
+												{if $RELATED_MODULE_NAME eq 'Documents' && $RELATED_HEADERNAME eq 'filename' && isPermitted($RELATED_MODULE_NAME, 'DetailView', $RELATED_RECORD->getId()) eq 'yes'}
 													<span class="actionImages">
 														{assign var=RECORD_ID value=$RELATED_RECORD->getId()}
 														{assign var="DOCUMENT_RECORD_MODEL" value=Vtiger_Record_Model::getInstanceById($RECORD_ID)}