-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[ADD] estate: real estate module #928
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: 18.0
Are you sure you want to change the base?
Conversation
tshe-odoo
commented
Aug 20, 2025
- Created an estate application for Odoo
- Added access rights in ir.model.access.csv for estate.property
- Created XML data files for actions and menus in the estate module
- Defined three-level menu structure for property management
- Implemented default values and field attributes for estate.property
- Defined list and form views for different models and added some filters
- Added active and state fields with predefined behaviors
- Defined Relations between models
35ef67e
to
4493204
Compare
…tomation - Added computed fields with inverse methods for dynamic data synchronization. - Implemented onchange methods to auto-fill related fields in the form view. - Reduced manual input, improved accuracy, and streamlined data handling.
a004406
to
34172e1
Compare
…e changes - Add 'Cancel' and 'Sold' buttons to estate.property - Add 'Accept' and 'Refuse' buttons to estate.property.offer - Prevent accepting more than one offer - Set selling price and buyer on offer acceptance - Prevent cancelling sold properties and vice versa
34172e1
to
f9d70ab
Compare
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 please adapt your commit message and PR description according to this guideline?
https://www.odoo.com/documentation/18.0/contributing/development/git_guidelines.html
if record.state != "cancelled": | ||
record.state = "sold" | ||
else: | ||
raise exceptions.UserError("A cancelled property cannot be set as sold") |
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.
If state=cancelled
then we should hide sold
button.
<field name="garden_area" string="Garden Area (sqm)" /> | ||
<field name="garden_orientation" string="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.
Visible only if the garden is available.
git
Outdated
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.
Unnecessary file.
</field> | ||
</record> | ||
|
||
</odoo> |
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.
Should one empty line at the end of the file.
<field name="res_model">estate.property.type</field> | ||
<field name="view_mode">list,form</field> | ||
</record> | ||
</odoo> |
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.
Should one empty line at the end of the file.
<field name="res_model">estate.property.tag</field> | ||
<field name="view_mode">list,form</field> | ||
</record> | ||
</odoo> |
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.
Should one empty line at the end of the file.
</form> | ||
</field> | ||
</record> | ||
</odoo> |
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.
Should one empty line at the end of the file.
estate/views/estate_menus.xml
Outdated
</menuitem> | ||
|
||
|
||
</odoo> |
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.
Should one empty line at the end of the file.
<form string="edit_form"> | ||
<header> | ||
<button name="action_cancel" type="object" string="Cancel" /> | ||
<button name="action_sold" type="object" string="Sold" /> |
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.
state should be displayed in the header.
</group> | ||
</page> | ||
<page string="Offers"> | ||
<field name="offers_ids" /> |
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.
Should be able to add an offer directly from the list instead of opening the wizard.
…nique names Enforced strict validation to ensure: - Property, Selling and offer prices are strictly positive - Selling price cannot be less than 90% of the expected price - Property type and tag names are unique across records
record.property_id.buyer = record.partner_id | ||
record.property_id.state = "offer_accepted" | ||
else: | ||
raise exceptions.UserError("Already One Offer is Accepted") |
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.
No need of usererror, we can hide the accept and refuse buttons.
|
||
def action_refused(self): | ||
for record in self: | ||
record.status = "refused" |
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.
should not be able to refuse, once this offer is approved.
|
||
|
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.
unnecessary empty line.
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.
Unnecessary file.