Skip to content

Conversation

@haman-odoo
Copy link

Real Estate Tutorial

@robodoo
Copy link

robodoo commented Dec 4, 2025

Pull request status dashboard

@haman-odoo haman-odoo force-pushed the 19.0-real-estate-tutorial-haman branch from 3a46ead to 949b655 Compare December 5, 2025 06:55
@haman-odoo haman-odoo force-pushed the 19.0-real-estate-tutorial-haman branch 10 times, most recently from 96dc36b to 2b93d6f Compare December 9, 2025 06:12
Copy link

@bit-odoo bit-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 @haman-odoo
You did a good job 👏

I have added some suggestions. And can you please improve your commit message, and pr message, and title regarding these guidelines - https://www.odoo.com/documentation/19.0/contributing/development/git_guidelines.html

One more thing, writing a comment is a good idea. But i think it is good only if our code is complex or doing some magic things, etc.

Thanks

'category': 'Sales/Real Estate',
'installable': True,
'auto_install': False,
'description': """Description text""",
Copy link

Choose a reason for hiding this comment

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

I think we can add description after the name so others can read it easily.

@@ -0,0 +1,4 @@
from . import estate_property # noqa: F401
Copy link

Choose a reason for hiding this comment

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

Suggested change
from . import estate_property # noqa: F401
from . import estate_property

Comment on lines 1 to 3
from odoo import models, fields
from dateutil.relativedelta import relativedelta
from datetime import date
Copy link

Choose a reason for hiding this comment

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

First, we can import external libraries.

Comment on lines 10 to 27
name = fields.Char(string="Property Title", required=True)
description = fields.Text(string="Description")
postcode = fields.Char(string="Postcode")
date_availability = fields.Date(
string="Available From",
default=lambda sself: date.today() + relativedelta(months=3),
copy=False
)
expected_price = fields.Float(string="Expected Price", required=True)
selling_price = fields.Float(
string="Selling Price",
readonly=True,
copy=False
)

bedrooms = fields.Integer(string="Bedrooms", default=2)
living_area = fields.Integer(string="Living Area (sqm)")
facades = fields.Integer(string="Number of Facades")
Copy link

Choose a reason for hiding this comment

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

No need to declare a string if it is the same as the field name because Odoo can generate a string.

_description = "Real Estate Property Offer"

price = fields.Float(string="Price")

Copy link

Choose a reason for hiding this comment

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

Unneccary diff.

_name = "estate.property.tag"
_description = "Real Estate Property Tag"

name = fields.Char(string="Name", required=True)
Copy link

Choose a reason for hiding this comment

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

Same here, no need to write a string.

@@ -0,0 +1,15 @@
<!-- /home/odoo/odoo19/tutorials/estate/views/estate_menus.xml -->
Copy link

Choose a reason for hiding this comment

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

unneccary diff.

@@ -0,0 +1,32 @@
<!-- /home/odoo/odoo19/tutorials/estate/views/estate_property_offer_views.xml -->
Copy link

Choose a reason for hiding this comment

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

unneccary diff.

@@ -0,0 +1,9 @@
<!-- /home/odoo/odoo19/tutorials/estate/views/estate_property_type_views.xml -->
Copy link

Choose a reason for hiding this comment

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

unneccary diff.

@@ -0,0 +1,124 @@
<!-- /home/odoo/odoo19/tutorials/estate/views/estate_property_views.xml -->
Copy link

Choose a reason for hiding this comment

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

unneccary diff.

@haman-odoo haman-odoo force-pushed the 19.0-real-estate-tutorial-haman branch from 2b93d6f to 8e3df8a Compare December 9, 2025 11:06
@haman-odoo haman-odoo force-pushed the 19.0-real-estate-tutorial-haman branch from 8e3df8a to d2aa309 Compare December 9, 2025 11:09
@haman-odoo haman-odoo force-pushed the 19.0-real-estate-tutorial-haman branch from d2aa309 to 44f5059 Compare December 9, 2025 11:25
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.

4 participants