Skip to content

Conversation

@pimai-odoo
Copy link

Added a new 'real estate' module, created the database, and defined necessary columns.

@robodoo
Copy link

robodoo commented Oct 28, 2025

Pull request status dashboard

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,
Nice work!
I have added some comments please have a look at it.

module name is estate not real_estate.you can addapt it in commit message title.
For commit message you can refer this documentation :- https://www.odoo.com/documentation/19.0/contributing/development/git_guidelines.html#commit-message-full-description

@@ -0,0 +1 @@
from . import models 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.

There is a missing "blank" line at the end of the file.

@@ -0,0 +1 @@
from . import estate_property 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.

There is a missing "blank" line at the end of the file.

selection=[('north', 'North'),('south', 'South'),('east', 'East'),('west', 'West')],
string="Garden Orientation"
)
active = fields.Boolean(string="Active", default=True) 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.

There is a missing "blank" line at the end of the file.

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

name = fields.Char(required='True')

Choose a reason for hiding this comment

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

It will throw an error. It takes a boolean value. Test your code before pushing it to GitHub.

Suggested change
name = fields.Char(required='True')
name = fields.Char(required=True)

Comment on lines 1 to 3
from odoo import models,fields

class estateproperty(models.Model):

Choose a reason for hiding this comment

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

Leave two lines between import and classes for better readability.

Comment on lines 4 to 6
'data': ['security/ir.model.access.csv',
'views/estate_property_views.xml',
'views/estate_menus.xml'

Choose a reason for hiding this comment

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

Suggested change
'data': ['security/ir.model.access.csv',
'views/estate_property_views.xml',
'views/estate_menus.xml'
'data': [
'security/ir.model.access.csv',
'views/estate_property_views.xml',
'views/estate_menus.xml'

@@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
estate.access_estate_property,access_estate_property,estate.model_estate_property,base.group_user,1,1,1,1 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.

There is a missing "blank" line at the end of the file.

<menuitem id="menu_estate_property_action" action="action_estate_property" />
</menuitem>
</menuitem>
</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.

There is a missing "blank" line at the end of the file.

</p>
</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.

There is a missing "blank" line at the end of the file.

@pimai-odoo pimai-odoo changed the title [ADD] real_estate: created a new module [ADD] estate: created a new module Oct 29, 2025
Added a new 'real estate' module, created the database, and defined necessary
columns.
Set default values for fields, added new field attributes, and created menus
for accessing default list and form views in Real Estate module
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.

I have added some comments.

Comment on lines 9 to 42
description = fields.Text(string="Description")
postcode = fields.Char(string="Postcode")
date_availability = fields.Date(string="Availability Date", default=fields.Date.today()+relativedelta(months=3))
expected_price = fields.Float(string="Expected Price", required=True)
selling_price = fields.Float(string="Selling Price", readonly=True)
bedrooms = fields.Integer(string="Bedrooms", default=2)
living_area = fields.Integer(string="Living Area (sqm)")
facades = fields.Integer(string="Facades")
garage = fields.Boolean(string="Garage")
garden = fields.Boolean(string="Garden")
garden_area = fields.Integer(string="Garden Area (sqm)")
garden_orientation = fields.Selection(
selection=[
("north", "North"),
("south", "South"),
("east", "East"),
("west", "West"),
],
string="Garden Orientation",
)
state = fields.Selection(
[
("new", "New"),
("offer_received", "Offer Received"),
("offer_accepted", "Offer Accepted"),
("sold", "Sold"),
("cancelled", "Cancelled"),
],
string="Status",
required=True,
copy=False,
default="new",
)
active = fields.Boolean(string="Active", default=True)

Choose a reason for hiding this comment

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

By default odoo generate string. If your string is same as technical name, then no need to add.

Comment on lines 2 to 5
from dateutil.relativedelta import relativedelta

class estateproperty(models.Model):

Choose a reason for hiding this comment

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

Leave two lines between import and classes for better readability.

Created list, form, and search views, and added group by functionality in the Real Estate.
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, nice work!

Please use this documentation:- https://www.odoo.com/documentation/19.0/contributing/development/git_guidelines.html#commit-message-full-description

do not push commit like "WIP", and make sure that your runbot is green.

from dateutil.relativedelta import relativedelta


class estateproperty(models.Model):

Choose a reason for hiding this comment

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

Class name should be in camel case 'EstateProperty`.

Comment on lines +10 to +20
description = fields.Text("Description")
postcode = fields.Char("Postcode")
date_availability = fields.Date("Availability Date", default=fields.Date.today()+relativedelta(months=3))
expected_price = fields.Float("Expected Price", required=True)
selling_price = fields.Float("Selling Price", readonly=True)
bedrooms = fields.Integer("Bedrooms", default=2)
living_area = fields.Integer("Living Area (sqm)")
facades = fields.Integer("Facades")
garage = fields.Boolean("Garage")
garden = fields.Boolean("Garden")
garden_area = fields.Integer("Garden Area (sqm)")

Choose a reason for hiding this comment

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

Please adapt these changes that were suggested to you earlier. You don't have to write a string if it's the same as the technical name.
#1013 (comment)

Comment on lines +44 to +45


Choose a reason for hiding this comment

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

One empty line is sufficient.

name = fields.Char(required=True)
description = fields.Text("Description")
postcode = fields.Char("Postcode")
date_availability = fields.Date("Availability Date", default=fields.Date.today()+relativedelta(months=3))

Choose a reason for hiding this comment

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

Suggested change
date_availability = fields.Date("Availability Date", default=fields.Date.today()+relativedelta(months=3))
date_availability = fields.Date("Availability Date", default=fields.Date.today() + relativedelta(months=3))

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