Skip to content

Conversation

@pimai-odoo
Copy link

@pimai-odoo pimai-odoo commented Oct 28, 2025

Created and configured the database for the Real Estate module, defining necessary fields such as property type, tags, buyer, salesperson, and offers. Implemented list, form, and search views with groupings, and added computed fields, inverse functions, and onchange functionalities. Included 'Sold' and 'Cancel' buttons with their corresponding functionality, as well as 'Accept' and 'Refuse' buttons with related logic.

@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 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.

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.

@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.
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 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.

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.

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.

@bit-odoo
Copy link

bit-odoo commented Nov 3, 2025

Hello!
can you please make sure that your runbot is green.
https://runbot.odoo.com/runbot/tutorials-12?search=-pimai

And please update the PR message.

@pimai-odoo pimai-odoo force-pushed the 19.0-tutorial-pimai branch 2 times, most recently from 53adf3d to 156ec9a Compare November 3, 2025 11:17
Set default values for fields, added new field attributes, and created menus
for accessing default list and form views in Real Estate module
Created list, form, and search views, and added group by functionality in the Real Estate.
…Real Estate

Added Property Type and Tag models, buyer and salesperson fields,
and the Property Offer model in the Real Estate module.
…el buttons

Added computed fields with inverse functions and onchange methods,
along with Sold and Cancel buttons to enhance the
Real Estate module functionality.
…Real Estate

Added Accept and Refuse buttons along with the supporting functionality
to improve workflow in the 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.

Hello,
I have added some remarks :)

Comment on lines 1 to 3
from odoo import models, fields, api
from dateutil.relativedelta import relativedelta
from odoo.exceptions import UserError
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 odoo import models, fields, api
from dateutil.relativedelta import relativedelta
from odoo.exceptions import UserError
from dateutil.relativedelta import relativedelta
from odoo import models, fields, api
from odoo.exceptions import UserError

First external libraries and then internal import.

if record.state == 'sold':
raise UserError("A sold property cannot be cancelled")
else:
self.state = 'cancelled'
Copy link

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 if multiple records are in self.

if record.state == 'cancelled':
raise UserError("A cancelled property cannot be set as sold")
else:
self.state = 'sold'
Copy link

Choose a reason for hiding this comment

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

Same here.

Comment on lines 1 to 2
from odoo import fields, models, api
from dateutil.relativedelta import relativedelta
Copy link

Choose a reason for hiding this comment

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

same as the previous file.

…Real Estate

Added SQL constraints to ensure positive expected, selling,
and offer prices, and unique names for property tags and types.
Added a Python constraint to ensure the selling price
is not less than 90% of the expected price.
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