FIX : Bom tables were not created when we activate the module (#30464)

This commit is contained in:
atm-adrien 2024-07-25 14:25:22 +02:00 committed by GitHub
parent 5c9b808f3f
commit 862befbed5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -464,6 +464,10 @@ class modBom extends DolibarrModules
//$result4=$extrafields->addExtraField('myattr4', "New Attr 4 label", 'select', 1, 3, 'thirdparty', 0, 1, '', array('options'=>array('code1'=>'Val1','code2'=>'Val2','code3'=>'Val3')), 1,'', 0, 0, '', '', 'mrp', '$conf->bom->enabled');
//$result5=$extrafields->addExtraField('myattr5', "New Attr 5 label", 'text', 1, 10, 'user', 0, 0, '', '', 1, '', 0, 0, '', '', 'mrp', '$conf->bom->enabled');
$result = $this->_load_tables('/install/mysql/', 'bom');
if ($result < 0) {
return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default')
}
// Permissions
$this->remove($options);