diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang
index 8b380645f73..31639d0b6b1 100644
--- a/htdocs/langs/en_US/projects.lang
+++ b/htdocs/langs/en_US/projects.lang
@@ -207,3 +207,4 @@ OppStatusPENDING=Pending
OppStatusWON=Won
OppStatusLOST=Lost
Budget=Budget
+AllowToLinkFromOtherCompany=Allow to link project from other company
Supported values :
- "all" : Link all projects
- A list of thirdparty id separated with commas : Link all projects with these thirdparty defined
Example : 11524,4795,53
N.B.: Leave empty to disable this configuration
diff --git a/htdocs/projet/admin/project.php b/htdocs/projet/admin/project.php
index 744e52e0f2f..92646bab75a 100644
--- a/htdocs/projet/admin/project.php
+++ b/htdocs/projet/admin/project.php
@@ -274,6 +274,12 @@ elseif ($action == 'updateoptions')
}
}
}
+else if ($action == "linkOtherCompany")
+{
+ $projectToSelect = GETPOST('projectToSelect');
+
+ dolibarr_set_const($db, 'PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY', $projectToSelect, 'chaine', 0, '', $conf->entity); //Allow to disable this configuration if empty value
+}
/*
@@ -912,16 +918,20 @@ print '';
print '