diff --git a/src-db/database/model/functions/C_LOCATION_GETIDENTIFIER.xml b/src-db/database/model/functions/C_LOCATION_GETIDENTIFIER.xml
new file mode 100644
index 0000000000..30d499673a
--- /dev/null
+++ b/src-db/database/model/functions/C_LOCATION_GETIDENTIFIER.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+  <database name="FUNCTION C_LOCATION_GETIDENTIFIER">
+    <function name="C_LOCATION_GETIDENTIFIER" type="VARCHAR" volatility="IMMUTABLE">
+      <parameter name="p_address1" type="VARCHAR" mode="in">
+        <default/>
+      </parameter>
+      <parameter name="p_address2" type="VARCHAR" mode="in">
+        <default/>
+      </parameter>
+      <parameter name="p_postal" type="VARCHAR" mode="in">
+        <default/>
+      </parameter>
+      <parameter name="p_city" type="VARCHAR" mode="in">
+        <default/>
+      </parameter>
+      <parameter name="p_region" type="VARCHAR" mode="in">
+        <default/>
+      </parameter>
+      <parameter name="p_country" type="VARCHAR" mode="in">
+        <default/>
+      </parameter>
+      <body><![CDATA[/*************************************************************************
+* The contents of this file are subject to the Openbravo  Public  License
+* Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+* Version 1.1  with a permitted attribution clause; you may not  use this
+* file except in compliance with the License. You  may  obtain  a copy of
+* the License at http://www.openbravo.com/legal/license.html
+* Software distributed under the License  is  distributed  on  an "AS IS"
+* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+* License for the specific  language  governing  rights  and  limitations
+* under the License.
+* The Original Code is Openbravo ERP.
+* The Initial Developer of the Original Code is Openbravo SLU
+* All portions are Copyright (C) 2021 Openbravo SLU
+* All Rights Reserved.
+* Contributor(s):  ______________________________________.
+************************************************************************/
+/*************************************************************************
+* Title: Return the identifier of the location concatenating the main columns:
+*    address1, address2, postal, city, c_region_id and c_country_id
+*
+* This function is immutable as it only depends on defined parameters
+* instead of stored data.
+************************************************************************/
+BEGIN
+  RETURN COALESCE(p_address1, '') || ' - ' || COALESCE(p_address2, '') || ' - ' || COALESCE(p_postal, '') || ' - ' || COALESCE(p_city, '') || ' - ' || COALESCE(p_region, '') || ' - ' || COALESCE(p_country, '');
+END C_LOCATION_GETIDENTIFIER
+]]></body>
+    </function>
+  </database>
diff --git a/src-db/database/model/tables/C_LOCATION.xml b/src-db/database/model/tables/C_LOCATION.xml
index e7c99d2792..00a8e116c1 100644
--- a/src-db/database/model/tables/C_LOCATION.xml
+++ b/src-db/database/model/tables/C_LOCATION.xml
@@ -84,6 +84,9 @@
       <foreign-key foreignTable="C_REGION" name="C_REGION_LOCATION">
         <reference local="C_REGION_ID" foreign="C_REGION_ID"/>
       </foreign-key>
+      <index name="C_LOCATION_IDENTIFIER" unique="false">
+        <index-column name="functionBasedColumn" functionExpression="C_LOCATION_GETIDENTIFIER(ADDRESS1,ADDRESS2,POSTAL,CITY,C_REGION_ID,C_COUNTRY_ID)"/>
+      </index>
       <check name="C_LOCATION_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
