Skip to Content
Menu
This question has been flagged

What can be done with each?

Are there any best practices?

Avatar
Discard
Best Answer

Odoo is a multi tiered application (presentation, logic, data).

The presentation tier is a combination of HTML5, JavaScript and CSS. 

The logic tier is exclusively written in Python.


Python

1. Back end development

  • Model Definition: Creating and managing models (tables) that define the structure of the business data.
  • Business Logic: Implementing core business logic and workflows. This includes writing methods for models, creating computed fields, and defining constraints.
  • Server Actions: Automating actions like scheduled tasks, server-side processes, and integrations with external services.
  • Custom Modules: Developing custom modules to extend or modify existing functionality.
  • ORM (Object-Relational Mapping): Interacting with the database through ORM, which simplifies database operations and ensures consistency.

2. Security and Access Control

  • Access Control Lists (ACL's): Defining access rights and record rules to control what different users can see and do within the system.
  • Security Checks: Implementing custom security checks and validation logic to protect data integrity and enforce business rules.

3. Reporting

  • Custom Reports: Generating custom reports which may involve complex queries and data manipulations.


JavaScript

1. Front end development

  • Web Interface Customization: Enhancing and customizing the user interface (UI) of applications. This includes modifying views, forms, and dashboards.
  • User Experience (UX) Improvements: Adding interactive features, improving usability, and providing a more dynamic user experience.
  • Widgets and Components: Creating custom widgets and components that users interact with directly in the interface.

2. Client-side Logic

  • Form Validations: Implementing real-time form validations and dynamic field behaviors.
  • Dynamic Data Loading: Fetching and displaying data asynchronously without refreshing the page, often using AJAX calls to interact with the back end.

3. Web Client Customization

  • Modifying Views: Customizing list views, form views, kanban views, etc., to tailor them to specific business needs.
  • QWeb Templates: Extending and modifying QWeb templates to change the presentation of data.

4. Single Page Application Development

  • Developing SPAs: Creating or customizing single-page applications that provide a seamless, app-like experience.


Integration of Python and JavaScript

1. RPC (Remote Procedure Calls): Using JavaScript to call Python methods on the server side. This allows dynamic interaction between the client and server, enabling complex features like live updates and real-time data synchronization.

2. Custom Views: Defining custom views that require both back end (Python) and front end (JavaScript) logic to handle complex business requirements. 


See also https://www.odoo.com/documentation/17.0/developer/tutorials/server_framework_101/01_architecture.html


Avatar
Discard
Best Answer

Thank you both. I was having the same problem and didn't know how to solve it until I read this article.


Avatar
Discard
Related Posts Replies Views Activity
0
Apr 25
212
2
Jan 25
693
2
Aug 24
879
1
Sep 19
10229
2
Feb 24
12005