Merci pour la relocalisation des post sur le Sujet!
Alors résolu en mettant les modif dans le script d’install => à la mise à jour du plugin ça modifie les noms, mais je n’ai pas pu le faire dans les équipements directement :
function CovidAttest_update() {
// [ les truc sfait avant]
log::add('CovidAttest','debug','============= mise à jour des equipements suite à update plugin =============');
foreach (eqLogic::byType('CovidAttest', true) as $eqLogic) {
log::add('CovidAttest','debug', 'mise à jour de '.$eqLogic->getHumanName());
// modif des commandes déjà renseignée
// modif sport animaux => animaux
$motifType = $eqLogic->getCmd(null, 'motif_SPORT_ANIMAUX');
if (is_object($motifType)) {
$motifType->setName(__('motif ANIMAUX', __FILE__));
$motifType->setLogicalId('motif_ANIMAUX');
log::add('CovidAttest', 'debug', '------ rename motif SPORT ANIMAUX from'.$eqLogic->getHumanName().' to '.$motifType->getName());
$motifType->save(true);
}else{
log::add('CovidAttest', 'debug', '------ motif SPORT ANIMAUX not found in '.$eqLogic->getHumanName());
}
//commande motif sport animaux => animaux
$motif = $eqLogic->getCmd(null, 'send_motif_SPORT_ANIMAUX');
if (is_object($motif)) {
$motif->setName(__('Envoi motif ANIMAUX', __FILE__));
$motif->setLogicalId('send_motif_ANIMAUX');
log::add('CovidAttest', 'debug', '------ rename send motif SPORT ANIMAUX from'.$eqLogic->getHumanName().' to '.$motifType->getName());
//$motif->setEqLogic_id($this->getId());
$motif->save(true);
}else{
log::add('CovidAttest', 'debug', '------ send motif SPORT ANIMAUX not found in '.$eqLogic->getHumanName());
}
$eqLogic->save();
}
}
je laisse ouvert un peu voir si quelqu’un à l’explication du pourquoi.