Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1647 [Control] add: labels for sheet and other object types #1809

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

evarisk-francois
Copy link
Contributor

No description provided.

@evarisk-francois evarisk-francois self-assigned this May 17, 2024
@evarisk-francois evarisk-francois added Enhancement New feature or request 5 labels May 17, 2024
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pourquoi ce fix est dans cette PR ca n'a rien à faire la

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Le but est de rajouter le label à la fin de getNomUrl, pour quelle raison tu modifie complètement la fonction ?

Comment on lines +612 to +614

unset($object->fields['fk_sheet']);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Si tu unset le field, on peut plus le manager par la suite

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fk_sheet est utilisé dans commonfields_view.tpl.php, ce qui crée un double du champ Modèle. Je ne vois pas comment empêche le doublon sans unset.

print '<tr class="field_fk_sheet"><td class="titlefield fieldname_fk_sheet">';
print $langs->trans('Sheet');
print '</td><td class="valuefield fieldname_fk_sheet">';
print $object->showOutputField($object->fields['fk_sheet'], 'fk_sheet', $object->fk_sheet, '', '', '', 0) . '<span class="opacitymedium">' . ' - ' . dol_trunc($sheet->label, 0) . '</span>';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dol_trunc a 0 ne sert a rien autant laisser le paramètre par défaut

Comment on lines 667 to 668
$linkedObject->add_label = true;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Faire ça sous-entend que 100 % des objets défini possède cette attribut définie et exploitable, c'est rarement une bonne façon de faire de la programmation orienté objet que de rajouter une propriété dynamique

@evarisk-micka evarisk-micka linked an issue May 22, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 Enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

Ajout de labels modèle de controle et projet
2 participants