-
Notifications
You must be signed in to change notification settings - Fork 2.9k
venpr: estate: complete chapters 1–7 of Real Estate tutorial #1157
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
base: 19.0
Are you sure you want to change the base?
Conversation
7bd3e0f to
5afebda
Compare
Chapter 7: Relationships between models - Added property types and property tags - Implemented many2one, one2many and many2many relations - Added property offers linked to properties - Integrated offers in property form view
5afebda to
9136ec4
Compare
mash-odoo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello!
Thank you for your work!
Here are some suggestions, mostly linter as of now!
Also, please update your PR title
Furthermore, please update description in your commits while pushing, regarding the chapters and topics covered.
estate/models/estate_property.py
Outdated
| from datetime import timedelta | ||
| from odoo import fields, models |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For ordering of imports, refer this: https://www.odoo.com/documentation/19.0/contributing/development/coding_guidelines.html#imports
|
|
||
| class EstateProperty(models.Model): | ||
| _name = "estate.property" | ||
| _description = "Real Estate Property" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| _description = "Real Estate Property" | |
| _description = "Real Estate Property" | |
| ("north", "North"), | ||
| ("south", "South"), | ||
| ("east", "East"), | ||
| ("west", "West"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ("north", "North"), | |
| ("south", "South"), | |
| ("east", "East"), | |
| ("west", "West"), | |
| ('north', "North"), | |
| ('south', "South"), | |
| ('east', "East"), | |
| ('west', "West"), |
Try keeping key in lower case
| _description = "Estate Property Offer" | ||
|
|
||
| price = fields.Float(string="Offer Price") | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
estate/views/estate_menus.xml
Outdated
| <menuitem | ||
| id="estate_menu_root" | ||
| name="Real Estate" | ||
| sequence="10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this sequence used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first, I did not see the Real Estate app in the Odoo dashboard.
So I added sequence="10" to make sure the menu appears in proper order.
Later I understood that the real issue was not sequence —
it was because the Admin user did not belong to the Estate group.
So the problem was related to group access, not sequence ordering.
The sequence is only used to control menu position, not visibility.
estate/security/estate_security.xml
Outdated
| <!-- Estate User group --> | ||
| <record id="group_estate_user" model="res.groups"> | ||
| <field name="name">Estate User</field> | ||
| </record> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the purpose of making groups?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially, I used base.group_user for access control.
Later, I created custom groups named group_estate_user and group_estate_manager. I added a security XML file and linked the access rights to these new groups.
After making these changes, I could not see the Real Estate app when logged in as Admin.
Then I realized that the Admin user was not assigned to the new Estate groups. Because of that, the menu was hidden due to missing group permissions.
So the issue was not related to the menu configuration or the sequence. It was purely because the Admin user did not belong to the Estate group.
When I switched back to using base.group_user, it worked because the Admin user already belongs to that group. That is why the app became visible again.
| @@ -0,0 +1,33 @@ | |||
| <odoo> | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| </list> | ||
| </field> | ||
| </record> | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not leave unnecessary lines in the file. Go through all the files and update the changes wherever necessary.
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not leave unnecessary lines in the file. Go through all the files and update the changes wherever necessary.
…adline, and garden onchange

Chapters 1–7: Estate module implementation
This PR completes Chapters 1 to 7 of the Odoo tutorial for the estate module.
Covered topics:
This PR brings the estate module to a stable state up to Chapter 7.