We must add the constant STOCK_USE_WAREHOUSE_BY_USER to have the page with warehouse by users shown.

This is because this feature is not working yet because there is no way to edit the table llx_user_entrepot. Only reading of this table is possible. So the page that show contant of this table is not active by default in standard release.
This commit is contained in:
Laurent Destailleur 2008-06-14 10:19:27 +00:00
parent 3e71a86acd
commit d35bbc79d7
5 changed files with 49 additions and 36 deletions

View File

@ -1,5 +1,6 @@
<?php <?php
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -14,16 +15,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/ */
/** /**
\file htdocs/product/stock/fiche.php \file htdocs/product/stock/fiche.php
\ingroup stock \ingroup stock
\brief Page fiche de valorisation du stock dans l'entrepot \brief Page fiche de valorisation du stock dans l'entrepot
\version $Revision$ \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
@ -68,10 +66,15 @@ if ($_GET["id"])
$hselected=$h; $hselected=$h;
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$entrepot->id; if ($conf->global->STOCK_USE_WAREHOUSE_BY_USER)
$head[$h][1] = $langs->trans("Users"); {
$h++; // Add the constant STOCK_USE_WAREHOUSE_BY_USER in cont table to use this feature.
// Should not be enabled by defaut because does not work yet correctly because
// there is no way to add values in the table llx_user_entrepot
$head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$entrepot->id;
$head[$h][1] = $langs->trans("Users");
$h++;
}
$head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$entrepot->id; $head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$entrepot->id;
$head[$h][1] = $langs->trans("Info"); $head[$h][1] = $langs->trans("Info");
$h++; $h++;

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Simon Tosser <simon@kornog-computing.com> * Copyright (C) 2005 Simon Tosser <simon@kornog-computing.com>
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
* *
@ -17,16 +17,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/ */
/** /**
\file htdocs/product/stock/fiche.php \file htdocs/product/stock/fiche.php
\ingroup stock \ingroup stock
\brief Page fiche entrepot \brief Page fiche entrepot
\version $Revision$ \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
@ -225,9 +222,15 @@ else
$head[$h][1] = $langs->trans("EnhancedValue"); $head[$h][1] = $langs->trans("EnhancedValue");
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$entrepot->id; if ($conf->global->STOCK_USE_WAREHOUSE_BY_USER)
$head[$h][1] = $langs->trans("Users"); {
$h++; // Add the constant STOCK_USE_WAREHOUSE_BY_USER in cont table to use this feature.
// Should not be enabled by defaut because does not work yet correctly because
// there is no way to add values in the table llx_user_entrepot
$head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$entrepot->id;
$head[$h][1] = $langs->trans("Users");
$h++;
}
$head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$entrepot->id; $head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$entrepot->id;
$head[$h][1] = $langs->trans("Info"); $head[$h][1] = $langs->trans("Info");

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2005-2006 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -14,16 +14,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/ */
/** /**
\file htdocs/product/stock/info.php \file htdocs/product/stock/info.php
\ingroup facture \ingroup facture
\brief Page des informations d'un entrepot \brief Page des informations d'un entrepot
\version $Revision$ \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
@ -60,9 +57,15 @@ $head[$h][0] = DOL_URL_ROOT.'/product/stock/fiche-valo.php?id='.$entrepot->id;
$head[$h][1] = $langs->trans("EnhancedValue"); $head[$h][1] = $langs->trans("EnhancedValue");
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$entrepot->id; if ($conf->global->STOCK_USE_WAREHOUSE_BY_USER)
$head[$h][1] = $langs->trans("Users"); {
$h++; // Add the constant STOCK_USE_WAREHOUSE_BY_USER in cont table to use this feature.
// Should not be enabled by defaut because does not work yet correctly because
// there is no way to add values in the table llx_user_entrepot
$head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$entrepot->id;
$head[$h][1] = $langs->trans("Users");
$h++;
}
$head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$entrepot->id; $head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$entrepot->id;
$head[$h][1] = $langs->trans("Info"); $head[$h][1] = $langs->trans("Info");

View File

@ -102,9 +102,15 @@ if ($resql)
$head[$h][1] = $langs->trans("EnhancedValue"); $head[$h][1] = $langs->trans("EnhancedValue");
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$entrepot->id; if ($conf->global->STOCK_USE_WAREHOUSE_BY_USER)
$head[$h][1] = $langs->trans("Users"); {
$h++; // Add the constant STOCK_USE_WAREHOUSE_BY_USER in cont table to use this feature.
// Should not be enabled by defaut because does not work yet correctly because
// there is no way to add values in the table llx_user_entrepot
$head[$h][0] = DOL_URL_ROOT.'/product/stock/user.php?id='.$entrepot->id;
$head[$h][1] = $langs->trans("Users");
$h++;
}
$head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$entrepot->id; $head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$entrepot->id;
$head[$h][1] = $langs->trans("Info"); $head[$h][1] = $langs->trans("Info");

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Simon Tosser <simon@kornog-computing.com> * Copyright (C) 2005 Simon Tosser <simon@kornog-computing.com>
* Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2006 Regis Houssin <regis@dolibarr.fr>
* *
@ -17,16 +17,13 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/ */
/** /**
\file htdocs/product/stock/user.php \file htdocs/product/stock/user.php
\ingroup stock \ingroup stock
\brief Fiche gestion des utilisateurs des entrepots \brief Page to link dolibarr users with warehouses
\version $Revision$ \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
@ -145,6 +142,7 @@ $form=new Form($db);
print "</div>"; print "</div>";
/* ************************************************************************** */ /* ************************************************************************** */
/* */ /* */
/* Affichage des utilisateurs de l'entrepot */ /* Affichage des utilisateurs de l'entrepot */