diff --git a/htdocs/don/list.php b/htdocs/don/list.php
index 83e1db184a557fb42f2cd2ffa41da3ccedb242d6..3db04cdb7cca968287731201e829c726ea034f24 100644
--- a/htdocs/don/list.php
+++ b/htdocs/don/list.php
@@ -79,6 +79,7 @@ $fieldstosearchall = array(
  * View
  */
 
+$form=new Form($db);
 if (! empty($conf->projet->enabled)) $projectstatic=new Project($db);
 
 llxHeader('',$langs->trans("Donations"),'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones');
diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php
index ccd10d7c550ce48432ed75513abe234159d690f0..36dfb1db55e423238dd21b37c20066091be64138 100644
--- a/htdocs/expedition/list.php
+++ b/htdocs/expedition/list.php
@@ -76,6 +76,7 @@ $fieldstosearchall = array(
  * View
  */
 
+$form=new Form($db);
 $companystatic=new Societe($db);
 $shipment=new Expedition($db);
 
diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php
index a3e0d8c9c33515de7398fee3b1c7e36b5d654020..9f99df55adde3de6a01c07df6833a115ca46aaf5 100644
--- a/htdocs/fourn/commande/list.php
+++ b/htdocs/fourn/commande/list.php
@@ -93,6 +93,7 @@ if (empty($user->socid)) $fieldstosearchall["cf.note_private"]="NotePrivate";
  *	View
  */
 
+$form=new Form($db);
 $thirdpartytmp = new Fournisseur($db);
 $commandestatic=new CommandeFournisseur($db);
 $formfile = new FormFile($db);
diff --git a/htdocs/index.php b/htdocs/index.php
index 6058e5a70c83909ee700855e4c12952400abbf88..0b6bbbbc4a91b13938ef054919d2a7d944e1184e 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -65,6 +65,8 @@ if (GETPOST('addbox'))	// Add box (when submit is done from a form when ajax dis
  * View
  */
 
+if (! is_object($form)) $form=new Form($db);
+
 // Title
 $title=$langs->trans("HomeArea").' - Dolibarr '.DOL_VERSION;
 if (! empty($conf->global->MAIN_APPLICATION_TITLE)) $title=$langs->trans("HomeArea").' - '.$conf->global->MAIN_APPLICATION_TITLE;
diff --git a/htdocs/install/mysql/data/llx_c_payment_term.sql b/htdocs/install/mysql/data/llx_c_payment_term.sql
index 1e61b31a2b83e74b1256b86159e1df41e20bbc2d..68aae57ff4fbf8bf7257c50eb1eca24d2777db1e 100644
--- a/htdocs/install/mysql/data/llx_c_payment_term.sql
+++ b/htdocs/install/mysql/data/llx_c_payment_term.sql
@@ -27,11 +27,11 @@
 -- de l'install et tous les sigles '--' sont supprimés.
 --
 
-insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (1,'RECEP',       1,1, 'A réception de facture','Réception de facture',0,0);
+insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (1,'RECEP',       1,1, 'A réception de facture','Réception de facture',0,1);
 insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (2,'30D',         2,1, '30 jours','Réglement à 30 jours',0,30);
 insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (3,'30DENDMONTH', 3,1, '30 jours fin de mois','Réglement à 30 jours fin de mois',1,30);
 insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (4,'60D',         4,1, '60 jours','Réglement à 60 jours',0,60);
 insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (5,'60DENDMONTH', 5,1, '60 jours fin de mois','Réglement à 60 jours fin de mois',1,60);
-insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (6,'PT_ORDER',    6,1, 'A réception de commande','A réception de commande',0,0);
-insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (7,'PT_DELIVERY', 7,1, 'Livraison','Règlement à la livraison',0,0);
-insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (8,'PT_5050',     8,1, '50 et 50','Règlement 50% à la commande, 50% à la livraison',0,0);
+insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (6,'PT_ORDER',    6,1, 'A réception de commande','A réception de commande',0,1);
+insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (7,'PT_DELIVERY', 7,1, 'Livraison','Règlement à la livraison',0,1);
+insert into llx_c_payment_term(rowid, code, sortorder, active, libelle, libelle_facture, fdm, nbjour) values (8,'PT_5050',     8,1, '50 et 50','Règlement 50% à la commande, 50% à la livraison',0,1);
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 1127b6dc5cfae183ccaf36a0a1ff9a6f47ad0e81..07a6ae7dc8cc7064a9f9834eaf9495f4a5823b90 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -1445,7 +1445,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
 	    // Show menu entries
     	print '<div id="tmenu_tooltip'.(empty($conf->global->MAIN_MENU_INVERT)?'':'invert').'" class="tmenu">'."\n";
 	    $menumanager->atarget=$target;
-	    $menumanager->showmenu('top');      // This contains a \n
+	    $menumanager->showmenu('top', array('searchform'=>$searchform, 'bookmarks'=>$bookmarks));      // This contains a \n
 	    print "</div>\n";
 
 	    //$form=new Form($db);
@@ -1609,7 +1609,7 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra
 
 	    print "\n";
 
-	    if ($conf->use_javascript_ajax && $conf->browser->layout != 'phone')
+	    if ($conf->use_javascript_ajax && $conf->browser->layout != 'phone' && empty($conf->global->MAIN_USE_OLD_SEARCH_FORM))
 	    {
     	    if (! is_object($form)) $form=new Form($db);
     	    $selected=-1;
@@ -1655,7 +1655,7 @@ function left_menu($menu_array_before, $helppagename='', $notused='', $menu_arra
     	        $searchform.=printSearchForm(DOL_URL_ROOT.'/user/list.php', DOL_URL_ROOT.'/user/list.php', $langs->trans("Users"), 'user', 'sall', 'M', 'searchleftuser', img_object('','user'));
     	    }
 	    }
-        
+  
 	    // Execute hook printSearchForm
 	    $parameters=array('searchform'=>$searchform);
 	    $reshook=$hookmanager->executeHooks('printSearchForm',$parameters);    // Note that $action and $object may have been modified by some hooks