diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 820a66e08d3..d8d52dd1720 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -138,6 +138,8 @@ class Product extends CommonObject //! Contains detail of stock of product into each warehouse var $stock_warehouse=array(); + + var $oldcopy; /** diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 182882bf63f..dcc798df8f3 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -250,6 +250,8 @@ if (empty($reshook)) { if ($object->fetch($id,$ref)) { + $object->oldcopy=dol_clone($object); + $object->ref = $ref; $object->libelle = $_POST["libelle"]; $object->description = dol_htmlcleanlastbr($_POST["desc"]); diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 006988b93fe..a46c5a72292 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -138,6 +138,8 @@ class Societe extends CommonObject var $logo; var $logo_small; var $logo_mini; + + var $oldcopy; /** * Constructor