Merge pull request #13703 from frederic34/entrepotlibelle
remove deprecated libelle to fix phpunit
This commit is contained in:
commit
28bd962559
@ -97,7 +97,7 @@ if (empty($reshook))
|
||||
{
|
||||
$object->ref = GETPOST("ref");
|
||||
$object->fk_parent = GETPOST("fk_parent");
|
||||
$object->libelle = GETPOST("libelle");
|
||||
$object->label = GETPOST("libelle");
|
||||
$object->description = GETPOST("desc");
|
||||
$object->statut = GETPOST("statut");
|
||||
$object->lieu = GETPOST("lieu");
|
||||
@ -108,8 +108,7 @@ if (empty($reshook))
|
||||
$object->phone = GETPOST("phone");
|
||||
$object->fax = GETPOST("fax");
|
||||
|
||||
if (!empty($object->libelle))
|
||||
{
|
||||
if (!empty($object->label)) {
|
||||
// Fill array 'array_options' with data from add form
|
||||
$ret = $extrafields->setOptionalsFromPost(null, $object);
|
||||
if ($ret < 0) {
|
||||
@ -167,7 +166,7 @@ if (empty($reshook))
|
||||
{
|
||||
if ($object->fetch($id))
|
||||
{
|
||||
$object->libelle = GETPOST("libelle");
|
||||
$object->label = GETPOST("libelle");
|
||||
$object->fk_parent = GETPOST("fk_parent");
|
||||
$object->description = GETPOST("desc");
|
||||
$object->statut = GETPOST("statut");
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2005-2008 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2016 Francis Appels <francis.appels@yahoo.com>
|
||||
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2019-2020 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* 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
|
||||
@ -48,7 +48,11 @@ class Entrepot extends CommonObject
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
public $picto = 'stock';
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
/**
|
||||
* @var int 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
/**
|
||||
* @var string Label
|
||||
@ -184,11 +188,10 @@ class Entrepot extends CommonObject
|
||||
|
||||
$error = 0;
|
||||
|
||||
if (empty($this->label)) $this->label = $this->libelle; // For backward compatibility
|
||||
$this->label = trim(!empty($this->label) ? $this->label : $this->libelle);
|
||||
|
||||
$this->label = trim($this->label);
|
||||
if ($this->label == '')
|
||||
{
|
||||
// Error if label not defined
|
||||
if ($this->label == '') {
|
||||
$this->error = "ErrorFieldRequired";
|
||||
return 0;
|
||||
}
|
||||
@ -286,7 +289,8 @@ class Entrepot extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
$this->label = trim($this->label);
|
||||
$this->label = trim(!empty($this->label) ? $this->label : $this->libelle);
|
||||
|
||||
$this->description = trim($this->description);
|
||||
|
||||
$this->lieu = trim($this->lieu);
|
||||
|
||||
@ -41,7 +41,14 @@ class MouvementStock extends CommonObject
|
||||
public $table_element = 'stock_mouvement';
|
||||
|
||||
|
||||
/**
|
||||
* @var int ID product
|
||||
*/
|
||||
public $product_id;
|
||||
|
||||
/**
|
||||
* @var int ID warehouse
|
||||
*/
|
||||
public $warehouse_id;
|
||||
public $qty;
|
||||
|
||||
@ -58,7 +65,7 @@ class MouvementStock extends CommonObject
|
||||
public $price;
|
||||
|
||||
/**
|
||||
* @var int ID
|
||||
* @var int ID user author
|
||||
*/
|
||||
public $fk_user_author;
|
||||
|
||||
@ -896,13 +903,13 @@ class MouvementStock extends CommonObject
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog(get_class($this)."::createBatch array param dluo must contain at least key fk_product_stock".$error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::createBatch array param dluo must contain at least key fk_product_stock", LOG_ERR);
|
||||
$result = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_syslog(get_class($this)."::createBatch error invalid param dluo".$error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::createBatch error invalid param dluo", LOG_ERR);
|
||||
$result = -1;
|
||||
}
|
||||
|
||||
|
||||
@ -975,7 +975,6 @@ if ($resql)
|
||||
$productlot->sellby = $objp->sellby;
|
||||
|
||||
$warehousestatic->id = $objp->entrepot_id;
|
||||
$warehousestatic->libelle = $objp->warehouse_ref; // deprecated
|
||||
$warehousestatic->label = $objp->warehouse_ref;
|
||||
$warehousestatic->lieu = $objp->lieu;
|
||||
|
||||
|
||||
@ -1012,7 +1012,6 @@ if ($resql)
|
||||
|
||||
$warehousestatic->id = $objp->entrepot_id;
|
||||
$warehousestatic->ref = $objp->warehouse_ref;
|
||||
$warehousestatic->libelle = $objp->warehouse_ref; // deprecated
|
||||
$warehousestatic->label = $objp->warehouse_ref;
|
||||
$warehousestatic->lieu = $objp->lieu;
|
||||
$warehousestatic->fk_parent = $objp->fk_parent;
|
||||
|
||||
@ -867,7 +867,6 @@ if (!$variants) {
|
||||
|
||||
$entrepotstatic->id = $obj->rowid;
|
||||
$entrepotstatic->ref = $obj->ref;
|
||||
$entrepotstatic->libelle = $obj->ref;
|
||||
$entrepotstatic->label = $obj->ref;
|
||||
$entrepotstatic->lieu = $obj->lieu;
|
||||
$entrepotstatic->fk_parent = $obj->fk_parent;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user