mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-12 12:03:03 +01:00
Fix: Import don't work if extrafield is separator
This commit is contained in:
@@ -462,7 +462,7 @@ class modService extends DolibarrModules
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) $this->import_fields_array[$r]['p.fk_unit'] = 'Unit';
|
||||
// Add extra fields
|
||||
$import_extrafield_sample = array();
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product' AND entity IN (0,".$conf->entity.")";
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type != 'separate' AND elementtype = 'product' AND entity IN (0,".$conf->entity.")";
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) // This can fail when class is used on old database (during migration for example)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user