10000 [IMP] tutorials/server_framework_101: rewrite the tutorial by AntoineVDV · Pull Request #9192 · odoo/documentation · GitHub
[go: up one dir, main page]

Skip to content

[IMP] tutorials/server_framework_101: rewrite the tutorial #9192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 7 commits into
base: 18.0
Choose a base branch
from

Conversation

AntoineVDV
Copy link
Collaborator
@AntoineVDV AntoineVDV commented May 6, 2024

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

@robodoo
Copy link
Collaborator
robodoo commented May 6, 2024

@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch from 426409a to 7bb6a8b Compare May 7, 2024 13:11
Copy link
Contributor
@vchu-odoo vchu-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few small suggestions

@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch 2 times, most recently from 1b81622 to e272f5d Compare June 5, 2024 16:53
@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch 2 times, most recently from 1be9338 to 6499ee4 Compare June 12, 2024 13:38
@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch from 6499ee4 to f2f3e50 Compare June 25, 2024 17:14
Copy link
Contributor
@vchu-odoo vchu-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Chapter 2 is super clear with a lot of valuable info for understanding the framework!

@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch 2 times, most recently from f602970 to 5c12ae4 Compare June 26, 2024 08:31
@AntoineVDV AntoineVDV changed the title [IMP] tutorials/server_framework_101: revamp the tutorial [IMP] tutorials/server_framework_101: rewrite the tutorial Jun 26, 2024
@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch 2 times, most recently from df1236b to 739e4ca Compare June 26, 2024 10:02
@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch 2 times, most recently from ffaee73 to 2104739 Compare July 16, 2024 16:31
@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch 6 times, most recently from 5011617 to fd29272 Compare July 30, 2024 12:50
@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch 2 times, most recently from a510322 to 2e30832 Compare August 6, 2024 12:58
@AntoineVDV AntoineVDV changed the base branch from 17.0 to master August 6, 2024 13:05
@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch from 2e30832 to 6ef06b3 Compare August 6, 2024 13:09
Copy link
Contributor
@vchu-odoo vchu-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very solid work!

Here are some small comments.

@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch from ea6a7c9 to 0bbf2d5 Compare August 12, 2024 16:12
@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch 2 times, most recently from 9fbf595 to ee8a1a9 Compare November 21, 2024 16:06
Copy link
Contributor
@vchu-odoo vchu-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great progress!

Here are some small comments/suggestions :)

@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch from ee8a1a9 to 8bc3a1b Compare November 25, 2024 12:08
@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch from 1fc06be to ff014f2 Compare December 3, 2024 15:58
Copy link
Contributor
@vchu-odoo vchu-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great progress!

@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch 3 times, most recently from e423dde to caaf822 Compare December 6, 2024 15:53
@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch from b109024 to d2baef5 Compare December 16, 2024 19:23
Copy link
Contributor
@vchu-odoo vchu-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice work!
It is progressing fast!

@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch from ce1db01 to dbe3410 Compare February 13, 2025 12:16
@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch from a5139d0 to 5fcfde4 Compare February 20, 2025 17:15
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
@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch from 61b6252 to 5e40de9 Compare March 3, 2025 15:00
@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch from 5e40de9 to 6b03f6f Compare March 4, 2025 17:30
@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch from df80bdf to 1357579 Compare May 19, 2025 13:19
Comment on lines +372 to +373
- **Context-aware dependencies**: The `@api.depends_context('company')` decorator ensures that
computed fields are computed depending on the current company (`self.env.company`).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are cached (and computed) depending on the environment company.
Maybe a tip to say that it shouldn't be used on stored fields (unless you really know what you're doing)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to omit it for now because we're in the scope of a tutorial where the reader has to learn pretty much everything. It should however be properly state in the reference doc.

@AntoineVDV AntoineVDV force-pushed the 17.0-revamp-server-framework-101-anvchu branch from 1357579 to b72d196 Compare May 19, 2025 15:13
Comment on lines +370 to +371
accessing data like company-dependent fields, allowing to retrieve values from a specific
company's perspective.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retrieve values and trigger flows from a specific company perspective ?

It's not only about retrieving values (though not sure how to clearly explain it here).
In the case where a users selects company A and B (A as main) but triggers a flow on B, it's a good practice to trigger the flow in company B to make sure nothings breaks (or is wrongly configured).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0