FIX Update extrafields on line only if it is supported
Conflicts: htdocs/modulebuilder/template/class/myobject.class.php
This commit is contained in:
parent
86a31d17a5
commit
8bfa6df1a6
@ -8500,9 +8500,8 @@ abstract class CommonObject
|
|||||||
|
|
||||||
if (empty($error)) {
|
if (empty($error)) {
|
||||||
// Remove extrafields
|
// Remove extrafields
|
||||||
if (!$error)
|
|
||||||
{
|
|
||||||
$tmpobjectline = new $tmpforobjectlineclass($this->db);
|
$tmpobjectline = new $tmpforobjectlineclass($this->db);
|
||||||
|
if (!isset($tmpobjectline->isextrafieldmanaged) || !empty($tmpobjectline->isextrafieldmanaged)) {
|
||||||
$tmpobjectline->id = $idline;
|
$tmpobjectline->id = $idline;
|
||||||
$result = $tmpobjectline->deleteExtraFields();
|
$result = $tmpobjectline->deleteExtraFields();
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
|
|||||||
@ -1085,4 +1085,19 @@ class MyObjectLine
|
|||||||
{
|
{
|
||||||
// To complete with content of an object MyObjectLine
|
// To complete with content of an object MyObjectLine
|
||||||
// We should have a field rowid, fk_myobject and position
|
// We should have a field rowid, fk_myobject and position
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int Does object support extrafields ? 0=No, 1=Yes
|
||||||
|
*/
|
||||||
|
public $isextrafieldmanaged = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param DoliDb $db Database handler
|
||||||
|
*/
|
||||||
|
public function __construct(DoliDB $db)
|
||||||
|
{
|
||||||
|
$this->db = $db;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user