Merge pull request #13523 from bb2a/patch-2

add  in default search
This commit is contained in:
Laurent Destailleur 2020-04-10 12:12:28 +02:00 committed by GitHub
commit 0845f0bcd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 1 deletions

View File

@ -106,6 +106,9 @@ $fieldstosearchall = array(
'd.address'=>'Address',
'd.zip'=>'Zip',
'd.town'=>'Town',
'd.phone'=>"Phone",
'd.phone_perso'=>"PhonePerso",
'd.phone_mobile'=>"PhoneMobile"?
'd.note_public'=>'NotePublic',
'd.note_private'=>'NotePrivate',
);

View File

@ -143,6 +143,8 @@ $fieldstosearchall = array(
'pd.description'=>'Description',
's.nom'=>"ThirdParty",
's.name_alias'=>"AliasNameShort",
's.zip'=>"Zip",
's.town'=>"Town",
'p.note_public'=>'NotePublic',
);
if (empty($user->socid)) $fieldstosearchall["p.note_private"] = "NotePrivate";

View File

@ -127,6 +127,8 @@ $fieldstosearchall = array(
'pd.description'=>'Description',
's.nom'=>"ThirdParty",
's.name_alias'=>"AliasNameShort",
's.zip'=>"Zip",
's.town'=>"Town",
'c.note_public'=>'NotePublic',
);
if (empty($user->socid)) $fieldstosearchall["c.note_private"] = "NotePrivate";

View File

@ -160,6 +160,9 @@ $fieldstosearchall = array(
'f.ref_client'=>'RefCustomer',
'pd.description'=>'Description',
's.nom'=>"ThirdParty",
's.name_alias'=>"AliasNameShort",
's.zip'=>"Zip",
's.town'=>"Town",
'f.note_public'=>'NotePublic',
);
if (empty($user->socid)) $fieldstosearchall["f.note_private"] = "NotePrivate";

View File

@ -154,6 +154,9 @@ $fieldstosearchall = array(
'p.email'=>'EMail',
's.nom'=>"ThirdParty",
'p.phone'=>"Phone",
'p.phone_perso'=>"PhonePerso",
'p.phone_mobile'=>"PhoneMobile",
'p.fax'=>"Fax",
'p.note_public'=>"NotePublic",
'p.note_private'=>"NotePrivate",
);

View File

@ -96,7 +96,12 @@ foreach ($object->fields as $key => $val)
}
// List of fields to search into when doing a "search in all"
$fieldstosearchall = array();
$fieldstosearchall = array(
's.nom'=>"ThirdParty",
's.name_alias'=>"AliasNameShort",
's.zip'=>"Zip",
's.town'=>"Town",
);
foreach ($object->fields as $key => $val)
{
if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label'];