FIX Update extrafields on line only if it is supported

This commit is contained in:
Laurent Destailleur 2020-08-17 15:53:14 +02:00
parent d1323f55bb
commit 8e00c9c304
2 changed files with 7 additions and 3 deletions

View File

@ -8146,9 +8146,8 @@ abstract class CommonObject
if (empty($error)) {
// Remove extrafields
if (!$error)
{
$tmpobjectline = new $tmpforobjectlineclass($this->db);
$tmpobjectline = new $tmpforobjectlineclass($this->db);
if (!isset($tmpobjectline->isextrafieldmanaged) || !empty($tmpobjectline->isextrafieldmanaged)) {
$tmpobjectline->id = $idline;
$result = $tmpobjectline->deleteExtraFields();
if ($result < 0)

View File

@ -1071,6 +1071,11 @@ class MyObjectLine extends CommonObjectLine
// To complete with content of an object MyObjectLine
// We should have a field rowid, fk_myobject and position
/**
* @var int Does object support extrafields ? 0=No, 1=Yes
*/
public $isextrafieldmanaged = 0;
/**
* Constructor
*