FIX API reception return error 500
This commit is contained in:
parent
a470eb79a8
commit
1f2ad8efbf
@ -160,6 +160,8 @@ class DolibarrApi
|
||||
unset($object->statuts_short);
|
||||
unset($object->statuts_logo);
|
||||
unset($object->statuts_long);
|
||||
unset($object->statutshorts);
|
||||
unset($object->statutshort);
|
||||
unset($object->labelStatus);
|
||||
unset($object->labelStatusShort);
|
||||
|
||||
@ -181,6 +183,7 @@ class DolibarrApi
|
||||
unset($object->picto);
|
||||
|
||||
unset($object->fieldsforcombobox);
|
||||
unset($object->regeximgext);
|
||||
|
||||
unset($object->skip_update_total);
|
||||
unset($object->context);
|
||||
@ -256,6 +259,11 @@ class DolibarrApi
|
||||
if (!empty($object->thirdparty) && is_object($object->thirdparty)) {
|
||||
$this->_cleanObjectDatas($object->thirdparty);
|
||||
}
|
||||
|
||||
if (!empty($object->product) && is_object($object->product)) {
|
||||
$this->_cleanObjectDatas($object->product);
|
||||
}
|
||||
|
||||
return $object;
|
||||
}
|
||||
|
||||
|
||||
@ -2655,7 +2655,7 @@ function getModuleDirForApiClass($moduleobject)
|
||||
$moduledirforclass = 'fichinter';
|
||||
} elseif ($moduleobject == 'mos') {
|
||||
$moduledirforclass = 'mrp';
|
||||
} elseif (in_array($moduleobject, array('products', 'expensereports', 'users', 'tickets', 'boms'))) {
|
||||
} elseif (in_array($moduleobject, array('products', 'expensereports', 'users', 'tickets', 'boms', 'receptions'))) {
|
||||
$moduledirforclass = preg_replace('/s$/', '', $moduleobject);
|
||||
}
|
||||
|
||||
|
||||
@ -456,8 +456,8 @@ class Reception extends CommonObject
|
||||
$this->brouillon = 1;
|
||||
}
|
||||
|
||||
$file = $conf->reception->dir_output."/".get_exdir($this->id, 2, 0, 0, $this, 'reception')."/".$this->id.".pdf";
|
||||
$this->pdf_filename = $file;
|
||||
//$file = $conf->reception->dir_output."/".get_exdir(0, 0, 0, 1, $this, 'reception')."/".$this->id.".pdf";
|
||||
//$this->pdf_filename = $file;
|
||||
|
||||
// Tracking url
|
||||
$this->getUrlTrackingStatus($obj->tracking_number);
|
||||
@ -1177,6 +1177,8 @@ class Reception extends CommonObject
|
||||
$line = new CommandeFournisseurDispatch($this->db);
|
||||
|
||||
$line->fetch($obj->rowid);
|
||||
|
||||
// TODO Remove or keep this ?
|
||||
$line->fetch_product();
|
||||
|
||||
$sql_commfourndet = 'SELECT qty, ref, label, description, tva_tx, vat_src_code, subprice, multicurrency_subprice, remise_percent';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user