diff --git a/application/Espo/Modules/Crm/Resources/metadata/app/language.json b/application/Espo/Modules/Crm/Resources/metadata/app/language.json index 91418b3545..d69cfbea66 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/app/language.json +++ b/application/Espo/Modules/Crm/Resources/metadata/app/language.json @@ -4,6 +4,10 @@ "scope": "Opportunity", "field": "leadSource" }, + "Account.options.industry": { + "scope": "Lead", + "field": "industry" + }, "Meeting": { "scope": "Call" } diff --git a/application/Espo/Modules/Crm/Resources/metadata/app/metadata.json b/application/Espo/Modules/Crm/Resources/metadata/app/metadata.json index abd8525b1d..67e977aefe 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/app/metadata.json +++ b/application/Espo/Modules/Crm/Resources/metadata/app/metadata.json @@ -3,6 +3,10 @@ "entityDefs.Lead.fields.source.options": { "scope": "Opportunity", "field": "leadSource" + }, + "entityDefs.Account.fields.industry.options": { + "scope": "Lead", + "field": "industry" } }, "frontendHiddenPathList": [ diff --git a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json index 6b62b5279c..49c37df792 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json +++ b/application/Espo/Modules/Crm/Resources/metadata/entityDefs/Lead.json @@ -66,6 +66,8 @@ "type": "enum", "view": "crm:views/lead/fields/industry", "customizationOptionsDisabled": true, + "optionsPath": "entityDefs.Account.fields.industry.options", + "translation": "Account.options.industry", "default": "", "isSorted": true }, diff --git a/client/modules/crm/src/views/lead/fields/industry.js b/client/modules/crm/src/views/lead/fields/industry.js index 3cc27ce3fd..b58e1ca880 100644 --- a/client/modules/crm/src/views/lead/fields/industry.js +++ b/client/modules/crm/src/views/lead/fields/industry.js @@ -26,17 +26,7 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -Espo.define('crm:views/lead/fields/industry', 'views/fields/enum', function (Dep) { - - return Dep.extend({ - - setup: function () { - this.params.options = this.getMetadata().get('entityDefs.Account.fields.industry.options'); - this.params.translation = 'Account.options.industry'; - - Dep.prototype.setup.call(this); - } - - }); +define('crm:views/lead/fields/industry', ['views/fields/enum'], function (Dep) { + return Dep.extend({}); });