« CustomTabs/en » : différence entre les versions
Page créée avec « =Conditional Display SQL Query= The processing query will condition the display of fields based on whether the object matches the query. It is then possible, for example, to display different fields depending on whether the object is a product or a service. Two values can be passed as parameters: * #ID#: the ID of the main object on the page * #USERID#: the ID of the active user » |
Aucun résumé des modifications |
||
(27 versions intermédiaires par le même utilisateur non affichées) | |||
Ligne 18 : | Ligne 18 : | ||
==Presentation== | ==Presentation== | ||
[[file: | [[file:customtabs_customtabs_en.png|600px]] | ||
{| class="wikitable" | {| class="wikitable" | ||
| [[file: | | [[file:customtabs_enregistrements-multiples1.png|600px]] | ||
| style="vertical-align:top;" | Access to tab content is managed by group permissions for access, reading, editing, and deleting. | | style="vertical-align:top;" | Access to tab content is managed by group permissions for access, reading, editing, and deleting. | ||
Ligne 40 : | Ligne 40 : | ||
=== List of tabs present === | === List of tabs present === | ||
[[file: liste | [[file: liste customtabs_en.png|800px]] | ||
The menu title allows you to display the list of customTabs present in Dolibarr. | The menu title allows you to display the list of customTabs present in Dolibarr. | ||
Ligne 51 : | Ligne 51 : | ||
{{Note|A tab can also be created from the tab list using the dedicated button}} | {{Note|A tab can also be created from the tab list using the dedicated button}} | ||
* Label: The label will be displayed as the name of the tab displayed on the item pages. | * Label: The label will be displayed as the name of the tab displayed on the item pages. | ||
* Table Name: The information you enter in a tab is saved in a table. Enter its name here. | * Table Name: The information you enter in a tab is saved in a table. Enter its name here. | ||
:{{Note|CustomTabs will automatically add a prefix to your table; simply enter the table name directly without a prefix. Furthermore, the table name must not contain spaces or special characters, nor be a word reserved for SQL language such as SELECT, FROM, DESC, etc.}} | :{{Note|CustomTabs will automatically add a prefix to your table; simply enter the table name directly without a prefix. Furthermore, the table name must not contain spaces or special characters, nor be a word reserved for SQL language such as SELECT, FROM, DESC, etc.}} | ||
* Element: Select from the drop-down list the element on whose records the tab will be added: third parties, contacts, products, warehouse, sales proposal, customer order, supplier order, customer invoice, supplier invoice, project, bank account, shipment, user, user group, member, VAT payment, or special expenses. | * Element: Select from the drop-down list the element on whose records the tab will be added: third parties, contacts, products, warehouse, sales proposal, customer order, supplier order, customer invoice, supplier invoice, project, bank account, shipment, user, user group, member, VAT payment, or special expenses. | ||
:{{Note|CustomTabs is interfaced with the Equipment and Factory modules. It is therefore possible to create custom tabs on equipment and production order records. | :{{Note|CustomTabs is interfaced with the Equipment and Factory modules. It is therefore possible to create custom tabs on equipment and production order records.}} | ||
* Tab type: A tab can be a record or a list. Enter the type according to your needs: | * Tab type: A tab can be a record or a list. Enter the type according to your needs: | ||
** A list-type tab only allows one record to be modified according to the settings declared in the input fields. | ** A list-type tab only allows one record to be modified according to the settings declared in the input fields. | ||
** A record-type tab allows the recording of multiple successive records. | ** A record-type tab allows the recording of multiple successive records. | ||
The tab type determines how data is displayed and saved. Depending on the type selected, the previously created tab will then display: | The tab type determines how data is displayed and saved. Depending on the type selected, the previously created tab will then display: | ||
Ligne 92 : | Ligne 90 : | ||
{| class="wikitable" | {| class="wikitable" | ||
| [[file:customtabs_Creation- | | [[file:customtabs_Creation-onglet_en.png|600px]] | ||
| style="vertical-align:top;" | Open the new tab creation page and enter the following data: | | style="vertical-align:top;" | Open the new tab creation page and enter the following data: | ||
|} | |} | ||
Ligne 99 : | Ligne 97 : | ||
{| class="wikitable" | {| class="wikitable" | ||
| [[file: | | [[file:customtabs_Onglet_cree_en.png|600px]] | ||
| style="vertical-align:top;" | Once the tab is created, several new fields are displayed and can be modified when editing the tab: | | style="vertical-align:top;" | Once the tab is created, several new fields are displayed and can be modified when editing the tab: | ||
* | *GED (Electronic Document Management): By enabling the GED option, you can store documents on the tab. Access to these documents will be limited to authorized groups. Please note that the GED function is only available for screen-type custom tabs. | ||
*Order BY list: By default, the list is sorted on the first field. You can customize the sorting by entering it. Please note that the orderby function is only available for list-type custom tabs. | *Order BY list: By default, the list is sorted on the first field. You can customize the sorting by entering it. Please note that the orderby function is only available for list-type custom tabs. | ||
Ligne 114 : | Ligne 112 : | ||
===Tab Input Fields=== | ===Tab Input Fields=== | ||
From the page displayed after creating the additional tab, click the | From the page displayed after creating the additional tab, click the '''Tab Input Fields''' tab. | ||
The elements entered here will be the content lines of the custom tab added to the records of the element selected during creation. | The elements entered here will be the content lines of the custom tab added to the records of the element selected during creation. | ||
Ligne 125 : | Ligne 123 : | ||
Continue creating the input fields using the following template: | Continue creating the input fields using the following template: | ||
[[file: | [[file:Customtabs_liste_champs_en.png|800px]] | ||
To make the tab accessible from the Dolibarr menus, simply modify it to make it '''active''' and configure the access rights (see Configuring access rights to tabs below). | To make the tab accessible from the Dolibarr menus, simply modify it to make it '''active''' and configure the access rights (see Configuring access rights to tabs below). | ||
Ligne 133 : | Ligne 131 : | ||
{| class="wikitable" | {| class="wikitable" | ||
| [[file: | | [[file:Customtabs_onglet_defaut_en.png|600px]] | ||
| style="vertical-align:top;" | Entering a template is optional. If no template is entered, the default display is used. From the "Tab Template" tab, you can define your own display using HTML code. | | style="vertical-align:top;" | Entering a template is optional. If no template is entered, the default display is used. From the "Tab Template" tab, you can define your own display using HTML code. | ||
|} | |} | ||
Ligne 147 : | Ligne 145 : | ||
For example, you can enter the following template: | For example, you can enter the following template: | ||
[[file: | [[file:cutomtabs_template_en.png|600px]] | ||
And you will get: | And you will get: | ||
[[file: | [[file:customtabs_Template_applique_en.png|600px]] | ||
or | or | ||
[[file: | [[file:customtabs_Template_applique_fiche_en.png|600px]] | ||
{{Note|If a field present in the table is not defined in the template, it will not be displayed|warn}} | {{Note|If a field present in the table is not defined in the template, it will not be displayed|warn}} | ||
Ligne 163 : | Ligne 161 : | ||
You can then update a tab in the same way or import a new tab from scratch (see below in the documentation). | You can then update a tab in the same way or import a new tab from scratch (see below in the documentation). | ||
[[file: | [[file:customtabs_importexport_en.png|600px]] | ||
<span id="Champs_calculés_et_concaténation"></span> | <span id="Champs_calculés_et_concaténation"></span> | ||
Ligne 182 : | Ligne 180 : | ||
From the secondary menu entry '''Patas-Tools > CustomTabs > Tab Access Rights''', configure user group access: | From the secondary menu entry '''Patas-Tools > CustomTabs > Tab Access Rights''', configure user group access: | ||
[[file:customtabs_Droits-d- | [[file:customtabs_Droits-d-acces_en.png|600px]] | ||
There are four access rights: | There are four access rights: | ||
Ligne 203 : | Ligne 201 : | ||
Users in the group will be able to view the tab's fields, but will not be able to edit their contents. | Users in the group will be able to view the tab's fields, but will not be able to edit their contents. | ||
===Read Access and Edit Access ([[file: | ===Read Access and Edit Access ([[file:lecture-on.png]][[file:modif-on.png]])=== | ||
Users in the group will be able to view the tab, its contents, and edit them. | Users in the group will be able to view the tab, its contents, and edit them. | ||
Ligne 230 : | Ligne 228 : | ||
With the following myfield | With the following myfield | ||
[[file: | [[file:myfield_Creation_requete_en.png|800px]] | ||
{| class="wikitable" | {| class="wikitable" | ||
|- style="vertical-align:top;" | |- style="vertical-align:top;" | ||
| We obtain the following information sheet for a '''product''' | | We obtain the following information sheet for a '''product''' | ||
[[file: | [[file:myfield_Creation_requete_result_en.png|400px]] | ||
| While for the information sheet for a '''service''' | | While for the information sheet for a '''service''' | ||
[[file:myfield_Creation_requete- | [[file:myfield_Creation_requete-fiche_en.png|400px]] | ||
|} | |} | ||
Ligne 245 : | Ligne 243 : | ||
===Import/Export Tab Settings=== | ===Import/Export Tab Settings=== | ||
You can save a tab and its fields by importing an XML file. | You can save a tab and its fields by importing an XML file. | ||
From the | From the '''Patas-M Tools > CustomTabs > Import a Tab''' page, paste the XML file into the input area and click the '''Start Import''' button: | ||
[[file: | [[file:customtabs_Import_en.png|600px]] | ||
Activate the tab from its page and it will be added to your item pages. | Activate the tab from its page and it will be added to your item pages. | ||
Ligne 254 : | Ligne 252 : | ||
===Importing and Exporting List Content=== | ===Importing and Exporting List Content=== | ||
You can import the contents of tab fields by importing a .csv file. | You can import the contents of tab fields by importing a .csv file. | ||
Tab imports and exports require these features to be enabled in the | Tab imports and exports require these features to be enabled in the '''Import/Export''' tab of the custom tabs page. | ||
{{Note|Importing/exporting tab content is only possible for list tabs|warn}} | {{Note|Importing/exporting tab content is only possible for list tabs|warn}} | ||
{| class="wikitable" | {| class="wikitable" | ||
| [[file: | | [[file:customtabs_Activation_importexport_en.png|600px]] | ||
| style="vertical-align:top;" | Enable the tab content import feature first | | style="vertical-align:top;" | Enable the tab content import feature first | ||
|} | |} | ||
Ligne 271 : | Ligne 269 : | ||
Let's take the following .csv file: | Let's take the following .csv file: | ||
[[file: | [[file:customtabs_Import_csv_en.png|600px]] | ||
From the third-party file tab, click on the '''Import csv''' button: | From the third-party file tab, click on the '''Import csv''' button: | ||
[[file: | [[file:Customtabs_Config_import_en.png|600px]] | ||
Select the file to import, and '''Add file'''. | Select the file to import, and '''Add file'''. | ||
Ligne 290 : | Ligne 288 : | ||
{| class="wikitable" | {| class="wikitable" | ||
| [[file: | | [[file:customtabs_Dictionnaire1_en.png|600px]] | ||
| style="vertical-align:top;" | Create a new List tab for the Dictionary element and note the name given to the table. | | style="vertical-align:top;" | Create a new List tab for the Dictionary element and note the name given to the table. | ||
|} | |} | ||
{| class="wikitable" | {| class="wikitable" | ||
| [[file: | | [[file:customtabs_Dictionnaire2_en.png|600px]] | ||
| style="vertical-align:top;" | In the '''Tab Input Fields''' tab, create two fields. | | style="vertical-align:top;" | In the '''Tab Input Fields''' tab, create two fields. | ||
|} | |} | ||
Ligne 302 : | Ligne 300 : | ||
{| class="wikitable" | {| class="wikitable" | ||
| [[file: | | [[file:customtabs_Dictionnaire3_en.png|600px]] | ||
| style="vertical-align:top;" | In the '''customTabs > Dictionaries''' secondary menu, open the newly created tab and add as many fields as needed. | | style="vertical-align:top;" | In the '''customTabs > Dictionaries''' secondary menu, open the newly created tab and add as many fields as needed. | ||
|} | |} | ||
Ligne 338 : | Ligne 336 : | ||
#Check that no incompatibilities with another module are indicated. If applicable, follow our recommendations. | #Check that no incompatibilities with another module are indicated. If applicable, follow our recommendations. | ||
If, despite these steps, the error persists, contact us using the dedicated form (http://docs.patas-monkey.com/support/). | |||
This form is the preferred method of contact for any usage difficulties or bug reports. We also ask that you refrain from using multiple communication channels for the same item. | |||
==Tabs not/no longer appearing on your tabs== | |||
== | : Following an update to the module or the tabs themselves, even if your tabs indicate they are enabled, you will need to reactivate them by editing the "Active Tab" field and saving again. | ||
: | : It is also possible to perform this operation for all tabs in one click using the "Reactivate Active Tabs" button in the CustomTabs list, accessible from the '''Patas-tools > CustomTabs > CustomTabs''' menu: | ||
: | |||
:[[file:customtabs_Reactivation_onglets.png]] | :[[file:customtabs_Reactivation_onglets.png]] | ||
Dernière version du 9 avril 2025 à 19:52
![]() |
The CustomTabs module allows you to add your own tabs to item cards.
The fields contained in these custom tabs replicate the functionality of Dolibarr's native additional fields. Access to customTabs tabs can be configured according to user groups The tab can be presented as a card or a list (with import/export functions) Lists can be used as custom dictionaries It is possible to use formatting templates New: The number of fields and lines entered is displayed in the tab badge. PresentationThe information stored in customTabs can be retrieved with the myList and ExtraODT modules. SettingsCustomTabs has no specific settings. Access to its features is found in the menu items Patas-tools > CustomTabs
List of tabs presentThe menu title allows you to display the list of customTabs present in Dolibarr. When you update the module (deactivation/activation) this also deactivates the customtabs, the button at the bottom of the list allows you to reactivate them en masse. Creating a New TabFields on the Tab Creation PageOpen the new tab creation page from the Patas-M Tools > CustomTabs > New Tab menu link:
The tab type determines how data is displayed and saved. Depending on the type selected, the previously created tab will then display:
Example of creating a custom tabCreation pageLet's create a tab to record third-party prospecting tracking.
Complete the first step of creating the tab by clicking the Create button.
Tab Input FieldsFrom the page displayed after creating the additional tab, click the Tab Input Fields tab. The elements entered here will be the content lines of the custom tab added to the records of the element selected during creation. To add a new field, click the New Attribute button. Creating tab fields follows the procedure for creating and operating additional fields native to Dolibarr. In the case of calculated fields, it will be possible to retrieve the id of the element to which the tab is associated with with the fk_element field Continue creating the input fields using the following template: To make the tab accessible from the Dolibarr menus, simply modify it to make it active and configure the access rights (see Configuring access rights to tabs below).
Tab Template
For example, you can enter the following template: And you will get: or
Import/Export TabOn the tab page, you can export the tab's settings and its fields to an XML file. You can then update a tab in the same way or import a new tab from scratch (see below in the documentation).
Calculated Fields and ConcatenationIt is not necessarily easy to explain the use of calculated fields in customTabs, which is why I put here two examples of complex cases on calculated fields.
implode('-', array( ($tmpsoc = new Societe($db)) && ($tmpsoc->fetchNoCompute($objectoffield->array_options[$objectoffield->rowidextrafields]['options_soc'])) ? $tmpsoc->array_options['options_urlcomp']: '---', $objectoffield->array_options[$objectoffield->rowidextrafields]['options_no_contract']))
User Access and Permissions on TabsConfiguring Tab Access RightsFrom the secondary menu entry Patas-Tools > CustomTabs > Tab Access Rights, configure user group access: There are four access rights:
Behavior based on access rightsBlocked access (
|
We obtain the following information sheet for a product | While for the information sheet for a service |
Other Features
Import/Export a Tab and Its Content
Import/Export Tab Settings
You can save a tab and its fields by importing an XML file. From the Patas-M Tools > CustomTabs > Import a Tab page, paste the XML file into the input area and click the Start Import button:
Activate the tab from its page and it will be added to your item pages. This import feature allows you to avoid the steps of creating a custom tab. To import the content of a custom tab's input fields, use the content import feature.
Importing and Exporting List Content
You can import the contents of tab fields by importing a .csv file. Tab imports and exports require these features to be enabled in the Import/Export tab of the custom tabs page.
![]() |
Importing/exporting tab content is only possible for list tabs |
![]() |
Enable the tab content import feature first |
Next, declare the line of the .csv file containing the column name, the field separator used, the character used as a separator for the field contents, and the column identification method:
- Based on field label: The first line of your .csv file will contain the field label as displayed on the screen. In our example, Start Date, Comment, etc.
- Based on field name: The first line of your .csv file will contain the field code as recorded for each input field. In our example, Start Date, Comment, etc.
- Based on field order: The fields in the tab will be populated with the data as ordered in your .csv file.
![]() |
The "Allow deletion of all rows in a table (DANGEROUS)" setting will add a button to delete all rows in a customTabs. |
Let's take the following .csv file:
From the third-party file tab, click on the Import csv button:
Select the file to import, and Add file.
Then click on the icon to start the import
The customTabs will then display:
Dictionaries
CustomTabs allows you to create dictionaries of values to display in additional fields on item cards.
![]() |
This feature is available for List tabs only |
![]() |
Create a new List tab for the Dictionary element and note the name given to the table. |
![]() |
In the Tab Input Fields tab, create two fields. |
Activate the tab, set the access rights for user groups.
![]() |
In the customTabs > Dictionaries secondary menu, open the newly created tab and add as many fields as needed. |
![]() |
In the module configuration (third parties and contacts in our example), create an additional field in the desired element's record (contact) by selecting the list from a table or checklist from a table type. For the Value field, use the name of the table created in the previous step and complete it with the field name, i.e. cust_languesparlees_extrafields:nomlangue .
|
Your cards will then display the new additional field:
![]() |
The advantage of using CustomTabs dictionaries is the speed of editing and duplication. Let's add the English language to our CustomTabs dictionary: The change made to the dictionary applies to all fields in all records that offer its values. |
and your contact cards will display:
ODT Management
It is possible to retrieve the values entered on form-type customTabs in ODT templates. To do this, use the {cust_<tab name>_<attribute name>} tag.
Frequently Asked Questions
General
This chapter lists the difficulties encountered with the module. You'll find answers to questions about its use. If you encounter an error other than those described below when using this module:
- Disable and re-enable the module,
- Check the ChangeLog to see if a new version has been released,
- Reinstall/update the module,
- Check that replacing native Dolibarr files is not necessary for the module to function properly.
- Check that no incompatibilities with another module are indicated. If applicable, follow our recommendations.
If, despite these steps, the error persists, contact us using the dedicated form (http://docs.patas-monkey.com/support/). This form is the preferred method of contact for any usage difficulties or bug reports. We also ask that you refrain from using multiple communication channels for the same item.
Tabs not/no longer appearing on your tabs
- Following an update to the module or the tabs themselves, even if your tabs indicate they are enabled, you will need to reactivate them by editing the "Active Tab" field and saving again.
- It is also possible to perform this operation for all tabs in one click using the "Reactivate Active Tabs" button in the CustomTabs list, accessible from the Patas-tools > CustomTabs > CustomTabs menu: