« MyList/en » : différence entre les versions

De Documentations Patas-monkey
Aller à la navigation Aller à la recherche
Page créée avec « For example, to allow access only to users with read access to commercial proposals, you must enter <code>$user->rights->propale->read</code>. »
Aucun résumé des modifications
 
(31 versions intermédiaires par le même utilisateur non affichées)
Ligne 13 : Ligne 13 :
The myList Module allows you to create your own personalized lists from the information contained in your database and make them accessible from the Dolibarr menus. The information is retrieved by SQL query.
The myList Module allows you to create your own personalized lists from the information contained in your database and make them accessible from the Dolibarr menus. The information is retrieved by SQL query.


<div lang="fr" dir="ltr" class="mw-content-ltr">
[[file:mylist_Liste_affichee_en.png|600px]]
[[file:mylist_Liste_affichee.png|600px]]
</div>


From the custom lists, different actions can be performed from additional processing requests (deletion, update, etc.).
From the custom lists, different actions can be performed from additional processing requests (deletion, update, etc.).


<div lang="fr" dir="ltr" class="mw-content-ltr">
[[file:mylist_Liste_traitement_en.png|600px]]
[[file:mylist_Liste_traitement.png|600px]]
</div>


MyList comes with three list import files to inspire you to create your own lists: contacts to call back, list of unpaid invoices and turnover.
MyList comes with three list import files to inspire you to create your own lists: contacts to call back, list of unpaid invoices and turnover.
Ligne 28 : Ligne 24 :
{| class="wikitable"
{| class="wikitable"
|- style="vertical-align:top;"
|- style="vertical-align:top;"
| [[file:mylist_Champs-mylistmore-ecran.png|600px]]
| [[file:mylist_Champs-mylistmore-ecran_en.png|600px]]
|
|
Sums and averages of the calculated fields of myList on screen and on edition
Sums and averages of the calculated fields of myList on screen and on edition
|- style="vertical-align:top;"
|- style="vertical-align:top;"
| [[file:mylist_Champs-mylistmore-resultat.png|600px]]
| [[file:mylist_Champs-mylistmore-resultat_en.png|600px]]
|
|
PDF editions
PDF editions
Ligne 46 : Ligne 42 :


{| class="wikitable"
{| class="wikitable"
| [[file:mylist_Configuration.png|600px]]
| [[file:mylist_Configuration_en.png|600px]]
| style="vertical-align:top;" |
| style="vertical-align:top;" |


Ligne 61 : Ligne 57 :
*User and group permissions
*User and group permissions
{| class="wikitable"
{| class="wikitable"
| [[file:myliste_Permissions-Utilisateurs.png|600px]]
| [[file:myliste_Permissions-utilisateurs.png|600px]]
| style="vertical-align:top;" | Access to the module's features can be restricted to users and groups, from their profile then Permissions tab, according to the permissions
| style="vertical-align:top;" | Access to the module's features can be restricted to users and groups, from their profile then Permissions tab, according to the permissions
|}
|}
Ligne 86 : Ligne 82 :
Open the list creation page from the menu link '''Patas-M Tools > Mylist > New list''':
Open the list creation page from the menu link '''Patas-M Tools > Mylist > New list''':


<div lang="fr" dir="ltr" class="mw-content-ltr">
[[file:mylist_Page_nouvelle_liste.png|600px]]
[[file:mylist_Page_nouvelle_liste.png|600px]]
</div>


{| class="wikitable"
{| class="wikitable"
Ligne 130 : Ligne 124 :
For example, to allow access only to users with read access to commercial proposals, you must enter <code>$user->rights->propale->read</code>.
For example, to allow access only to users with read access to commercial proposals, you must enter <code>$user->rights->propale->read</code>.


<div lang="fr" dir="ltr" class="mw-content-ltr">
To identify the authorization you want to use, a tip is to go to the configuration file of the module managing this authorization.
Pour repérer l’habilitation que l’on souhaite utiliser, une astuce consiste à aller dans le fichier de configuration du module gérant cette habilitation.
|-
|-
| Fichier de langue
| Language file
| afin de rendre plus explicite les noms de variable lors de leur saisie et les entêtes de colonnes sur les tableaux, il est possible d’utiliser les fichiers de traductions.
| in order to make the variable names more explicit when entering them and the column headers on the tables, it is possible to use the translation files.
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
Just add one or more language file names separated by a #
Il suffit d’ajouter un ou plusieurs noms de fichiers de langues séparé par un #
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
If the language file is not placed in the Dolibarr core folder, you must add <code>@modulename</code> to it.
Si le fichier de langue n’est pas déposé dans le dossier du noyau de Dolibarr, il faut ajouter <code>@nomdumodule</code> à celui-ci.
|-
|-
| Auteur
| Author
|-
|-
| Export CSV
| CSV Export
| conditionne l'affichage d'un bouton d'export CSV du résultat de la liste
| conditions the display of a CSV export button for the list result
|-
|-
| Document imprimable
| Printable document
| sélectionnez ici l'orientation du PDF qui vous sera proposé par défaut pour générer les résultats de vos listes.
| select here the orientation of the PDF that will be proposed to you by default to generate the results of your lists.
{{Note|Note : Pour pouvoir sélectionnez les documents, ils doivent avoir été activés dans la configuration du module}}
{{Note|Note: To be able to select the documents, they must have been activated in the module configuration}}
|-
|-
| Requête du tableau
| Table query
| requête SQL qui va définir l'affichage des données
| SQL query that will define the display of the data
|-
|-
| Requête de traitement
| Processing query
| permettra de paramétrer un traitement sur les résultats de la liste comme <code>DELETE</code>, <code>UPDATE</code> …
| will allow you to configure a processing on the list results such as <code>DELETE</code>, <code>UPDATE</code> …
|-
|-
| Champs personnalisés par défaut
| Default custom fields
| les champs personnalisés saisis ici permettent de définir un ensemble de variables utilisées par la requête pour pré-filtrer des champs qui ne sont pas forcément affichés.
| Custom fields entered here allow you to define a set of variables used by the query to pre-filter fields that are not necessarily displayed.
[[file:mylist_champs_personnalises.png|400px]] [[file:mylist_champs_personnalises_resultat.png|400px]]
[[file:mylist_champs_personnalises.png|400px]] [[file:mylist_champs_personnalises_resultat.png|400px]]
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
It is possible to create multiple custom fields by separating them with ''':'''
Il est possible de créer plusieurs champs personnalisés en les séparant par ''':'''
|}
|}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
==Example of creating a simple list==
==Exemple de création d'une liste simple==
===Creation page===
===Page de création===
For the example, let's create a list of products and services displaying their selling price, cost and PMP, accessible from the main Products/Services menu:
Pour l'exemple, créons une liste des produits et services affichant leur prix de vente, de revient et PMP, accessible depuis le menu principal Produits/Services :
{| class="wikitable"
{| class="wikitable"
|- style="vertical-align:top;"
|- style="vertical-align:top;"
| [[file:mylist_Page_nouvelle_liste.png|600px]]
| [[file:mylist_Page_nouvelle_liste.png|600px]]
| Ouvrez la page de création d'une nouvelle liste et saisissez les données ci-contre puis terminez la première étape de création de la liste en cliquant sur le bouton '''Créer'''
| Open the page for creating a new list and enter the data opposite, then complete the first step of creating the list by clicking on the '''Create''' button
|- style="vertical-align:top;"
|- style="vertical-align:top;"
| [[file:mylist_Liste_cree.png|600px]]
| [[file:mylist_Liste_cree.png|600px]]
| Une fois la liste créée, trois nouveaux champs sont affichés et peuvent être modifié en édition de la fiche :
| Once the list is created, three new fields are displayed and can be modified when editing the form:
*'''Export CSV autorisé''' : cette fonctionnalité permettra l'export CSV des résultats de la liste pour un retraitement ultérieur.
*'''CSV export allowed''': this feature will allow the CSV export of the results of the list for later reprocessing.
*'''Forcer l'affichage de tous les résultats''' : cette fonctionnalité forcera l'affichage de tous les résultat de la liste sans filtrage.
*'''Force display of all results''': this feature will force the display of all the results of the list without filtering.
{{Note|Selon la complexité de votre requête et la quantité d'information à traiter, activer cette fonctionnalité peut ralentir le système}}
{{Note|Depending on the complexity of your query and the amount of information to be processed, activating this feature can slow down the system}}
*'''Liste active''' : suite à sa création, une liste est par défaut, '''Inactive'''. Modifiez son état pour permettre son affichage depuis les liens de menus déclarés sur sa fiche.
*'''Active list''': following its creation, a list is by default, '''Inactive'''. Modify its status to allow its display from the menu links declared on its form.
|}
|}
Trois boutons sont présent en bas de l'écran :
There are three buttons at the bottom of the screen:
* '''Modifier''' vous permettra d'entrer en édition de la liste pour en modifier la requête ou tout autre élément (menus d'accès, onglets d'affichage …
* '''Modify''' will allow you to edit the list to modify the query or any other element (access menus, display tabs, etc.)
* '''Importation / Exportation de la page''' générera le fichier XML que vous pourrez modifier avant de le copier pour l'exporter
* '''Import / Export the page''' will generate the XML file that you can modify before copying it to export it
* '''Supprimer''' effacera la liste de votre base de données. Désactivez toujours une liste avant de la supprimer. Si vous effectuez une suppression sans avoir désactivé la liste auparavant, elle restera présente dans votre base de donnée et sur votre interface, mais vidée de son contenu|warn
* '''Delete''' will erase the list from your database. Always deactivate a list before deleting it. If you delete it without having deactivated the list beforehand, it will remain present in your database and on your interface, but emptied of its content|warn
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
===List fields===
===Champs de la liste===
From the list screen, it is possible to create fields, click on the New field button or the (+) icon at the end of the title:
A partir de l'écran de la liste, il est possible de créer des champs, cliquez sur le bouton Nouveau champ ou le l'icone (+) en bout de titre:
{| class="wikitable"
{| class="wikitable"
|- style="vertical-align:top;"
|- style="vertical-align:top;"
| [[file:new_mylist_field.png|600px]]
| [[file:new_mylist_field.png|600px]]
|
|
* Nom du champ : nom du champ tel qu'il est présent dans les tables de Dolibarr
* Field name: name of the field as it is present in the Dolibarr tables
* Alias : il s’agit de l’alias du champ dans le sens base de données. Cet alias n’est pas obligatoire
* Alias: this is the alias of the field in the database sense. This alias is not mandatory
* Nom : titre de colonne affiché dans la liste
* Name: column title displayed in the list
*Largeur : la largeur saisie ici s'appliquera au champ à l'écran
* Width: the width entered here will apply to the field on the screen
*Largeur sur l'édition : la largeur saisie ici s'appliquera à l'édition PDF
* Width on edition: the width entered here will apply to the PDF edition
*Alignement
* Alignment
*Actif : le champ sera présent et affiché par défaut. Son affichage pourra être modifié depuis le bouton autres colonnes.
* Active: the field will be present and displayed by default. Its display can be modified from the other columns button.
*Visible : le champ sera affiché dans la liste
*Visible: the field will be displayed in the list
*Filtre par défaut : ajouter un filtre par défaut permet l'enregistrement d'une valeur de filtrage active dès l'affichage de la liste.
*Default filter: adding a default filter allows the recording of an active filter value as soon as the list is displayed.
* Type : ce paramètre suit généralement le fonctionnement des champs supplémentaires natifs de Dolibarr.  
* Type: this parameter generally follows the operation of Dolibarr's native additional fields.
|}
|}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
<span id="Liste_des_types_possibles"></span>
====Liste des types possibles====
====List of possible types====
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
* Text: displays the field in text format
* Texte : affiche le champs au format texte
* Price: displays a number using the precision format defined in Dolibarr
* Prix : affiche un nombre en utilisant le format de précision défini dans Dolibarr
* Percentage: displays a number as a percentage
* Pourcentage : affiche un nombre en pourcentage
* Date: displays a date in "day" format
* Date : affiche une date au format « jour »
* Duration: displays the numeric value in time format (e.g. the value 7200 will be displayed as 2:00)
* Durée : affiche la valeur numérique au format heure (ex: la valeur 7200 s'affichera 2:00)
* Boolean: displays a yes or no in the cell of the line
* Boolean : affiche un oui ou un non dans la cellule de la ligne
* ​​Status/State: corresponds to the format of the statuses of the elements (be careful, this type requires additional configuration
* Statut/Etat : correspond au format des statuts des éléments (attention ce type nécessite un paramétrage supplémentaire
* List: Displays the content of the field but also a filter list
* Liste : Affiche le contenu du champs mais aussi une liste de filtrage
* List type extrafield: to highlight the value of an additional field on the sheets on a myList, select this type of field. Its parameter will then be <code>ElementName:FieldName</code>. For example, to display the content of the extrafield <code>extrafield</code> recorded on a product sheet, enter <code>product:extrafield</code>.
* Extrafield de type liste : pour faire ressortir sur une myList la valeur d'un champ supplémentaire sur les fiches, sélectionnez ce type de champ. Son paramètre sera alors <code>NomDeLElement:NomDuCHamp</code>. Par exemple, pour affiche le contenu de l'extrafield <code>extrafield</code> enregistré sur la fiche d'un produit, saisissez <code>product:extrafield</code>.
* Eval: allows you to enter in the parameters a php code which uses the dol_eval function of the additional calculated fields
* Eval : permet de saisir dans les paramètres un code php qui utilise la fonction dol_eval des champs supplémentaires calculés
</div>




<div lang="fr" dir="ltr" class="mw-content-ltr">
depending on the type of fields created, other fields may appear for modification.
selon le type de champs crée il d'autres champs peuvent apparaitre en modification.
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
{{Note|The fields below only apply to price or number type fields.|warn}}
{{Note|Les champs ci-dessous ne s'appliquent qu'aux champs de type prix ou nombre.|warn}}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
* Field Totalization: Will display a table with the totals of the fields for which the feature has been enabled.
* Totalisation du champ : affichera un tableau avec les totaux des champs pour lesquels la fonctionnalité aura été activée.
* Field Average: Will display a table with the averages of the fields for which the feature has been enabled.
* Moyenne du champ : affichera un tableau avec les moyennes des champs pour lesquels
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
====Field Setting====
====Paramètre du champ====
This feature is related to the setting of key type fields (<code>rowid</code> and <code>fk_xxx</code>) for list fields of type text, list and status.  
Cette fonctionnalité est liée au paramétrage des champs de type clé (<code>rowid</code> et <code>fk_xxx</code>) pour les champs de liste de type texte, liste et statut.
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
It allows you to make it clickable and/or filterable by drop-down list.
Elle permet de rendre cliquable et/ou filtrable par liste déroulante.
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
Feeding this field requires knowledge of the tables and the organization of the classes of the different elements of Dolibarr.
L'alimentation de ce champ nécessite une connaissance des tables et de l'organisation des classes des différents éléments de Dolibarr.
Some examples of parameter formation:
Quelques exemples de formation du paramètre :
* 1st case: list from a table
* 1er cas : liste issue d'une table
Table: <code>c_typent</code> (without the prefix)
Table : <code>c_typent</code> (sans le préfixe)
Key: <code>id</code>
Clé : <code>id</code>
Label: <code>libelle</code>
Libellé : <code>libelle</code>
Parameter to indicate in the configuration of the myList field: <code>c_typent:id:libelle</code>
Paramètre à indiquer dans le paramétrage du champ de myList : <code>c_typent:id:libelle</code>
* 2nd case: make the list results clickable
* 2ème cas : rendre cliquables les résultats de liste
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
{| class="wikitable"
{| class="wikitable"
|- style="vertical-align:top;"
|- style="vertical-align:top;"
| [[file:new_mylist_field_param_conctact.png|600px]]  
| [[file:new_mylist_field_param_conctact.png|600px]]
Exemple de saisie d'un champ cliquable pour les contacts
Example of entering a clickable field for contacts
|
|
::Nom de la classe de l'élément à rendre cliquable : <code>Facture:</code>
::Name of the class of the element to make clickable: <code>Invoice:</code>
::Chemin du fichier définissant la classe : <code>/compta/facture/class/facture.class.php</code>
::Path of the file defining the class: <code>/compta/invoice/class/invoice.class.php</code>
::Nom de la table : <code>:facture</code>
::Name of the table: <code>:invoice</code>
::Champ à afficher : <code>nom_du_champ</code>
::Field to display: <code>field_name</code>
::Paramètre à indiquer dans le paramétrage du champ de myList : <code>Facture:/compta/facture/class/facture.class.php:facture:nom_du_champ</code>
::Parameter to indicate in the configuration of the myList field: <code>Invoice:/compta/invoice/class/invoice.class.php:invoice:field_name</code>
</div>


  <div lang="fr" dir="ltr" class="mw-content-ltr">
  [[file:new_mylist_field_display_contact.png|300px]]
[[file:new_mylist_field_display_contact.png|300px]]  
Result displayed for the example opposite for contacts
Résultat affiché pour l'exemple ci-contre pour les contacts
|}
|}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
* Most frequently used parameters:
* Paramètres les plus fréquemment utilisés :
::Third party: <code>Company:/company/class/company.class.php</code>
::Tiers : <code>Societe:/societe/class/societe.class.php</code>
::Contact: <code>Contact:/contact/class/contact.class.php</code>
::Contact : <code>Contact:/contact/class/contact.class.php</code>
::Users: <code>User:/user/class/user.class.php:user:lastname</code>
::Utilisateurs : <code>User:/user/class/user.class.php:user:lastname </code>
::Product: <code>Product:/product/class/product.class.php</code>
::Produit : <code>Product:/product/class/product.class.php</code>
::Sales proposal: <code>Propal:/comm/propal/class/propal.class.php</code>
::proposition commerciale : <code>Propal:/comm/propal/class/propal.class.php</code>
::Customer order:<code>Order:/order/class/order.class.php:order:ref</code>
::Commande client :<code>Commande:/commande/class/commande.class.php:commande:ref</code>
::Customer invoice: <code>Invoice:/accounting/invoice/class/invoice.class.php</code>
::Facture client : <code>Facture:/compta/facture/class/facture.class.php</code>
::Project: <code>Project:/project/class/project.class.php</code>
::Projet : <code>Project:/projet/class/project.class.php</code>
::Tasks: <code>Task:/project/class/task.class.php</code>
::Taches : <code>Task:/projet/class/task.class.php</code>
::Contract: <code>Contract:/contract/class/contract.class.php</code>
::Contrat : <code>Contrat:/contrat/class/contrat.class.php</code>
::Intervention: <code>Fichinter:/fichinter/class/fichinter.class.php</code>
::Intervention : <code>Fichinter:/fichinter/class/fichinter.class.php</code>
::Shipping: <code>Shipping:/shipping/class/shipping.class.php</code>
::Expédition : <code>Expedition:/expedition/class/expedition.class.php</code>
::Supplier order: <code>SupplierOrder:/supplier/class/supplier.order.class.php</code>
::Commande fournisseur : <code>CommandeFournisseur:/fourn/class/fournisseur.commande.class.php</code>
::Supplier invoice: <code>SupplierInvoice:/supplier/class/supplier.invoice.class.php</code>
::Facture fournisseur : <code>FactureFournisseur:/fourn/class/fournisseur.facture.class.php</code>
::Warehouse: <code>Warehouse:/product/stock/class/warehouse.class.php</code>
::Entrepôt : <code>Entrepot:/product/stock/class/entrepot.class.php</code>
::Event: <code>ActionComm:/comm/action/class/actioncomm.class.php</code>
::Événement : <code>ActionComm:/comm/action/class/actioncomm.class.php</code>
::Bank: <code>Account:/compta/bank/class/account.class.php</code>
::Banque : <code>Account:/compta/bank/class/account.class.php</code>
::Category: <code>Category:/categories/class/categorie.class.php</code>
::Catégorie : <code>Categorie:/categories/class/categorie.class.php</code>
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
* for text type fields containing a url, it is possible to make them clickable by adding the "url" parameter
* pour les champs de type texte contenant une url, il est possible de les rendre cliquable en ajoutant le paramètre "url"
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
<span id="Champ_de_type_catégorie"></span>
==== Champ de type catégorie  ====
==== Category type field ====
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
for category type fields, the following settings must be made:
pour les champs de type catégorie il convient de réaliser le paramétrage suivant :
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
{| class="wikitable"
{| class="wikitable"
|- style="vertical-align:top;"
|- style="vertical-align:top;"
| [[file:mylist_categorie_field_contact.png|600px]]
| [[file:mylist_categorie_field_contact.png|600px]]
|
|
* nom de champ : le champs qui fait le lien entre la liste et la catégorie
* field name: the field that links the list to the category
* Paramètre de champ : la valeur avant la séparation correspond au nom de la table catégorie (dans l'exemple llx_categorie_member) la seconde valeur correspond au lien vers le champs saisie dans le nom du champ (ici fk_element)
* Field parameter: the value before the separation corresponds to the name of the category table (in the example llx_categorie_member) the second value corresponds to the link to the field entered in the field name (here fk_element)
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
Here are some other examples of category parameters:
Voici d'autres exemples de paramètre de catégorie :  
* supplier:fk_soc
* fournisseur:fk_soc
* company:fk_soc
* societe:fk_soc
* contact:fk_socpeople
* contact:fk_socpeople
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
|- style="vertical-align:top;"
|- style="vertical-align:top;"
| [[file:mylist_categorie_result.png|600px]]
| [[file:mylist_categorie_result.png|600px]]
| Il est alors possible de sélectionner plusieurs catégories pour le filtrage.
| It is then possible to select several categories for filtering.
Si l'on utilise la coche, le filtrage de plusieurs catégories se fera par OU au lieur de ET
If you use the check mark, filtering several categories will be done by OR instead of AND
</div>




<div lang="fr" dir="ltr" class="mw-content-ltr">
|}
|}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
====Field filtering ====
====Filtrage sur les champs ====
:Filtering options on field values.
:Options de filtrage sur les valeurs du champ.
:{| class="wikitable"
:{| class="wikitable"  
|- style="background-color:orange; font-weight:bold;"
|- style="background-color:orange; font-weight:bold;"  
| Duration, Number, Sum, Price
| Durée, Nombre, Somme, Prix
| Result
| Résultat
|-
|-  
| < 20000
| < 20000  
| numbers < and = to 200000
| nombres < et = à 200000
|-
|-  
| 200000-300000
| 200000-300000
| nombres de 200000 à 300000 inclus
| numbers from 200000 to 300000 inclusive
|- style="background-color: orange; font-weight:bold;"
|- style="background-color: orange; font-weight:bold;"
| Date  
| Date
|  
|
|-  
|-
|2008
|2008
| toutes les dates de 2008 du 01/01 au 31/12 inclus
| all dates of 2008 from 01/01 to 31/12 inclusive
|-  
|-
| 2006-2009
| 2006-2009
| toutes les dates du 01/01/2006 au 31/12/2009 inclus
| all dates from 01/01/2006 to 31/12/2009 inclusive
|-  
|-
| >2004
| >2004
| toutes les dates supérieures (ou =) au 01/01/2004
| all dates greater than (or =) 01/01/2004
|-  
|-
| 20060401
| 20060401
| Tous les éléments correspondant au jour saisi au format AAAMMJJ
| All items corresponding to the day entered in YYYYMMDD format
|}
|}
::Boolean, Liste, Statut : dans le cas d’un filtre booléen, trois valeurs sont sélectionnables dans la liste :
::Boolean, List, Status: in the case of a Boolean filter, three values ​​can be selected in the list:
:::vide : le champ n’est pas filtré
:::empty: the field is not filtered
:::<code>vrai</code> : sélectionne les valeurs saisies à « vrai »
:::<code>true</code>: selects values ​​entered as "true"
:::<code>faux</code> : sélection des valeurs saisies à « faux »
:::<code>false</code>: selects values ​​entered as "false"
:::Dans les autres cas, cela dépend du paramétrage additionnel du champ.
:::In other cases, it depends on the additional setting of the field.
====Remarques sur le filtrage====
====Remarks on filtering====
* Une zone au format Check n’est pas filtrable
* A Check format zone is not filterable
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
* In the case of filtering by a user's company (for example to filter a list on invoices) you must use the #SOCID# value as the default value on a field containing the company key
* Dans le cas d'un filtrage par la société d'un utilisateur (par exemple pour filtrer une liste sur les facture) il faut utiliser la valeur #SOCID# comme valeur par défaut sur un champ contenant la clé de la société
* In the case of filtering by the default user, you must use the #USERID# value as the default value on a field containing the user key
* Dans le cas d'un filtrage par l'utilisateur par défaut, il faut utiliser la valeur #USERID# comme valeur par défaut sur un champ contenant la clé l'utilisateur
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
====Calculated Fields====
====Champs Calculés====
It is possible to display a calculated field in the list from php code entered in the additional parameters.
Il est possible d'afficher un champ calculé dans la liste depuis du code php saisie dans les paramètres additionnels.
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
{| class="wikitable"
{| class="wikitable"
| [[file:mylist_Exemple_doleval.png|600px]]
| [[file:mylist_Exemple_doleval.png|600px]]
| style="vertical-align:top;" | ce type de champs reprend le fonctionnement natif des attributs supplémentaires (extrafields) et la fonction dol_eval().
| style="vertical-align:top;" | this type of fields uses the native operation of additional attributes (extrafields) and the dol_eval() function.
|}
|}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
===Management of specific keys (<code>rowid</code>, <code>fk_statut</code>)===
===Gestion des clés spécifiques (<code>rowid</code>, <code>fk_statut</code>)===
* Rowid fields: rowid fields have a particular operation in myList, associated with parameters, they allow to create a link to the element of which they are the key.
* Champs rowid : les champs rowid ont un fonctionnement particulier dans myList, associés à des paramètres, ils permettent de créer un lien vers l’élément dont ils sont la clé.
:Making a field clickable is probably the most complex problem of myList because it involves understanding a little of the Dolibarr architecture.
:Rendre un champ cliquable est sans doute la problématique la plus complexe de myList car elle implique de comprendre un peu l’architecture de Dolibarr.
:First of all, it is necessary to locate in the Dolibarr directories where the class of the element that we want to call is located and what it is named in the file
:Tout d’abord il est nécessaire de repérer dans les répertoires de Dolibarr où se trouve la classe de l’élément que l’on souhaite appeler et comment celle-ci se nomme dans le fichier
:If, for example, we want to make a supplier order clickable, we must find the file of the class associated with this element (<code>/fourn/class/fournisseur.commande.class.php</code>) then look at the name of the object class (CommandeFournisseur).
:Si l’on souhaite par exemple rendre cliquable une commande fournisseur, il faut trouver le fichier de la classe associée à cet élément (<code>/fourn/class/fournisseur.commande.class.php</code>) puis regarder le nom de la classe objet (CommandeFournisseur).
* fk_statut fields: the fk_statut fields are used to know the status of an element. However, the number and type of status is specific to each element. The selectable choices are therefore to be added to the additional parameters of the fields. As for the <code>rowid</code>, it is therefore advisable to identify the class used to define the element and add the states that you want to use by separating them with #.
* Champs fk_statut : les champs fk_statut servent à connaître l'état d'un élément. Cependant, le nombre et le type d'état est propre à chaque élément. Les choix sélectionnables sont donc à ajouter aux paramètres supplémentaires des champs. Comme pour le <code>rowid</code>, il convient donc de repérer la classe utilisée pour définir l'élément mis ajouter les états que l'on souhaite utiliser en les séparant par des #.
** example for tickets: Ticket:/ticket/class/ticket.class.php:0#1#2#3#5#7#8#9 )
** exemple pour les tickets : Ticket:/ticket/class/ticket.class.php:0#1#2#3#5#7#8#9 )
** for invoices, there is a specific value "P" for the "paid" status of the invoice ( Invoice:/compta/facture/class/facture.class.php:0#1#2#P )
** pour les factures, il y a une valeur spécifique "P" pour le statut "payé" de la facture ( Facture:/compta/facture/class/facture.class.php:0#1#2#P )
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
{| class="wikitable"
{| class="wikitable"
| [[file:mylist_Exemple_champs.png|600px]]
| [[file:mylist_Exemple_champs.png|600px]]
| style="vertical-align:top;" | Terminez la création des champs sur le modèle ci-contre
| style="vertical-align:top;" | Finish creating the fields on the model opposite
|}
|}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
To make the list accessible from the Dolibarr menus, you just need to modify the list to make it active.
Pour que la liste soit accessible depuis les menus de Dolibarr, il vous suffit de modifier la liste pour la rendre active.
{{Note|Before making the list active, you can display it with its query using the menu link '''Patas-M Tools > MyList'''.
{{Note|Avant de rendre la liste active, vous pouvez l'afficher avec sa requête en utilisant le lien de menu '''Outils Patas-M > MyList'''.
This trick only works on lists that are not yet activated.}}
Cette astuce ne fonctionne que sur les liste non encore activées.}}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
[[file:mylist_Liste_test.png|600px]]
[[file:mylist_Liste_test.png|600px]]
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
{| class="wikitable"
{| class="wikitable"
| [[file:mylist_Liste_affichee.png|600px]]
| [[file:mylist_Liste_affichee.png|600px]]
| style="vertical-align:top;" | Une fois la liste activée, elle apparaîtra depuis les liens définis sur sa page de création.
| style="vertical-align:top;" | Once the list is activated, it will appear from the links defined on its creation page.
Le bouton '''Export en CSV''' permet d'effectuer un export des résultats de la liste au format CSV pour un traitement externe. Il est nécessaire d'avoir activé la fonctionnalité d'export dans la "Configuration" et dans le paramétrage enregistré lors de la "Champs de la page de création d'une liste".
The '''Export to CSV''' button allows you to export the results of the list in CSV format for external processing. It is necessary to have activated the export functionality in the "Configuration" and in the settings saved during the "Fields on the list creation page".
|}
|}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
{| class="wikitable"
{| class="wikitable"
| [[file:mylist_Liste_test.png|600px]]
| [[file:mylist_Liste_test.png|600px]]
| style="vertical-align:top;" | Si vous avez paramétré la liste pour l'afficher dans l'onglet d'une fiche, les résultats seront filtrés selon l'élément.  
| style="vertical-align:top;" | If you have set the list to display it in the tab of a card, the results will be filtered according to the element.
{{Note|Le filtrage de l'affichage des résultats de la liste nécessite la présence d'une condition dans sa requête SQL. Si aucune n'est présente, ajoutez par exemple WHERE <nowiki>1 = 1</nowiki> }}
{{Note|Filtering the display of the list results requires the presence of a condition in its SQL query. If none is present, add for example WHERE <nowiki>1 = 1</nowiki> }}
|}
|}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
<span id="Autres_fonctionnalités"></span>
==Autres fonctionnalités==
==Other Features==
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
=== Tab in the element ===
=== Onglet dans l'élément ===
It is possible to display a myList as a tab of an element
Il est possible d'afficher un myList comme un onglet d'un élément
for this it is necessary to use in the SQL query a particular alias for the table associated with the element
pour cela il faut utiliser dans la requete SQL un alias particulier pour la table associé à l'élément
{| class="wikitable"
{| class="wikitable"
|- style="background-color:orange; font-weight:bold;"  
|- style="background-color:orange; font-weight:bold;"
| prefix
| prefix
| Element
| Element
|-
| s
| Tiers (société)
|-
| p
| Produit
|-
|-
| e  
| s
| Stock (entrepot)
| Third party (company)
|-
| p
| Product
|-
| e
| Stock (warehouse)
|-
| p
| Project
|-
|-
| p
|p
| Projet
|-
|p  
| Propal
| Propal
|-
|c
| commande
|-
|-
| f
|c
| Facture
| order
|-
|pf
| Demande de prix
|-
|-
| cf
| f
| commande fournisseur
| Invoice
|-
|-
| ff  
|pf
| Facture Fournisseur
| Price request
|-
| cf
| supplier order
|-
| ff
| Supplier invoice
|}
|}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
<span id="Import_d&#039;une_liste"></span>
===Import d'une liste===
===Importing a list===
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
It is possible to save a list and the settings of its fields by importing an '''XML''' file.
Il est possible d'enregistrer une liste et le paramétrage de ses champs en important un fichier '''XML'''.
{{Note|List examples are provided with the MyList module in the XMLsample folder}}
{{Note|Des exemples de liste sont livrés avec le module MyList dans le dossier XMLsample}}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
{| class="wikitable"
{| class="wikitable"
| [[file:mylist_Import.png|600px]]
| [[file:mylist_Import.png|600px]]
| style="vertical-align:top;" | Depuis la page '''Outils Patas-M > MyList > Importer une liste''', collez le fichier XML dans la zone de saisie et cliquez sur le bouton '''Lancer l'importation'''.
| style="vertical-align:top;" | From the page '''Patas-M Tools > MyList > Import a list''', paste the XML file in the input area and click on the button '''Start import'''.
Activez la liste depuis sa fiche et elle sera accessible depuis vos menus de Dolibarr
Activate the list from its file and it will be accessible from your Dolibarr menus
|}
|}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
Activate the list from its file and it will be accessible from your Dolibarr menus.
Activez la liste depuis sa fiche et elle sera accessible depuis vos menus de Dolibarr.
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
===Processing queries===
===Requêtes de traitement===
In addition to the list display query, a processing query can provide the possibility of performing new actions, always from SQL queries.
En complément de la requête d'affichage de la liste, une requête de traitement peut donner la possibilité d'effectuer de nouvelles actions, toujours à partir de requêtes SQL.
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
{| class="wikitable"
{| class="wikitable"
| [[file:mylist_Fiche_liste_traitement.png|600px]]
| [[file:mylist_Fiche_liste_traitement.png|600px]]
| style="vertical-align:top;" | Partons d'une liste de contacts et ajoutons dans le champ '''Requête de traitement'' la ligne <code>DELETE FROM 'llx_socpeople' WHERE rowid=#ROWID#</code> permettant leur suppression.
| style="vertical-align:top;" | Let's start with a list of contacts and add in the field '''Processing request'' the line <code>DELETE FROM 'llx_socpeople' WHERE rowid=#ROWID#</code> allowing their deletion.
|}
|}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
{| class="wikitable"
{| class="wikitable"
| [[file:mylist_Liste_traitement.png|600px]]
| [[file:mylist_Liste_traitement.png|600px]]
| style="vertical-align:top;" | Modifiez l'un des champs pour l'enregistrer au type checkable. La liste devient alors tel que ci-contre.
| style="vertical-align:top;" | Change one of the fields to save it as checkable. The list will then become as shown opposite.
Les cases à cocher serviront à sélectionner les résultats de la liste auxquels appliquer le traitement indiqué dans la requête. Dans notre exemple, les contacts sélectionnés seront supprimés de la base de données.
The checkboxes will be used to select the results of the list to which to apply the treatment indicated in the query. In our example, the selected contacts will be deleted from the database.
|}
|}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
===Selecting fields when displaying lists===
===Sélection des champs à l'affichage des listes===
{| class="wikitable"
{| class="wikitable"
| [[file:mylist_Datatables.png|600px]]
| [[file:mylist_Datatables.png|600px]]
| style="vertical-align:top;" | En activant DataTables dans la "Configuration", vous pouvez choisir les colonnes de la liste à afficher ou non par cases à cocher depuis le bouton '''Autres colonnes'''
| style="vertical-align:top;" | By activating DataTables in the "Configuration", you can choose the columns of the list to display or not by checkboxes from the button '''Other columns'''
|}
|}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
==Frequently Asked Questions==
==Questions fréquentes==
===General Issues===
===soucis généraux===
This chapter lists the difficulties encountered with the module. You will therefore find some answers there regarding its use.
Ce chapitre répertorie les difficultés rencontrées avec le module. Vous y trouverez donc des éléments de réponse quant à son utilisation.
If you encounter an error other than those described below when using this module:
Si vous rencontrez une autre erreur que celles décrites ci-dessous lors de l'utilisation de ce module :
#Disable and reactivate the module,
#Désactivez et réactivez le module,
#Check on the ChangeLog if a new version has been published,
#Vérifier sur le ChangeLog si une nouvelle version a été publiée,
#Re-install/update the module,
#-installez/mettez à jour le module,
#Check that replacing native Dolibarr files is not necessary for the module to function properly.
#Vérifiez que le remplacement de fichiers natifs de Dolibarr ne soit pas nécessaire au bon fonctionnement du module.
#Check that no incompatibility with another module is indicated. If necessary, follow our recommendations.
#Vérifiez qu'aucune incompatibilité avec un autre module ne soit indiquée. Le cas échéant, suivez nos préconisations.
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
If, despite these manipulations, the error persists, contact us using the dedicated form (http://docs.patas-monkey.com/support/).
Si, malgré ces manipulations, l'erreur persiste, contactez-nous en utilisant le formulaire dédié (http://docs.patas-monkey.com/support/).
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
===List results are not what you expected===
===Les résultats de la liste ne sont pas ceux attendus===
:The best way to ensure the quality of your SQL query is to query your database directly via phpmyadmin or equivalent software. Adapt the list query to paste it into the phpmyadmin SQL area. If the results are the same as the list, review your query.
:Le meilleur moyen de s'assurer de la qualité de votre requête SQL est d'interroger directement votre base de données via phpmyadmin ou logiciel équivalent. Adapter la requête de la liste pour la coller dans la zone SQL de phpmyadmin. Si les résultats sont les mêmes que la liste, revoyez votre requête.
Otherwise, myList may have a bug. Contact us! (docs.patas-monkey.com/support).
Dans le cas contraire, myList peut présenter un bug. Contactez-nous ! (docs.patas-monkey.com/support).
===Your lists do not appear/no longer appear in your menus===
===Vos listes n'apparaissent pas/plus dans vos menus===
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
Following an update of the module or the lists themselves, even if your lists indicate that they are activated, you will have to reactivate them by entering the Active field in edit mode and saving again.
Suite à une mise à jour du module ou des listes elles-mêmes, même si vos listes indiquent qu'elles sont activées, vous devrez les réactivez en entrant en édition du champ Active et en enregistrant à nouveau.
{| class="wikitable"
{| class="wikitable"
| [[file:Mylist-reload-list.png|400px]]
| [[file:Mylist-reload-list.png|400px]]
| style="vertical-align:top;" |  
| style="vertical-align:top;" |
Il est aussi possible de recharger l'ensemble des listes depuis la liste des listes avec le bouton suivant
It is also possible to reload all the lists from the list of lists with the following button
|}
|}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
===Error message when launching myList ===
===Message d'erreur au lancement du myList ===
{| class="wikitable"
{| class="wikitable"
| Message d'erreur '''DB_ERROR_NOSUCHFIELD ou DB_ERROR_NOSUCHTABLE'''
| Error message '''DB_ERROR_NOSUCHFIELD or DB_ERROR_NOSUCHTABLE'''
[[file:Mylist-erreur.png|600px]]
[[file:Mylist-erreur.png|600px]]
| style="vertical-align:top;" |  
| style="vertical-align:top;" |
Vous avez indiqué dans votre requête un champ ou une table qui n'existent pas dans votre base de donnée ou qui n'est pas identifiable.
You have indicated in your query a field or a table that does not exist in your database or that is not identifiable.  
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
Review your SQL query. This is often a typo or bad linking in your query.
Revoyez votre requête SQL. Il s'agit souvent d'une faute de frappe ou d'une mauvaise liaison dans votre requête.
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
The content of the message will help you identify the error with the lines '''Return code last access to database in error and Information on last access to database in error'''.
Le contenu du message vous aidera à identifier l'erreur avec les lignes '''Code retour dernier accès en base en erreur et Information sur le dernier accès en base en erreur'''.
|}
|}
</div>


<div lang="fr" dir="ltr" class="mw-content-ltr">
===Deleted List Still Present===
===Liste supprimée toujours présente===
You deleted the list without disabling it first. Mylist can no longer delete the list: you will need to clean your database by deleting the list from the llx_mylist table from phpmyadmin.
Vous avez supprimé la liste sans la désactiver d'abord. Mylist ne peut plus supprimer la liste : vous devrez nettoyer votre base de données en supprimant la liste de la table llx_mylist depuis phpmyadmin.
===Error Message When Creating the List===
===Message d'erreur à la création de la liste===
If you have upgraded MyList from an older version, you may encounter an error message when creating a list.
Si vous avez effectué une mise à jour de MyList depuis une ancienne version, il est possible que vous rencontriez un message d'erreur à la création d'une liste.
To fix it, you will need to perform the following query on your database: <code>ALTER TABLE `llx_mylist` CHANGE `model_pdf` `model_pdf` VARCHAR(255) NULL DEFAULT NULL;</code>
Pour le corriger, vous devrez effectuer la requête suivante sur votre base de données : <code>ALTER TABLE `llx_mylist` CHANGE `model_pdf` `model_pdf` VARCHAR(255) NULL DEFAULT NULL;</code>
</div>

Dernière version du 15 janvier 2025 à 17:27

This Module allows the creation of personalized lists,

it is also possible:

  • to create sums, cumulatives and averages of the numeric fields present in the list
  • to create an edition in PDF format of the list
  • to generate exports in CSV format of the lists

Presentation

The myList Module allows you to create your own personalized lists from the information contained in your database and make them accessible from the Dolibarr menus. The information is retrieved by SQL query.

From the custom lists, different actions can be performed from additional processing requests (deletion, update, etc.).

MyList comes with three list import files to inspire you to create your own lists: contacts to call back, list of unpaid invoices and turnover.

myList also includes:

Sums and averages of the calculated fields of myList on screen and on edition

PDF editions

myList also includes two new field types that allow the display of a tooltip of additional field values ​​from a list or dictionaries.

Configuration of the module features

Configuration

The module configuration is done from the modules administration page accessible via the menus Home > Configuration > Modules by clicking on the icon or at the end of the line.

The myList module configuration page contains the settings provided by myListMore. Mylistmore therefore does not require any specific settings.

Enabling export will allow the extraction of data present in the lists in CSV format for later reprocessing.

You will finally be able to activate the editions and choose the one used by default in the edition generation table.

https://www.youtube.com/watch?v=1ZKnTFTGxfM

Permissions

Access to the module's features can be restricted to existing users and groups or those created after the module's installation. Click on the – to add a permission. A granted permission is symbolized by a green check mark ( ).

  • User and group permissions
Access to the module's features can be restricted to users and groups, from their profile then Permissions tab, according to the permissions
  • Default permissions
The default permissions (Home > Configuration > Security > Default permissions), granted to any user created after the installation of the module, if he is not added to a group, are the following

Getting started

The features of myList are accessible from the main menu tab Patas-M Tools. The features of MyListMore are added to those of MyList when creating new lists. Your secondary menu then presents the following menu entries:

  • myList: the main entry myList allows you to display all the lists defined in your environment (even if they are not active). By clicking on the title of the list, you can view the list. This screen is very useful when developing a list that is not yet active. However, it is preferable to test these lists on a test environment and then use the import/export function to set it up in production.
  • New list: this entry will display the page for creating a new list.
  • My Lists: The My Lists link allows you to display the list of lists present in your environment. The link at the beginning of the line allows you to display the result of the list query in addition to its results.
  • Import a list: This entry will display a page allowing you to copy an import file of a list in XML format. (See "Importing a list" below).

Creating a list

Open the list creation page from the menu link Patas-M Tools > Mylist > New list:

Label

the label will be displayed as the title of the list display page.
Description a text presenting the list
Menu title the title will be displayed in the Dolibarr menus as a link to the list

Main menu and Secondary menu

to determine the location of the list in the Dolibarr menus, it is necessary to indicate them by filling in the fields with their exact name.

The values ​​to be entered here are present in the menu URLs:

Example of the third party main menu:

...htdocs/company/index.php?mainmenu=companies&leftmenu=

Example of a secondary menu:

...htdocs/societe/index.php?leftmenu=thirdparties

Tab in item List results can be displayed in a tab added to the cards of the item selected in this list (third parties, products, projects, third party and product categories) and filtered to only display results related to itself.

To make the link between the myList and the selected element, you must use the #ID# constant which will transmit the value to the query to filter the data.

Authorizations Dolibarr natively has advanced features to manage access rights to its menus. It is possible to use this field to enter an authorization condition to access the content of the page if the condition is not respected, the menu will be grayed out.

Generally, the authorizations are defined as follows: $user->rights->element->right where element corresponds to a Dolibarr module (quote, order, project, etc.) and right to authorization on the module (read, write, configure, etc.).

For example, to allow access only to users with read access to commercial proposals, you must enter $user->rights->propale->read.

To identify the authorization you want to use, a tip is to go to the configuration file of the module managing this authorization.

Language file in order to make the variable names more explicit when entering them and the column headers on the tables, it is possible to use the translation files.

Just add one or more language file names separated by a #

If the language file is not placed in the Dolibarr core folder, you must add @modulename to it.

Author
CSV Export conditions the display of a CSV export button for the list result
Printable document select here the orientation of the PDF that will be proposed to you by default to generate the results of your lists.
Note: To be able to select the documents, they must have been activated in the module configuration
Table query SQL query that will define the display of the data
Processing query will allow you to configure a processing on the list results such as DELETE, UPDATE
Default custom fields Custom fields entered here allow you to define a set of variables used by the query to pre-filter fields that are not necessarily displayed.

It is possible to create multiple custom fields by separating them with :

Example of creating a simple list

Creation page

For the example, let's create a list of products and services displaying their selling price, cost and PMP, accessible from the main Products/Services menu:

Open the page for creating a new list and enter the data opposite, then complete the first step of creating the list by clicking on the Create button
Once the list is created, three new fields are displayed and can be modified when editing the form:
  • CSV export allowed: this feature will allow the CSV export of the results of the list for later reprocessing.
  • Force display of all results: this feature will force the display of all the results of the list without filtering.
Depending on the complexity of your query and the amount of information to be processed, activating this feature can slow down the system
  • Active list: following its creation, a list is by default, Inactive. Modify its status to allow its display from the menu links declared on its form.

There are three buttons at the bottom of the screen:

  • Modify will allow you to edit the list to modify the query or any other element (access menus, display tabs, etc.)
  • Import / Export the page will generate the XML file that you can modify before copying it to export it
  • Delete will erase the list from your database. Always deactivate a list before deleting it. If you delete it without having deactivated the list beforehand, it will remain present in your database and on your interface, but emptied of its content|warn

List fields

From the list screen, it is possible to create fields, click on the New field button or the (+) icon at the end of the title:

  • Field name: name of the field as it is present in the Dolibarr tables
  • Alias: this is the alias of the field in the database sense. This alias is not mandatory
  • Name: column title displayed in the list
  • Width: the width entered here will apply to the field on the screen
  • Width on edition: the width entered here will apply to the PDF edition
  • Alignment
  • Active: the field will be present and displayed by default. Its display can be modified from the other columns button.
  • Visible: the field will be displayed in the list
  • Default filter: adding a default filter allows the recording of an active filter value as soon as the list is displayed.
  • Type: this parameter generally follows the operation of Dolibarr's native additional fields.

List of possible types

  • Text: displays the field in text format
  • Price: displays a number using the precision format defined in Dolibarr
  • Percentage: displays a number as a percentage
  • Date: displays a date in "day" format
  • Duration: displays the numeric value in time format (e.g. the value 7200 will be displayed as 2:00)
  • Boolean: displays a yes or no in the cell of the line
  • ​​Status/State: corresponds to the format of the statuses of the elements (be careful, this type requires additional configuration
  • List: Displays the content of the field but also a filter list
  • List type extrafield: to highlight the value of an additional field on the sheets on a myList, select this type of field. Its parameter will then be ElementName:FieldName. For example, to display the content of the extrafield extrafield recorded on a product sheet, enter product:extrafield.
  • Eval: allows you to enter in the parameters a php code which uses the dol_eval function of the additional calculated fields


depending on the type of fields created, other fields may appear for modification.

The fields below only apply to price or number type fields.
  • Field Totalization: Will display a table with the totals of the fields for which the feature has been enabled.
  • Field Average: Will display a table with the averages of the fields for which the feature has been enabled.

Field Setting

This feature is related to the setting of key type fields (rowid and fk_xxx) for list fields of type text, list and status.

It allows you to make it clickable and/or filterable by drop-down list.

Feeding this field requires knowledge of the tables and the organization of the classes of the different elements of Dolibarr. Some examples of parameter formation:

  • 1st case: list from a table

Table: c_typent (without the prefix) Key: id Label: libelle Parameter to indicate in the configuration of the myList field: c_typent:id:libelle

  • 2nd case: make the list results clickable

Example of entering a clickable field for contacts

Name of the class of the element to make clickable: Invoice:
Path of the file defining the class: /compta/invoice/class/invoice.class.php
Name of the table: :invoice
Field to display: field_name
Parameter to indicate in the configuration of the myList field: Invoice:/compta/invoice/class/invoice.class.php:invoice:field_name

Result displayed for the example opposite for contacts

  • Most frequently used parameters:
Third party: Company:/company/class/company.class.php
Contact: Contact:/contact/class/contact.class.php
Users: User:/user/class/user.class.php:user:lastname
Product: Product:/product/class/product.class.php
Sales proposal: Propal:/comm/propal/class/propal.class.php
Customer order:Order:/order/class/order.class.php:order:ref
Customer invoice: Invoice:/accounting/invoice/class/invoice.class.php
Project: Project:/project/class/project.class.php
Tasks: Task:/project/class/task.class.php
Contract: Contract:/contract/class/contract.class.php
Intervention: Fichinter:/fichinter/class/fichinter.class.php
Shipping: Shipping:/shipping/class/shipping.class.php
Supplier order: SupplierOrder:/supplier/class/supplier.order.class.php
Supplier invoice: SupplierInvoice:/supplier/class/supplier.invoice.class.php
Warehouse: Warehouse:/product/stock/class/warehouse.class.php
Event: ActionComm:/comm/action/class/actioncomm.class.php
Bank: Account:/compta/bank/class/account.class.php
Category: Category:/categories/class/categorie.class.php
  • for text type fields containing a url, it is possible to make them clickable by adding the "url" parameter

Category type field

for category type fields, the following settings must be made:

  • field name: the field that links the list to the category
  • Field parameter: the value before the separation corresponds to the name of the category table (in the example llx_categorie_member) the second value corresponds to the link to the field entered in the field name (here fk_element)

Here are some other examples of category parameters:

  • supplier:fk_soc
  • company:fk_soc
  • contact:fk_socpeople
It is then possible to select several categories for filtering.

If you use the check mark, filtering several categories will be done by OR instead of AND


Field filtering

Filtering options on field values.
Duration, Number, Sum, Price Result
< 20000 numbers < and = to 200000
200000-300000 numbers from 200000 to 300000 inclusive
Date
2008 all dates of 2008 from 01/01 to 31/12 inclusive
2006-2009 all dates from 01/01/2006 to 31/12/2009 inclusive
>2004 all dates greater than (or =) 01/01/2004
20060401 All items corresponding to the day entered in YYYYMMDD format
Boolean, List, Status: in the case of a Boolean filter, three values ​​can be selected in the list:
empty: the field is not filtered
true: selects values ​​entered as "true"
false: selects values ​​entered as "false"
In other cases, it depends on the additional setting of the field.

Remarks on filtering

  • A Check format zone is not filterable
  • In the case of filtering by a user's company (for example to filter a list on invoices) you must use the #SOCID# value as the default value on a field containing the company key
  • In the case of filtering by the default user, you must use the #USERID# value as the default value on a field containing the user key

Calculated Fields

It is possible to display a calculated field in the list from php code entered in the additional parameters.

this type of fields uses the native operation of additional attributes (extrafields) and the dol_eval() function.

Management of specific keys (rowid, fk_statut)

  • Rowid fields: rowid fields have a particular operation in myList, associated with parameters, they allow to create a link to the element of which they are the key.
Making a field clickable is probably the most complex problem of myList because it involves understanding a little of the Dolibarr architecture.
First of all, it is necessary to locate in the Dolibarr directories where the class of the element that we want to call is located and what it is named in the file
If, for example, we want to make a supplier order clickable, we must find the file of the class associated with this element (/fourn/class/fournisseur.commande.class.php) then look at the name of the object class (CommandeFournisseur).
  • fk_statut fields: the fk_statut fields are used to know the status of an element. However, the number and type of status is specific to each element. The selectable choices are therefore to be added to the additional parameters of the fields. As for the rowid, it is therefore advisable to identify the class used to define the element and add the states that you want to use by separating them with #.
    • example for tickets: Ticket:/ticket/class/ticket.class.php:0#1#2#3#5#7#8#9 )
    • for invoices, there is a specific value "P" for the "paid" status of the invoice ( Invoice:/compta/facture/class/facture.class.php:0#1#2#P )
Finish creating the fields on the model opposite

To make the list accessible from the Dolibarr menus, you just need to modify the list to make it active.

Before making the list active, you can display it with its query using the menu link Patas-M Tools > MyList.

This trick only works on lists that are not yet activated.

Once the list is activated, it will appear from the links defined on its creation page.

The Export to CSV button allows you to export the results of the list in CSV format for external processing. It is necessary to have activated the export functionality in the "Configuration" and in the settings saved during the "Fields on the list creation page".

If you have set the list to display it in the tab of a card, the results will be filtered according to the element.
Filtering the display of the list results requires the presence of a condition in its SQL query. If none is present, add for example WHERE 1 = 1

Other Features

Tab in the element

It is possible to display a myList as a tab of an element for this it is necessary to use in the SQL query a particular alias for the table associated with the element

prefix Element
s Third party (company)
p Product
e Stock (warehouse)
p Project
p Propal
c order
f Invoice
pf Price request
cf supplier order
ff Supplier invoice

Importing a list

It is possible to save a list and the settings of its fields by importing an XML file.

List examples are provided with the MyList module in the XMLsample folder
From the page Patas-M Tools > MyList > Import a list, paste the XML file in the input area and click on the button Start import.

Activate the list from its file and it will be accessible from your Dolibarr menus

Activate the list from its file and it will be accessible from your Dolibarr menus.

Processing queries

In addition to the list display query, a processing query can provide the possibility of performing new actions, always from SQL queries.

Let's start with a list of contacts and add in the field 'Processing request the line DELETE FROM 'llx_socpeople' WHERE rowid=#ROWID# allowing their deletion.
Change one of the fields to save it as checkable. The list will then become as shown opposite.

The checkboxes will be used to select the results of the list to which to apply the treatment indicated in the query. In our example, the selected contacts will be deleted from the database.

Selecting fields when displaying lists

By activating DataTables in the "Configuration", you can choose the columns of the list to display or not by checkboxes from the button Other columns

Frequently Asked Questions

General Issues

This chapter lists the difficulties encountered with the module. You will therefore find some answers there regarding its use. If you encounter an error other than those described below when using this module:

  1. Disable and reactivate the module,
  2. Check on the ChangeLog if a new version has been published,
  3. Re-install/update the module,
  4. Check that replacing native Dolibarr files is not necessary for the module to function properly.
  5. Check that no incompatibility with another module is indicated. If necessary, follow our recommendations.

If, despite these manipulations, the error persists, contact us using the dedicated form (http://docs.patas-monkey.com/support/).

List results are not what you expected

The best way to ensure the quality of your SQL query is to query your database directly via phpmyadmin or equivalent software. Adapt the list query to paste it into the phpmyadmin SQL area. If the results are the same as the list, review your query.

Otherwise, myList may have a bug. Contact us! (docs.patas-monkey.com/support).

Your lists do not appear/no longer appear in your menus

Following an update of the module or the lists themselves, even if your lists indicate that they are activated, you will have to reactivate them by entering the Active field in edit mode and saving again.

It is also possible to reload all the lists from the list of lists with the following button

Error message when launching myList

Error message DB_ERROR_NOSUCHFIELD or DB_ERROR_NOSUCHTABLE

You have indicated in your query a field or a table that does not exist in your database or that is not identifiable.

Review your SQL query. This is often a typo or bad linking in your query.

The content of the message will help you identify the error with the lines Return code last access to database in error and Information on last access to database in error.

Deleted List Still Present

You deleted the list without disabling it first. Mylist can no longer delete the list: you will need to clean your database by deleting the list from the llx_mylist table from phpmyadmin.

Error Message When Creating the List

If you have upgraded MyList from an older version, you may encounter an error message when creating a list. To fix it, you will need to perform the following query on your database: ALTER TABLE `llx_mylist` CHANGE `model_pdf` `model_pdf` VARCHAR(255) NULL DEFAULT NULL;