-
Notifications
You must be signed in to change notification settings - Fork 2.9k
19.0 tutorials assri #1158
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?
19.0 tutorials assri #1158
Conversation
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 and description.
Furthermore, please update description in your commits while pushing, regarding the chapters and topics covered.
estate/models/estate_property.py
Outdated
| _postcode = "estate.postcode" | ||
| _date_avalilabilty = "estate.date_availability" | ||
| _expected_price = "estete.expected_price" | ||
| _selling_price = "estate.selling_price" | ||
| _bedrooms = "estate.bedrooms" | ||
| _living_area = "estate.living_area" | ||
| _facades = "estate.facades" | ||
| _garage = "estate.garage" | ||
| _garden = "estate.garden" | ||
| _garden_area = "estate.garden_area" | ||
| _garden_orientation = "estate.garden_orientation" |
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, can you explain why you have added these here?
Also do you know what's the purpose of writing _name and _description?
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.
Yes ma’am, the additional underscored attributes such as _postcode and _date_availability were mistakenly added and are not required. They are not recognized by the Odoo ORM and do not have any functional impact on the model.
In contrast, meta attributes like _name and _description are part of Odoo’s model configuration. The _name attribute defines the technical name of the model and is responsible for registering it in the ORM and creating the corresponding database table. The _description attribute provides a human-readable label for the model, mainly for clarity in the user interface and metadata.
I will remove the unnecessary underscored attributes to keep the code clean and aligned with Odoo development standards. Thank you for your guidance.
| garden = fields.Boolean(required=True) | ||
| garden_area = fields.Integer(required=True) | ||
| garden_orientation = fields.Selection( | ||
| selection=[("north", "North"), ("south", "South")], required=True |
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.
| selection=[("north", "North"), ("south", "South")], required=True | |
| selection=[('north', "North"), ('south', "South")], required=True |
Try keeping the key in lowercase
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.
Thankyou for your suggestion mam, i will from now on follow that and use odoo style conventions to keep the codebase clean.
| </form> | ||
| </field> | ||
| </record> | ||
| </odoo> No newline at end of file |
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.
Always add an extra line at the end of the file
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.
Thankyou for your suggestion ma'am,i have understood the mistake and will not repeat it again.
|
|
||
|
|
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.
| <field name="selling_price"/> | ||
| <field name="bedrooms"/> | ||
| </group> | ||
|
|
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/models/estate_property.py
Outdated
| from odoo import models, fields | ||
|
|
||
|
|
||
| class TestModal(models.Model): |
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.
| class TestModal(models.Model): | |
| class EstateProperty(models.Model): |
Keep the class name same as the file/table name
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.
Thankyou for pointing that out ma'am,I will update the class name to EstateProperty to ensure proper alignment with the model structure and coding standards.

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.