8000 [IMP] tutorials/server_framework_101: rewrite the tutorial · odoo/documentation@df1236b · GitHub
[go: up one dir, main page]

Skip to content

Commit df1236b

Browse files
committed
[IMP] tutorials/server_framework_101: rewrite the tutorial
The Server Framework 101 (formerly Getting Started) is generally seen as an interesting and rewarding tutorial but also somewhat outdated and too limited for beginners in Odoo development as it fails to introduce key concepts of the server framework (e.g., controllers, tests, etc.). The instructions are also too directive for the reader to try and search by themselves and learn from it. With this commit, all of the content of the tutorial is rewritten while keeping the objective of building a real estate module. The setup guide for tutorials is also improved to ensure smoother onboarding for Odoo employees and community members alike. task-3802536
1 parent d39beb7 commit df1236b

14 files changed

+432
-603
lines changed

content/contributing/development.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@ navigate to the directory where you installed Odoo from sources and follow the g
151151
#. Select **<your_github_account>/odoo** or **<your_github_account>/enterprise** for the head
152152
repository. Replace `<your_github_account>` with the name of the GitHub account on which you
153153
created the fork or by **odoo-dev** if you work at Odoo.
154-
#. Review your changes and click on the :guilabel:`Create pull request` button.
154+
#. Click on :guilabel:`Create pull request` to create the :abbr:`PR (Pull Request)` and
155+
automatically request a review from the code maintainers. If you wish to double-check your
156+
changes first, or if you work at Odoo and follow an internal process for reviews, click on
157+
:guilabel:`Create draft pull request`.
155158
#. Tick the :guilabel:`Allow edits from maintainer` checkbox. Skip this step if you work at Odoo.
156159
#. Complete the description and click on the :guilabel:`Create pull request` button again.
157160

content/developer/tutorials/server_framework_101.rst

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,31 @@ Server framework 101
1010

1111
server_framework_101/*
1212

13-
Welcome to the Server framework 101 tutorial! If you reached this page that means you are
14-
interested in the development of your own Odoo module. It might also mean that you recently
15-
joined the Odoo company for a rather technical position. In any case, your journey to the
16-
technical side of Odoo starts here.
13+
**Welcome to the Server framework 101 tutorial!**
1714

18-
The goal of this tutorial is for you to get an insight of the most important parts of the Odoo
19-
development framework while developing your own Odoo module to manage real estate assets. The
20-
chapters should be followed in their given order since they cover the development of a new Odoo
21-
application from scratch in an incremental way. In other words, each chapter depends on the previous
22-
one.
15+
Are you eager to learn about the server framework of Odoo? Perhaps you have recently joined Odoo in
16+
a technical role. Either way, this tutorial will level you up as an Odoo developer and show you the
17+
ropes of working with the server framework.
18+
19+
This tutorial will take you on a step-by-step journey, building a real estate asset management
20+
application as you explore the core concepts of the server framework. Each chapter of the tutorial
21+
builds upon the previous one, so make sure to follow them in order.
22+
23+
.. todo: insert picture of the final view
24+
25+
.. note::
26+
Throughout this tutorial, you will encounter exercises designed to reinforce your learning. There
27+
will often be multiple ways to approach these exercises, so feel free to explore your own ideas
28+
and solutions. This is the secret to secure your understanding and develop your problem-solving
29+
skills.
2330

2431
.. important::
2532
Before going further, make sure you have prepared your development environment with the
2633
:doc:`setup guide <setup_guide>`.
2734

2835
Ready? Let's get started!
2936

30-
* :doc:`server_framework_101/01_architecture`
37+
* :doc:`server_framework_101/01_architecture_overview`
3138
* :doc:`server_framework_101/02_newapp`
3239
* :doc:`server_framework_101/03_basicmodel`
3340
* :doc:`server_framework_101/04_securityintro`

content/developer/tutorials/server_framework_101/01_architecture.rst

Lines changed: 0 additions & 133 deletions
This file was deleted.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
================================
2+
Chapter 1: Architecture overview
3+
================================
4+
5+
Before we start building our app, let's take a high level glance at the architecture of Odoo.
6+
7+
Multitier application
8+
=====================
9+
10+
Odoo leverages a `multitier architecture <https://en.wikipedia.org/wiki/Multitier_architecture>`_,
11+
meaning that the presentation, the business logic, and the data storage are separated. More
12+
specifically, it uses a three-tier architecture (image from Wikipedia):
13+
14+
.. image:: 01_architecture_overview/three-tier-architecture.svg
15+
:align: center
16+
:alt: Overview of a three-tier application
17+
18+
The presentation tier of Odoo is a combination of HTML5, JavaScript, and CSS. The logic tier is
19+
exclusively written in Python, while the data tier only supports PostgreSQL as an :abbr:`RDBMS
20+
(Relational Database Management System Software)`.
21+
22+
Depending on the scope of your Odoo development, it can be done in any of these tiers. Therefore,
23+
before going any further, it may be a good idea to refresh your memory if you don't have an
24+
intermediate level in these topics. In order to go through this tutorial, you will need a very basic
25+
knowledge of HTML and an intermediate level of Python. There are plenty of tutorials that are freely
26+
accessible, so we cannot recommend one over another since it depends on your background. For
27+
reference, this is the official `Python tutorial <https://docs.python.org/3/tutorial/>`_.
28+
29+
Odoo modules
30+
============
31+
32+
Odoo relies on modular components called **modules** to extend its functionality. These modules are
33+
essentially self-contained packages of code and data that serve a specific purpose within the
34+
system. You can think of them as building blocks.
35+
36+
Modules offer two main ways to customize Odoo:
37+
38+
- Adding new functionality: You can create entirely new features with modules, such as a real-time
39+
bus fleet visualization module.
40+
- Extending existing functionality: Modules can also be used to modify or enhance existing Odoo
41+
features, like adding your country's accounting rules to the generic accounting support.
42+
43+
Terminology:
44+
45+
- Developers group their business features in Odoo *modules*.
46+
- The main user-facing modules are flagged and exposed as *Apps*, but a majority of the modules are
47+
not Apps.
48+
- *Modules* may also be referred to as *addons*.
49+
50+
In practice, modules are represented by directories. They are placed in a designated location called
51+
the **addons path**, which the server scans to discover available modules.
52+
53+
In the :doc:`setup guide <../setup_guide>`, we cloned the `odoo/tutorials` repository and included
54+
it in the `addons-path` argument when starting the server. The directories present in the repository
55+
are all modules that can be installed on your Odoo server.
56+
57+
.. exercise::
58+
In your file explorer, navigate to the `odoo/tutorials` repository and inspect the available
59+
modules. You should find the `real_estate` module that will serve as the foundation for building
60+
our real estate application throughout this tutorial.
61+
62+
.. note::
63+
You will notice that the module directories are not empty; they all contain at least two
64+
essential files: :file:`__init__.py` and :file:`__manifest__.py`. These files are what
65+
makes a simple directory an Odoo module. We'll get back to it in the next chapter.
66+
67+
----
68+
69+
.. todo update incentive to match the title of the next page
70+
71+
Ready to start? Let's now :doc:`start building our first Odoo app <02_newapp>`!

0 commit comments

Comments
 (0)
0