Fix: if you rename a module, rename all

This commit is contained in:
Regis Houssin 2010-05-10 04:50:39 +00:00
parent 9e092821dc
commit 635b44b906
29 changed files with 59 additions and 58 deletions

View File

@ -29,7 +29,7 @@
require("../main.inc.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formadmin.class.php");
require_once(DOL_DOCUMENT_ROOT."/html.formcompany.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formcompany.class.php");
$langs->load("other");
$langs->load("admin");
@ -235,7 +235,7 @@ $tabcond[10]= true;
$tabcond[11]= true;
$tabcond[12]= $conf->facture->enabled||$conf->fournisseur->enabled;
$tabcond[13]= $conf->facture->enabled||$conf->fournisseur->enabled;
$tabcond[14]= $conf->produit->enabled&&$conf->global->PRODUIT_USE_ECOTAXE;
$tabcond[14]= $conf->product->enabled&&$conf->global->PRODUIT_USE_ECOTAXE;
$tabcond[15]= true;
$tabcond[16]= $conf->societe->enabled;
$tabcond[17]= $conf->deplacement->enabled;

View File

@ -48,7 +48,7 @@ $modules = array(
$conditions = array(
'USER' => 1,
'SOCIETE' => $conf->societe->enabled,
'PRODUCTDESC' => ($conf->produit->enabled||$conf->service->enabled),
'PRODUCTDESC' => ($conf->product->enabled||$conf->service->enabled),
'MEMBER' => $conf->adherent->enabled,
'MAILING' => $conf->mailing->enabled,
'DETAILS' => ($conf->facture->enabled||$conf->propal->enabled||$conf->commande->enabled),

View File

@ -274,7 +274,7 @@ if ($_GET["action"] == 'create')
if ($conf->global->PRODUCT_SHOW_WHEN_CREATE)
{
print '<tr><td colspan="3">';
if ($conf->produit->enabled || $conf->service->enabled)
if ($conf->product->enabled || $conf->service->enabled)
{
$lib=$langs->trans("ProductsAndServices");

View File

@ -1758,7 +1758,7 @@ if ($id > 0 || ! empty($ref))
print '<td '.$colspan.'>';
print $html->select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1);
if ($conf->produit->enabled && $conf->service->enabled) print '<br>';
if ($conf->product->enabled && $conf->service->enabled) print '<br>';
// Editor wysiwyg
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
@ -1789,7 +1789,7 @@ if ($id > 0 || ! empty($ref))
print '</form>';
// Ajout de produits/services predefinis
if ($conf->produit->enabled || $conf->service->enabled)
if ($conf->product->enabled || $conf->service->enabled)
{
if ($conf->global->PRODUIT_USE_MARKUP)
{

View File

@ -1896,7 +1896,7 @@ else
else
{
print $html->select_type_of_lines($objp->product_type,'type',1);
if ($conf->produit->enabled && $conf->service->enabled) print '<br>';
if ($conf->product->enabled && $conf->service->enabled) print '<br>';
}
// Editor wysiwyg
@ -1992,7 +1992,7 @@ else
print '<td>';
print $html->select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1);
if ($conf->produit->enabled && $conf->service->enabled) print '<br>';
if ($conf->product->enabled && $conf->service->enabled) print '<br>';
// Editor wysiwyg
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
@ -2035,7 +2035,7 @@ else
print '</form>';
// Ajout de produits/services predefinis
if ($conf->produit->enabled || $conf->service->enabled)
if ($conf->product->enabled || $conf->service->enabled)
{
print '<tr class="liste_titre">';
print '<td colspan="3">';

View File

@ -2940,7 +2940,7 @@ else
else
{
print $html->select_type_of_lines($objp->product_type,'type',1);
if ($conf->produit->enabled && $conf->service->enabled) print '<br>';
if ($conf->product->enabled && $conf->service->enabled) print '<br>';
}
// Description - Editor wysiwyg
@ -3040,8 +3040,8 @@ else
print '<td>';
print $html->select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1);
if (($conf->produit->enabled && $conf->service->enabled)
|| (empty($conf->produit->enabled) && empty($conf->service->enabled))) print '<br>';
if (($conf->product->enabled && $conf->service->enabled)
|| (empty($conf->product->enabled) && empty($conf->service->enabled))) print '<br>';
// Editor wysiwyg
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
@ -3082,7 +3082,7 @@ else
// Predefined services/products form
if ($conf->produit->enabled || $conf->service->enabled)
if ($conf->product->enabled || $conf->service->enabled)
{
print '<tr class="liste_titre">';
print '<td colspan="3">';

View File

@ -459,8 +459,8 @@ class Form
global $db,$langs,$user,$conf;
// If product & services are enabled or both disabled.
if ($forceall || ($conf->produit->enabled && $conf->service->enabled)
|| (empty($conf->produit->enabled) && empty($conf->service->enabled)))
if ($forceall || ($conf->product->enabled && $conf->service->enabled)
|| (empty($conf->product->enabled) && empty($conf->service->enabled)))
{
if (empty($hidetext)) print $langs->trans("Type").': ';
print '<select class="flat" name="'.$htmlname.'">';
@ -482,11 +482,11 @@ class Form
print '</select>';
//if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
}
if (! $forceall && empty($conf->produit->enabled) && $conf->service->enabled)
if (! $forceall && empty($conf->product->enabled) && $conf->service->enabled)
{
print '<input type="hidden" name="'.$htmlname.'" value="1">';
}
if (! $forceall && $conf->produit->enabled && empty($conf->service->enabled))
if (! $forceall && $conf->product->enabled && empty($conf->service->enabled))
{
print '<input type="hidden" name="'.$htmlname.'" value="0">';
}

View File

@ -293,7 +293,7 @@ if ($modulepart)
{
$accessallowed=1;
}
if ($conf->produit->enabled) $original_file=$conf->produit->dir_output.'/'.$original_file;
if ($conf->product->enabled) $original_file=$conf->produit->dir_output.'/'.$original_file;
elseif ($conf->service->enabled) $original_file=$conf->service->dir_output.'/'.$original_file;
}

View File

@ -198,7 +198,7 @@ $userstatic = new User($db);
// Ajout rubriques automatiques
$rowspan=0;
$sectionauto=array();
if ($conf->produit->enabled || $conf->service->enabled) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'product', 'test'=>$conf->produit->enabled, 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts")); }
if ($conf->product->enabled || $conf->service->enabled) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'product', 'test'=>$conf->product->enabled, 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts")); }
if ($conf->societe->enabled) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsByThirdParties")); }
if ($conf->propal->enabled) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Prop"), 'desc'=>$langs->trans("ECMDocsByProposals")); }
if ($conf->contrat->enabled) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'contract','test'=>$conf->contrat->enabled, 'label'=>$langs->trans("Contracts"), 'desc'=>$langs->trans("ECMDocsByContracts")); }

View File

@ -104,7 +104,7 @@ $userstatic = new User($db);
// Ajout rubriques automatiques
$rowspan=0;
$sectionauto=array();
if ($conf->produit->enabled || $conf->service->enabled) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'product', 'test'=>$conf->produit->enabled, 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts")); }
if ($conf->product->enabled || $conf->service->enabled) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'product', 'test'=>$conf->product->enabled, 'label'=>$langs->trans("ProductsAndServices"), 'desc'=>$langs->trans("ECMDocsByProducts")); }
if ($conf->societe->enabled) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'company', 'test'=>$conf->societe->enabled, 'label'=>$langs->trans("ThirdParties"), 'desc'=>$langs->trans("ECMDocsByThirdParties")); }
if ($conf->propal->enabled) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'propal', 'test'=>$conf->propal->enabled, 'label'=>$langs->trans("Prop"), 'desc'=>$langs->trans("ECMDocsByProposals")); }
if ($conf->contrat->enabled) { $rowspan++; $sectionauto[]=array('level'=>1, 'module'=>'contract','test'=>$conf->contrat->enabled, 'label'=>$langs->trans("Contracts"), 'desc'=>$langs->trans("ECMDocsByContracts")); }

