-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[ADD] estate : Real Estate Advertisement App #927
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
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
estate/models/estate_property.py
Outdated
from odoo import models, fields, api | ||
from datetime import timedelta |
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.
You can refer to this documentation.
https://www.odoo.com/documentation/18.0/contributing/development/coding_guidelines.html#imports
estate/views/estate_menus.xml
Outdated
</menuitem> | ||
|
||
</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 be one empty line after the end of the 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 be one empty line after the end of the 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 be one empty line after the end of the 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 be one empty line after the end of the file.
<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.
garage = fields.Boolean() | ||
garden = fields.Boolean() | ||
garden_area = fields.Integer() | ||
state = fields.Selection( |
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 field should display in the header of the form view.
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.
Can you please make these changes?
. Introduce a new module for real estate advertisements . Ensure it appears in the Apps list for installation . Provide basic description and dependencies for recognition . Allow it to be installed as an application (empty shell for now)
. Create a model for properties with basic info, availability, and pricing. . Include structural details and amenities like garden size and orientation. . Require key fields such as name and expected price. . Ensure data is saved properly via the ORM.
. Allow users to read, create, update, and delete property records. . Eliminate warnings related to missing access rules for the property model. . Implement default security settings to grant standard users proper data access.
. Add root, first-level, and action menus for estate properties. . Create list and form views for property records. . Make selling price read-only and exclude it and availability date from duplicates. . Set default bedrooms to 2 and availability date to 3 months ahead. . Add active field (default True) and state field with key property statuses.
. Add a list view displaying key property fields like name, price, and bedrooms. . Organize the form view using groups and notebook tabs for clarity. . Implement a search view with filters on name and availability. . Add a filter to display only available properties (New, Offer Received). . Provide a shortcut to group the property list by postcode.
…s and offers . Add property types with menus, actions, and views; link properties to types. . Include buyer and salesperson info in a new tab; default salesperson to current user, don’t copy buyer. . Implement property tags with menus, actions, and views; support multiple tags per property. . Introduce property offers with price, status, and partner details. . Link offers to properties and display them within the property form.
. Property page displays total area by summing living space and garden. . Best offer price shown on property page for easy comparison. . Offer page includes a deadline calculated from validity days. . Editing deadline automatically updates validity days. . Garden details auto-fill when enabled and clear when removed; UI reflects these behaviors.
49bb741
to
445b947
Compare
…e to offer - Property page now has Cancel and Sold buttons for quick status updates - Cancelled properties cannot be marked sold and vice versa - Offer page includes Accept and Refuse buttons for better offer handling - Accepting an offer sets the buyer and selling price automatically - Ensures only one offer can be accepted per property
445b947
to
d02d21f
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,
I have left some remark can you please look into this.
Thanks
self.garden_area = 0 | ||
self.garden_orientation = "" | ||
|
||
def action_property_sold(self): |
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.
Without any offer accepted should not to able to change status to sold.
) | ||
partner_id = fields.Many2one("res.partner", required=True) | ||
property_id = fields.Many2one("estate.property", required=True) | ||
validity = fields.Integer(default=7) |
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.
What is the use of this field?
garage = fields.Boolean() | ||
garden = fields.Boolean() | ||
garden_area = fields.Integer() | ||
state = fields.Selection( |
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.
Can you please make these changes?
- Added SQL constraints for positive expected and selling prices, positive offer price, and unique tag/type names. - Implemented Python constraint to ensure selling price is at least 90% of expected price. - Used float_compare() and float_is_zero() for accurate float handling. - Triggered constraint on changes to selling_price and expected_price fields.
- status will not change to sold/cancelled unless an offer is accepted. - helper text added to visibility field. - state field is added at the header of form view.
Uh oh!
There was an error while loading. Please reload this page.