FIX #2758 Product::update sets product note to "null" when $prod->note is null

This commit is contained in:
Marcos García de La Fuente 2015-05-10 01:27:28 +02:00
parent 6309d2133f
commit f8e8b39ff2
2 changed files with 3 additions and 2 deletions

View File

@ -15,6 +15,7 @@ Fix: [ bug #1905 ] Custom deplacement types do not get translated in deplacement
Fix: [ bug #2583 ] Unable to create a bank transfer with localized numbers
Fix: [ bug #2577 ] Incorrect invoice status in "Linked objects" page of a project
Fix: [ bug #2576 ] Unable to edit a dictionary entry that has # in its ref
Fix: [ bug #2758 ] Product::update sets product note to "null" when $prod->note is null
***** ChangeLog for 3.5.6 compared to 3.5.5 *****
Fix: Avoid missing class error for fetch_thirdparty method #1973

View File

@ -442,7 +442,7 @@ class Product extends CommonObject
$this->ref = dol_string_nospecial(trim($this->ref));
$this->libelle = trim($this->libelle);
$this->description = trim($this->description);
$this->note = (isset($this->note)? trim($this->note):"null");
$this->note = (isset($this->note)? trim($this->note):null);
$this->weight = price2num($this->weight);
$this->weight_units = trim($this->weight_units);
$this->length = price2num($this->length);
@ -493,7 +493,7 @@ class Product extends CommonObject
$sql.= ", accountancy_code_sell= '" . $this->accountancy_code_sell."'";
$sql.= ", desiredstock = " . ((isset($this->desiredstock) && $this->desiredstock != '') ? $this->desiredstock : "null");
$sql.= " WHERE rowid = " . $id;
var_dump($sql);die;
dol_syslog(get_class($this)."update sql=".$sql);
$resql=$this->db->query($sql);
if ($resql)