Skip to content

EspoCRM – Open Source CRM Application

do not allow to combing sub fields and main field in detail layout

Yuri Kuznetsovde92d50386b9
diff --git a/application/Espo/Core/Utils/Metadata/BuilderHelper.php b/application/Espo/Core/Utils/Metadata/BuilderHelper.php
index 2e8a7377e7..138b39dd84 100644
--- a/application/Espo/Core/Utils/Metadata/BuilderHelper.php
+++ b/application/Espo/Core/Utils/Metadata/BuilderHelper.php
@@ -103,6 +103,13 @@ class BuilderHelper
$subName = Util::getNaming($field, $subField, $naming);
$output[$subName] = array_merge($copiedParams, $subParams);
+
+ // A trick to allow some fields to be combined with the main field.
+ if (array_key_exists('detailLayoutIncompatibleFieldList', $output[$subName])) {
+ continue;
+ }
+
+ $output[$subName]['detailLayoutIncompatibleFieldList'] = [$field];
}
return $output;
diff --git a/application/Espo/Resources/metadata/fields/address.json b/application/Espo/Resources/metadata/fields/address.json
index dce3ee270f..be634b3284 100644
--- a/application/Espo/Resources/metadata/fields/address.json
+++ b/application/Espo/Resources/metadata/fields/address.json
@@ -50,7 +50,8 @@
"provider": "Google",
"height": 300,
"exportDisabled": true,
- "importDisabled": true
+ "importDisabled": true,
+ "detailLayoutIncompatibleFieldList": []
}
},
"params": [
diff --git a/application/Espo/Resources/metadata/fields/currency.json b/application/Espo/Resources/metadata/fields/currency.json
index e98104f2a6..b4083b5475 100644
--- a/application/Espo/Resources/metadata/fields/currency.json
+++ b/application/Espo/Resources/metadata/fields/currency.json
@@ -85,7 +85,8 @@
"type": "currencyConverted",
"readOnly": true,
"importDisabled": true,
- "customizationInlineEditDisabledDisabled": true
+ "customizationInlineEditDisabledDisabled": true,
+ "detailLayoutIncompatibleFieldList": []
}
},
"converterClassName": "Espo\\Core\\Utils\\Database\\Orm\\FieldConverters\\Currency",