Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2020-08-07 12:49:33 +02:00
commit 7128e658cb
2 changed files with 6 additions and 1 deletions

View File

@ -290,7 +290,9 @@ class CommandeFournisseurDispatch extends CommonObject
$this->batch = $obj->batch;
$this->eatby = $this->db->jdate($obj->eatby);
$this->sellby = $this->db->jdate($obj->sellby);
$this->fetch_optionals();
$this->fk_reception = $obj->fk_reception;
$this->fetch_optionals();
}
$this->db->free($resql);

View File

@ -286,6 +286,9 @@ class Products extends DolibarrApi
foreach ($request_data as $field => $value) {
if ($field == 'id') { continue;
}
if ($field == 'stock_reel') {
throw new RestException(400, 'Stock reel cannot be updated here. Use the /stockmovements endpoint instead');
}
$this->product->$field = $value;
}