Skip to content

[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

Open
wants to merge 10 commits into
base: 18.0
Choose a base branch
from

Conversation

satp-odoo
Copy link

@satp-odoo satp-odoo commented Aug 20, 2025

  • Created an estate advertisement application in 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
  • Added computed fields and set up relation between fields

@robodoo
Copy link

robodoo commented Aug 20, 2025

Pull request status dashboard

@satp-odoo satp-odoo changed the title [Add] estate : Real Estate Advertisement App [ADD] estate : Real Estate Advertisement App Aug 20, 2025
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,
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

from odoo import models, fields, api
from datetime import timedelta

Choose a reason for hiding this comment

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

</menuitem>

</menuitem>
</odoo>

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>

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>

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>

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.

Comment on lines 68 to 69
<field name="garden_area" string="Garden Area (sqm)" />
<field name="garden_orientation" string="Garden Orientation" />

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(

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.

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.
@satp-odoo satp-odoo force-pushed the 18.0-tutorials-satp branch from 49bb741 to 445b947 Compare August 21, 2025 13:09
…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
@satp-odoo satp-odoo force-pushed the 18.0-tutorials-satp branch from 445b947 to d02d21f Compare August 21, 2025 13:55
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 left some remark can you please look into this.
Thanks

self.garden_area = 0
self.garden_orientation = ""

def action_property_sold(self):

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)

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(

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