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

This commit is contained in:
Laurent Destailleur
2023-10-10 22:52:04 +02:00
5 changed files with 16 additions and 10 deletions

View File

@@ -9349,7 +9349,12 @@ abstract class CommonObject
$line = (object) $line;
}
$result = $line->create($user, 1);
$result = 0;
if (method_exists($line, 'insert')) {
$result = $line->insert($user, 1);
} elseif (method_exists($line, 'create')) {
$result = $line->create($user, 1);
}
if ($result < 0) {
$this->error = $line->error;
$this->db->rollback();