Skip to content

Commit

Permalink
[ModDigirisk] fix: extrafileds fk_risk not entity friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-eoxia committed Oct 6, 2021
1 parent 25ba8ee commit a6cc0c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/modules/modDigiriskDolibarr.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,8 @@ public function init($options = '')
include_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$extra_fields = new ExtraFields( $this->db );

$extra_fields->addExtraField( 'fk_risk', $langs->trans("fk_risk"), 'sellist', 1020, '', 'projet_task', 0, 0, '', 'a:1:{s:7:"options";a:1:{s:25:"digiriskdolibarr_risk:ref";N;}}', '', '', 1);
$extra_fields->delete('fk_risk', 'projet_task');
$extra_fields->addExtraField( 'fk_risk', $langs->trans("fk_risk"), 'sellist', 1020, '', 'projet_task', 0, 0, '', 'a:1:{s:7:"options";a:1:{s:50:"digiriskdolibarr_risk:ref:rowid::entity = $ENTITY$";N;}}', '', '', 1);
$extra_fields->addExtraField( 'wp_digi_id', $langs->trans("WPDigiID"), 'int', 100, '', 'digiriskdolibarr_digiriskelement', 1, 0, '', '', '', '', 1);
if ($conf->global->MAIN_EXTRAFIELDS_USE_SELECT2 == 0) {
dolibarr_set_const($this->db, 'MAIN_EXTRAFIELDS_USE_SELECT2', 1, 'integer', 0, '', $conf->entity);
Expand Down

0 comments on commit a6cc0c6

Please sign in to comment.