FIX : hrm_position > hrm_job_user + seEventMessage on evaluation close

This commit is contained in:
Gauthier PC portable 024 2021-10-01 08:06:45 +02:00
parent 1ff39d79e5
commit d01460d606
5 changed files with 10 additions and 5 deletions

View File

@ -147,7 +147,7 @@ class Job extends CommonObject
// /**
// * @var array List of child tables. To test if we can delete object.
// */
protected $childtables = array('hrm_evaluation', 'hrm_position');
protected $childtables = array('hrm_evaluation', 'hrm_job_user');
// /**
// * @var array List of child tables. To know object to delete on cascade.

View File

@ -48,7 +48,7 @@ class Position extends CommonObject
/**
* @var string Name of table without prefix where object is stored. This is also the key used for extrafields management.
*/
public $table_element = 'hrm_position';
public $table_element = 'hrm_job_user';
/**
* @var int Does this object support multicompany module ?
@ -144,7 +144,7 @@ class Position extends CommonObject
// /**
// * @var string Name of subtable line
// */
// public $table_element_line = 'hrm_positionline';
// public $table_element_line = 'hrm_job_userline';
// /**
// * @var string Field with ID of parent key if this object has a parent
@ -166,7 +166,7 @@ class Position extends CommonObject
// * If name matches '@ClassNAme:FilePathClass;ParentFkFieldName' it will
// * call method deleteByParentField(parentId, ParentFkFieldName) to fetch and delete child object
// */
// protected $childtablesoncascade = array('hrm_positiondet');
// protected $childtablesoncascade = array('hrm_job_userdet');
// /**
// * @var PositionLine[] Array of subtable lines

View File

@ -255,7 +255,10 @@ if (empty($reshook)) {
}
}
}
$object->setStatut(Evaluation::STATUS_CLOSED);
if(empty($errors)) {
$object->setStatut(Evaluation::STATUS_CLOSED);
setEventMessage('EmployeeSkillsUpdated');
}
}
if ($action == 'reopen' ) {

View File

@ -41,6 +41,7 @@ SkillHasNoLines=This skill has no lines
skill=Skill
Skills=Skills
SkillCard=Skill card
EmployeeSkillsUpdated=Employee skills have been updated (see "Skills" tab of employee card)
Eval=Evaluation
Evals=Evaluations
NewEval=New evaluation

View File

@ -52,6 +52,7 @@ SkillHasNoLines=Cette compétence n'a pas de notes
skill=Compétence
Skills=Compétences
SkillCard=Fiche compétence
EmployeeSkillsUpdated=Les compétences du salarié ont été mises à jour (voir l'onglet "compétences" de la fiche du salarié)
Eval=Evaluation
Evals=Evaluations
NewEval=Nouvelle evaluation