Skip to content

Conversation

@assri-odoo
Copy link

Chapters 1–7: Estate module implementation

This PR completes Chapters 1 to 7 of the Odoo tutorial for the estate module.

Covered topics:

  • Module structure and manifest setup,
  • Core data models and their fields,
  • Menu entries, window actions, and views,
  • Custom list, form, and search views,
  • Property type and tag models,
  • Model relationships (many2one, many2many),

This PR brings the estate module to a stable state up to Chapter 7.

@robodoo
Copy link

robodoo commented Feb 10, 2026

Pull request status dashboard

Copy link

@mash-odoo mash-odoo left a 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.

Comment on lines 7 to 17
_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"

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?

Copy link
Author

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

Choose a reason for hiding this comment

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

Suggested change
selection=[("north", "North"), ("south", "South")], required=True
selection=[('north', "North"), ('south', "South")], required=True

Try keeping the key in lowercase

Copy link
Author

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

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

Copy link
Author

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.

Comment on lines 47 to 48


Choose a reason for hiding this comment

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

Suggested change

<field name="selling_price"/>
<field name="bedrooms"/>
</group>

Choose a reason for hiding this comment

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

Suggested change

from odoo import models, fields


class TestModal(models.Model):

Choose a reason for hiding this comment

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

Suggested change
class TestModal(models.Model):
class EstateProperty(models.Model):

Keep the class name same as the file/table name

Copy link
Author

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.

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.

3 participants