Merge pull request #1255 from fappels/develop

fix on product and mouvementstock classes
This commit is contained in:
Laurent Destailleur 2013-10-15 03:06:32 -07:00
commit 1a1f7bb600
2 changed files with 3 additions and 2 deletions

View File

@ -621,7 +621,7 @@ class Product extends CommonObject
}
// Delete all child tables
$elements = array('product_fournisseur_price','product_price','product_lang','categorie_product');
$elements = array('product_fournisseur_price','product_price','product_lang','categorie_product','product_stock');
foreach($elements as $table)
{
if (! $error)
@ -644,7 +644,7 @@ class Product extends CommonObject
{
$sqlz = "DELETE FROM ".MAIN_DB_PREFIX."product";
$sqlz.= " WHERE rowid = ".$id;
dol_syslog(get_class($this).'::delete sql='.$sql, LOG_DEBUG);
dol_syslog(get_class($this).'::delete sql='.$sqlz, LOG_DEBUG);
$resultz = $this->db->query($sqlz);
if ( ! $resultz )
{

View File

@ -61,6 +61,7 @@ class MouvementStock
{
global $conf, $langs;
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
$error = 0;
dol_syslog(get_class($this)."::_create start userid=$user->id, fk_product=$fk_product, warehouse=$entrepot_id, qty=$qty, type=$type, price=$price label=$label");