The Code for Odoo Applications is reached higher by the Odoo Coding Guidelines

The code for Odoo Applications is reached higher by the Odoo coding guidelines

The coding standards of any programming language ensure that any developer's code has a uniform look. It reduces internal complexity while improving accessibility and reliability.

In this blog, we will go over the Odoo Coding guidelines. These goals are to enhance the code quality for Odoo Apps. Correct coding does, in fact, improve readability, simplify maintenance, support in debugging, reduce complexity, and increase reliability. These rules should be followed by any new module or development.

Folders of Module Structure
Odoo modules have a predefined structure. Files belonging to different categories must be kept in separate directories. As a result, an Odoo module is organized into different directories. These contain the business logic and should help you understand the module's purpose.


1. controllers: these are the HTTP routes (python files).

2. data: It holds the model data (XML file).

3. demo: Contains the demo data for the module (load if only the 'load demo data' option is enabled).

4. doc: This directory contains the module documentation.

5. I18n: This folder contains the translations.

6. models: It contains the definitions and functions for all models (python files)

7. report: Contains all files related to the report (both python and XML files)

8. security: Contains files defining record rules as well as CSV files for user permission.

9. static: contains the web assets for the module as well as subfolders for description, css/, js/, img/, lib/, and so on.

10. tests: contains the Python test files.


11. views: the definitions for the views and templates are contained in this section.

12. wizard: a collection of transient models and their views

14. __init .py: This file is used to import the Python directories (models, controllers, reports, ..,)

15. __manifest .py: A module's core file.

Summary

Odoo as an open-source ERP brand makes sure to follow and maintain the standard coding guidelines prescribed by the industry norms. Also, they keep working on upgrading the coding standards. On the other hand, Odoo community mobile apps follow and are developed the apps for community edition users on similar guidelines.


0 259
Top 5 functions of Odoo Mobile App Development