Modèles, modules et applications¶
Les modèles déterminent la structure logique d’une base de données et la manière dont les données sont stockées, organisées et manipulées. En d’autres termes, un modèle est un tableau d’informations qui peut être lié à d’autres tableaux. Un modèle représente généralement un concept commercial tel qu’une commande, un contact ou un produit.
Les modules et les applications contiennent plusieurs éléments, tels que des modèles, des vues, des fichiers de données, des contrôleurs web et des données web statistiques.
Note
Toutes les applications sont des modules. Les modules autonomes de plus grande taille sont généralement appelés applications, tandis que les autres modules servent généralement de compléments à ces applications.
Fonctionnalités suggérées¶
Lorsque vous créez un nouveau modèle ou une nouvelle application avec Studio, vous pouvez choisir d’ajouter jusqu’à 14 fonctionnalités pour accélérer le processus de création. Ces fonctionnalités regroupent des champs, des paramètres par défaut et des vues qui sont généralement utilisés ensemble pour fournir une fonctionnalité standard. La plupart de ces fonctionnalités peuvent être ajoutées ultérieurement, mais le fait de les ajouter dès le départ facilite grandement le processus de création des modèles. De plus, dans certains cas, ces fonctionnalités interagissent entre elles afin d’accroître leur utilité.
Example
Créer un modèle avec les fonctionnalités Image et Étapes de pipeline activées permet d’ajouter l’image dans la disposition des cartes de la vue Kanban.

Détails de contact¶
Selecting Contact details adds to the Form view a Many2One field linked to the Contact model and two of its Related Fields: Phone and Email. The Contact field is also added to the List view, and the Map view is activated.
Example

Assignation à un utilisateur¶
Selecting User assignment adds to the Form view a
Many2One field linked to the Contact model, with
the following Domain: Share User is not set
to only allow the selection of Internal
Users. In addition, the many2one_avatar_user widget is used to display the user’s
avatar. The Responsible field is also added to the List view.
Example

Date & Calendrier¶
Selecting Date & Calendar adds to the Form view a Date field and activates the Calendar view.
Plage de dates & Gantt¶
Selecting Date range & Gantt adds to the Form view two Date fields next to each other: one to set a start date, the other to set an end date, using the daterange widget, and activates the Gantt view.
Étapes de pipeline¶
Selecting Pipeline stages activates the Kanban view, adds several fields such as Priority and Kanban State, and three stages: New, In Progress, and Done. The Pipeline status bar and the Kanban State field are added to the Form view. The Color field is added to the List view.
Note
La fonctionnalité des Étapes de pipeline peut être ajoutée ultérieurement.
Image¶
Selecting Picture adds to the top-right of the Form view an Image field.
Note
La fonctionnalité Image peut être ajoutée ultérieurement.
Lignes¶
Selecting Lines: adds to the Form view a Lines field inside a Tab component.
Notes¶
Selecting Notes adds to the Form view an Html field using the full width of the form.
Valeur monétaire¶
Selecting Monetary value adds to the Formulaire and Liste views a Monetary field. The Graphique and Tableau croisé dynamique views are also activated.
Note
Un champ Devise est ajouté et masqué à la vue.
Société¶
Selecting Company adds to the Formulaire and Liste views a Many2One field linked to the Company model.
Note
Cela n’est utile que si vous travaillez dans un environnement multi-sociétés.
Tri personnalisé¶
Sélectionner Tri personnalisé permet d’ajouter à la vue Liste une icône de poignée de déplacement pour manuellement réorganiser les enregistrements.
Example

Chatter¶
Sélectionner Chatter permet d’ajouter à la vue Formulaire des fonctionnalités de chatter (envoi de messages, publication de notes et planification d’activités).
Note
La fonctionnalité Chatter peut être ajoutée ultérieurement.
Example

Archivage¶
Sélectionner Archivage permet d’ajouter aux vues Formulaire et Liste l’action Archiver et de masquer les enregistrements archivés des recherches et des vues par défaut.
Exporter et importer des personnalisations¶
When you do any customization with Studio, a new module named studio_customization
is
added to your database. You can export this module as a ZIP file using the Studio Export
function. The module can then be imported into another Odoo database. This may be useful, for
example, when setting up a new module or for training purposes.
Note
Exporting and importing customizations in this way, rather than using the standard Odoo export and import functions, means data is imported in a logical way. For example, if the module contains customers and sales orders, the customers are created first, since these are required for the sales orders to be created.
Export customizations¶
To export customizations, click the (Toggle Studio) button on the main Odoo dashboard, then Export, then either:
download all Studio customizations by clicking the Export button; or
choose what data to export by clicking Configure data and demo data to export.
Configure data to export¶
To select specific models to export, click New on the Studio Export screen, then start typing the name of the relevant model or select it from the list.
Astuce
Click Preset to see a list of all models in your database with records that have been modified using Studio and all custom models created using Studio. To configure one of these models for export, click on the model to open it and make the required changes.
Tick the following options as relevant:
Demo: if the exported records should be considered as demo data when imported.
Attachments: if attachments related to exported records should be included in the export.
Updatable: if the exported records should be able to be updated during a module update.
If necessary, edit the Domain to determine which of the model’s records should be exported. To do so, click the Edit Domain button or (Modify filter) then Edit Domain, as appropriate. Proceed to make any required changes.
After configuring a model for export, click Studio Export to return to the main screen. To download a ZIP file with the customizations for all the listed models, click Export.
Note
It is not necessary to select one or more models as all listed models will be included in the export. To remove a model from the export, select it and click the Actions button then Delete.
In the Studio Export window:
leave the checkboxes unticked to export only the customizations done with Studio.
tick Include Data to include data from the selected models in the export.
tick Include Demo Data to include data from the selected models that is flagged as demo data. Ticking this option also ticks Include Data.
Click the Export button to download the ZIP file.

Import customizations¶
Avertissement
Before importing, make sure the destination database is on the same Odoo version and contains the same apps and modules as the source database. Studio does not add the underlying modules as dependencies of the exported module.
To import and install Studio customizations in another Odoo database:
Connect to the destination database.
Click the (Toggle Studio) button on the main Odoo dashboard, then Import.
Upload the exported ZIP file. If demo data should be imported, tick Load demo data.
Click Install.