View File

@ -34,7 +34,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT."/product/class/html.formproduct.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/product.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/sendings.lib.php");
if ($conf->produit->enabled || $conf->service->enabled) require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
if ($conf->product->enabled || $conf->service->enabled) require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");
if ($conf->stock->enabled) require_once(DOL_DOCUMENT_ROOT."/product/stock/class/entrepot.class.php");

View File

@ -31,7 +31,7 @@ require_once(DOL_DOCUMENT_ROOT."/expedition/class/expedition.class.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/order.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/sendings.lib.php");
if ($conf->produit->enabled || $conf->service->enabled) require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
if ($conf->product->enabled || $conf->service->enabled) require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
if ($conf->projet->enabled) require_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php");
if ($conf->propal->enabled) require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
if ($conf->commande->enabled) require_once(DOL_DOCUMENT_ROOT."/commande/class/commande.class.php");

View File

@ -862,7 +862,7 @@ if ($id > 0 || ! empty($ref))
print '<tr '.$bc[$var].'>';
print '<td>';
print '<a name="'.$commandline->id.'"></a>'; // ancre pour retourner sur la ligne
if (($conf->produit->enabled || $conf->service->enabled) && $commandline->fk_product > 0)
if (($conf->product->enabled || $conf->service->enabled) && $commandline->fk_product > 0)
{
print '<a href="'.DOL_URL_ROOT.'/product/fournisseurs.php?id='.$commandline->product_id.'">';
print img_object($langs->trans('ShowProduct'),'product');
@ -874,7 +874,7 @@ if ($id > 0 || ! empty($ref))
else
{
print $html->select_type_of_lines($commandline->product_type,'type',1);
if ($conf->produit->enabled && $conf->service->enabled) print '<br>';
if ($conf->product->enabled && $conf->service->enabled) print '<br>';
}
// Description - Editor wysiwyg
@ -933,8 +933,8 @@ if ($id > 0 || ! empty($ref))
$forceall=1;
print $html->select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1,0,$forceall);
if ($forceall || ($conf->produit->enabled && $conf->service->enabled)
|| (empty($conf->produit->enabled) && empty($conf->service->enabled))) print '<br>';
if ($forceall || ($conf->product->enabled && $conf->service->enabled)
|| (empty($conf->product->enabled) && empty($conf->service->enabled))) print '<br>';
// Editor wysiwyg
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
@ -965,7 +965,7 @@ if ($id > 0 || ! empty($ref))
print '</form>';
// Ajout de produits/services predefinis
if ($conf->produit->enabled || $conf->service->enabled)
if ($conf->product->enabled || $conf->service->enabled)
{
print '<tr class="liste_titre">';
print '<td colspan="3">';

View File

@ -978,7 +978,7 @@ else
// Show product and description
print '<td>';
if (($conf->produit->enabled || $conf->service->enabled) && $fac->lignes[$i]->fk_product)
if (($conf->product->enabled || $conf->service->enabled) && $fac->lignes[$i]->fk_product)
{
print '<input type="hidden" name="idprod" value="'.$fac->lignes[$i]->fk_product.'">';
$product_static=new ProductFournisseur($db);
@ -991,7 +991,7 @@ else
else
{
print $html->select_type_of_lines($fac->lignes[$i]->product_type,'type',1);
if ($conf->produit->enabled && $conf->service->enabled) print '<br>';
if ($conf->product->enabled && $conf->service->enabled) print '<br>';
}
// Description - Editor wysiwyg
@ -1128,8 +1128,8 @@ else
$forceall=1; // For suppliers, we always show all types
print $html->select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1,0,$forceall);
if ($forceall || ($conf->produit->enabled && $conf->service->enabled)
|| (empty($conf->produit->enabled) && empty($conf->service->enabled))) print '<br>';
if ($forceall || ($conf->product->enabled && $conf->service->enabled)
|| (empty($conf->product->enabled) && empty($conf->service->enabled))) print '<br>';
// Editor wysiwyg
if ($conf->fckeditor->enabled && $conf->global->FCKEDITOR_ENABLE_DETAILS)
@ -1163,7 +1163,7 @@ else
print '</form>';
// Ajout de produits/services predefinis
if ($conf->produit->enabled || $conf->service->enabled)
if ($conf->product->enabled || $conf->service->enabled)
{
print '<tr class="liste_titre">';
print '<td colspan="4">';

View File

@ -158,7 +158,7 @@ if ( $societe->fetch($socid) )
/*
* List of products
*/
if ($conf->produit->enabled || $conf->service->enabled)
if ($conf->product->enabled || $conf->service->enabled)
{
$langs->load("products");
print '<table class="noborder" width="100%">';

View File

@ -76,7 +76,7 @@ if ($db->query($sql))
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").'</td></tr>';
if ($conf->produit->enabled)
if ($conf->product->enabled)
{
print "<tr $bc[0]>";
print '<td><a href="liste.php?type=0">'.$langs->trans("Products").'</a></td><td>'.round($prodser[0]).'</td>';

View File

@ -62,7 +62,7 @@ class FormBarCode
$disable = '';
// We check if barcode is already selected by default
if ((($conf->produit->enabled || $conf->service->enabled) && $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE == $code_id) ||
if ((($conf->product->enabled || $conf->service->enabled) && $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE == $code_id) ||
($conf->societe->enabled && $conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY == $code_id))
{
$disable = 'disabled="disabled"';

View File

@ -565,7 +565,7 @@ function print_left_eldy_menu($db,$menu_array)
if ($mainmenu == 'products')
{
// Products
if ($conf->produit->enabled)
if ($conf->product->enabled)
{
$newmenu->add(DOL_URL_ROOT."/product/index.php?leftmenu=product&amp;type=0", $langs->trans("Products"), 0, $user->rights->produit->lire);
if ($user->societe_id == 0)

View File

@ -100,7 +100,7 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
// Products-Services
if ($conf->produit->enabled || $conf->service->enabled)
if ($conf->product->enabled || $conf->service->enabled)
{
$langs->load("products");
@ -114,8 +114,8 @@ function print_eldy_menu($db,$atarget,$hideifnotallowed)
$classname = 'class="tmenu"';
}
$chaine="";
if ($conf->produit->enabled) { $chaine.=$langs->trans("Products"); }
if ($conf->produit->enabled && $conf->service->enabled) { $chaine.="/"; }
if ($conf->product->enabled) { $chaine.=$langs->trans("Products"); }
if ($conf->product->enabled && $conf->service->enabled) { $chaine.="/"; }
if ($conf->service->enabled) { $chaine.=$langs->trans("Services"); }
$idsel='products';

View File

@ -14,7 +14,7 @@ delete from llx_menu where menu_handler='auguria';
--
insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('1', 1__+MAX_llx_menu__, 'auguria', 'top', 'home', '', 0, '/index.php?mainmenu=home&amp;leftmenu=', 'Home', -1, '', '', '', 2, 1, __ENTITY__);
insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->societe->enabled || $conf->fournisseur->enabled', 2__+MAX_llx_menu__, 'auguria', 'top', 'companies', '', 0, '/index.php?mainmenu=companies&amp;leftmenu=', 'ThirdParties', -1, 'companies', '', '', 2, 2, __ENTITY__);
insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->produit->enabled || $conf->service->enabled', 3__+MAX_llx_menu__, 'auguria', 'top', 'products', '', 0, '/product/index.php?mainmenu=products&amp;leftmenu=', 'Products/Services', -1, 'products', '$user->rights->produit->lire||$user->rights->service->lire', '', 0, 3, __ENTITY__);
insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->product->enabled || $conf->service->enabled', 3__+MAX_llx_menu__, 'auguria', 'top', 'products', '', 0, '/product/index.php?mainmenu=products&amp;leftmenu=', 'Products/Services', -1, 'products', '$user->rights->produit->lire||$user->rights->service->lire', '', 0, 3, __ENTITY__);
insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->societe->enabled', 5__+MAX_llx_menu__, 'auguria', 'top', 'commercial', '', 0, '/comm/index.php?mainmenu=commercial&amp;leftmenu=', 'Commercial', -1, 'commercial', '$user->rights->societe->lire || $user->rights->societe->contact->lire', '', 2, 5, __ENTITY__);
insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->compta->enabled || $conf->accounting->enabled || $conf->banque->enabled || $conf->facture->enabled || $conf->deplacement->enabled', 6__+MAX_llx_menu__, 'auguria', 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&amp;leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->commande->lire || $user->rights->facture->lire || $user->rights->banque->lire', '', 2, 6, __ENTITY__);
insert into llx_menu (enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->projet->enabled', 7__+MAX_llx_menu__, 'auguria', 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&amp;leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 0, 7, __ENTITY__);
@ -82,16 +82,16 @@ insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->fournisseur->enabled && $conf->categorie->enabled', 'auguria', 'left', 660__+MAX_llx_menu__, 'companies', '', 2__+MAX_llx_menu__, '/categories/index.php?leftmenu=cat&type=2', 'CustomersProspectsCategoriesShort', 0, 'categories', '$user->rights->categorie>lire', '', 2, 3, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->fournisseur->enabled && $conf->categorie->enabled', 'auguria', 'left', 661__+MAX_llx_menu__, 'companies', '', 660__+MAX_llx_menu__, '/categories/fiche.php?action=create&type=2', 'NewCat', 1, 'categories', '$user->rights->categorie>creer', '', 2, 0, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->produit->enabled', 'auguria', 'left', 2800__+MAX_llx_menu__, 'products', '', 3__+MAX_llx_menu__, '/product/index.php?leftmenu=product&type=0', 'Products', 0, 'products', '$user->rights->produit->lire', '', 2, 0, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->produit->enabled', 'auguria', 'left', 2801__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/fiche.php?leftmenu=product&action=create&type=0', 'NewProduct', 1, 'products', '$user->rights->produit->creer', '', 2, 0, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->produit->enabled', 'auguria', 'left', 2802__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/liste.php?leftmenu=product&type=0', 'ProductList', 1, 'products', '$user->rights->produit->lire', '', 2, 1, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->produit->enabled', 'auguria', 'left', 2803__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/reassort.php?type=0', 'Stocks', 1, 'products', '$user->rights->produit->lire && $user->rights->stock->lire', '', 2, 4, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->produit->enabled && $conf->droitpret->enabled', 'auguria', 'left', 2804__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/fiche.php?leftmenu=product&action=create&type=0&canvas=livre@droitpret', 'NewBook', 1, 'products', '$user->rights->produit->creer', '', 2, 2, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->produit->enabled && $conf->droitpret->enabled', 'auguria', 'left', 2805__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/liste.php?leftmenu=product&type=0&canvas=livre@droitpret', 'BookList', 1, 'products', '$user->rights->produit->lire', '', 2, 3, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->product->enabled', 'auguria', 'left', 2800__+MAX_llx_menu__, 'products', '', 3__+MAX_llx_menu__, '/product/index.php?leftmenu=product&type=0', 'Products', 0, 'products', '$user->rights->produit->lire', '', 2, 0, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->product->enabled', 'auguria', 'left', 2801__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/fiche.php?leftmenu=product&action=create&type=0', 'NewProduct', 1, 'products', '$user->rights->produit->creer', '', 2, 0, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->product->enabled', 'auguria', 'left', 2802__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/liste.php?leftmenu=product&type=0', 'ProductList', 1, 'products', '$user->rights->produit->lire', '', 2, 1, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->product->enabled', 'auguria', 'left', 2803__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/reassort.php?type=0', 'Stocks', 1, 'products', '$user->rights->produit->lire && $user->rights->stock->lire', '', 2, 4, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->product->enabled && $conf->droitpret->enabled', 'auguria', 'left', 2804__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/fiche.php?leftmenu=product&action=create&type=0&canvas=livre@droitpret', 'NewBook', 1, 'products', '$user->rights->produit->creer', '', 2, 2, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->product->enabled && $conf->droitpret->enabled', 'auguria', 'left', 2805__+MAX_llx_menu__, 'products', '', 2800__+MAX_llx_menu__, '/product/liste.php?leftmenu=product&type=0&canvas=livre@droitpret', 'BookList', 1, 'products', '$user->rights->produit->lire', '', 2, 3, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->service->enabled', 'auguria', 'left', 2900__+MAX_llx_menu__, 'products', '', 3__+MAX_llx_menu__, '/product/index.php?leftmenu=service&type=1', 'Services', 0, 'products', '$user->rights->service->lire', '', 2, 1, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->service->enabled', 'auguria', 'left', 2901__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/fiche.php?leftmenu=service&action=create&type=1', 'NewService', 1, 'products', '$user->rights->service->creer', '', 2, 0, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->service->enabled', 'auguria', 'left', 2902__+MAX_llx_menu__, 'products', '', 2900__+MAX_llx_menu__, '/product/liste.php?leftmenu=service&type=1', 'List', 1, 'products', '$user->rights->service->lire', '', 2, 1, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->produit->enabled || $conf->service->enabled', 'auguria', 'left', 3000__+MAX_llx_menu__, 'products', '', 3__+MAX_llx_menu__, '/product/stats/index.php?leftmenu=stats', 'Statistics', 0, 'main', '$user->rights->service->lire', '', 2, 2, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->product->enabled || $conf->service->enabled', 'auguria', 'left', 3000__+MAX_llx_menu__, 'products', '', 3__+MAX_llx_menu__, '/product/stats/index.php?leftmenu=stats', 'Statistics', 0, 'main', '$user->rights->service->lire', '', 2, 2, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->propal->enabled', 'auguria', 'left', 3001__+MAX_llx_menu__, 'products', '', 3000__+MAX_llx_menu__, '/product/popuprop.php?leftmenu=stats', 'Popularity', 1, 'main', '$user->rights->produit->lire && $user->rights->produit>lire', '', 2, 0, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->stock->enabled', 'auguria', 'left', 3100__+MAX_llx_menu__, 'products', '', 3__+MAX_llx_menu__, '/product/stock/index.php?leftmenu=stock', 'Stock', 0, 'stocks', '$user->rights->stock->lire', '', 2, 3, __ENTITY__);
insert into llx_menu (enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('$conf->stock->enabled', 'auguria', 'left', 3101__+MAX_llx_menu__, 'products', '', 3100__+MAX_llx_menu__, '/product/stock/fiche.php?action=create', 'MenuNewWarehouse', 1, 'stocks', '$user->rights->stock->creer', '', 2, 0, __ENTITY__);

View File

@ -266,7 +266,7 @@ if ($conf->societe->enabled)
}
// Module produits
if ($conf->produit->enabled)
if ($conf->product->enabled)
{
$var=!$var;
print "<form method=\"post\" action=\"".$_SERVER["PHP_SELF"]."\">";

View File

@ -73,7 +73,7 @@ class modService extends DolibarrModules
$this->requiredby = array("modContrat");
// Config pages
$this->config_page_url = array("produit.php");
$this->config_page_url = array("produit.php@produit");
$this->langfiles = array("products","companies","bills");
// Constants

View File

@ -118,7 +118,7 @@ if ($user->societe_id == 0)
! empty($conf->societe->enabled) && $user->rights->societe->lire,
! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire,
! empty($conf->adherent->enabled) && $user->rights->adherent->lire,
! empty($conf->produit->enabled) && $user->rights->produit->lire,
! empty($conf->product->enabled) && $user->rights->produit->lire,
! empty($conf->service->enabled) && $user->rights->service->lire,
! empty($conf->propal->enabled) && $user->rights->propale->lire,
! empty($conf->commande->enabled) && $user->rights->commande->lire,

View File

@ -199,3 +199,4 @@ ALTER TABLE llx_menu DROP INDEX idx_menu_uk_menu;
ALTER TABLE llx_menu ADD UNIQUE INDEX idx_menu_uk_menu (menu_handler, fk_menu, position, url, entity);
UPDATE llx_const SET name = 'MAIN_MODULE_PRODUCT' WHERE name = 'MAIN_MODULE_PRODUIT';

View File

@ -32,7 +32,7 @@ require_once(DOL_DOCUMENT_ROOT."/livraison/class/livraison.class.php");
require_once(DOL_DOCUMENT_ROOT."/includes/modules/livraison/modules_livraison.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formfile.class.php");
require_once(DOL_DOCUMENT_ROOT."/lib/sendings.lib.php");
if ($conf->produit->enabled || $conf->service->enabled) require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
if ($conf->product->enabled || $conf->service->enabled) require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
if ($conf->expedition_bon->enabled) require_once(DOL_DOCUMENT_ROOT."/expedition/class/expedition.class.php");
if ($conf->stock->enabled) require_once(DOL_DOCUMENT_ROOT."/product/stock/class/entrepot.class.php");

View File

@ -140,7 +140,7 @@ session_start();
require_once("master.inc.php");
// Force HTTPS if required ($conf->file->main_force_https is 0/1 or https dolibarr root url)
if ($conf->file->main_force_https)
if (! empty($conf->file->main_force_https))
{
$newurl='';
if ($conf->file->main_force_https == '1')
@ -1034,7 +1034,7 @@ function left_menu($menu_array, $helppagename='', $moresearchform='')
img_object('','contact').' '.$langs->trans("Contacts"), 'contact', 'contactname');
}
if ((($conf->produit->enabled && $user->rights->produit->lire) || ($conf->service->enabled && $user->rights->service->lire))
if ((($conf->product->enabled && $user->rights->produit->lire) || ($conf->service->enabled && $user->rights->service->lire))
&& $conf->global->MAIN_SEARCHFORM_PRODUITSERVICE)
{
$langs->load("products");

View File

@ -66,7 +66,7 @@ if ($_GET['id'] || $_GET["ref"])
if ($_GET["ref"]) $result = $product->fetch('',$_GET["ref"]);
if ($_GET["id"]) $result = $product->fetch($_GET["id"]);
if ($conf->produit->enabled) $upload_dir = $conf->produit->dir_output.'/'.dol_sanitizeFileName($product->ref);
if ($conf->product->enabled) $upload_dir = $conf->produit->dir_output.'/'.dol_sanitizeFileName($product->ref);
elseif ($conf->service->enabled) $upload_dir = $conf->service->dir_output.'/'.dol_sanitizeFileName($product->ref);
}
$modulepart='produit';

View File

@ -60,7 +60,7 @@ if ((isset($_GET["type"]) && $_GET["type"] == 0) || empty($conf->service->enable
$transAreaType = $langs->trans("ProductsArea");
$helpurl='EN:Module_Products|FR:Module_Produits|ES:M&oacute;dulo_Productos';
}
if ((isset($_GET["type"]) && $_GET["type"] == 1) || empty($conf->produit->enabled))
if ((isset($_GET["type"]) && $_GET["type"] == 1) || empty($conf->product->enabled))
{
$transAreaType = $langs->trans("ServicesArea");
$helpurl='EN:Module_Services_En|FR:Module_Services|ES:M&oacute;dulo_Servicios';
@ -119,7 +119,7 @@ while ($objp = $db->fetch_object($result))
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Statistics").'</td></tr>';
if ($conf->produit->enabled)
if ($conf->product->enabled)
{
$statProducts = "<tr $bc[0]>";
$statProducts.= '<td><a href="liste.php?type=0&amp;envente=0">'.$langs->trans("ProductsNotOnSell").'</a></td><td align="right">'.round($prodser[0][0]).'</td>';

View File

@ -69,11 +69,11 @@ if ($db->query($sql))
}
$db->free();
if ($conf->produit->enabled && $conf->service->enabled)
if ($conf->product->enabled && $conf->service->enabled)
{
print_fiche_titre($langs->trans("ProductsAndServicesStatistics"), $mesg);
}
elseif ($conf->produit->enabled)
elseif ($conf->product->enabled)
{
print_fiche_titre($langs->trans("ProductsStatistics"), $mesg);
}