Skip to content

[ADD] real_estate: added real_estate module#1227

Draft
Arbaaz-Khan-Tech wants to merge 24 commits intoodoo:19.0from
odoo-dev:19.0-tutorials-asurk
Draft

[ADD] real_estate: added real_estate module#1227
Arbaaz-Khan-Tech wants to merge 24 commits intoodoo:19.0from
odoo-dev:19.0-tutorials-asurk

Conversation

@Arbaaz-Khan-Tech
Copy link
Copy Markdown

@Arbaaz-Khan-Tech Arbaaz-Khan-Tech commented Apr 3, 2026

This PR introduces a new real_estate module as part of the tutorial.

Features included

  • Module initialization
    Created a new installable application module real_estate.
  • Model updates
    Added the estate_property model.
    Introduced required fields name and expected_price.
    Added a constraint to ensure expected_price is greater than zero.
  • Access control
    Added ir.model.access.csv to define user permissions.
    Updated __manifest__.py to include the access control file.
  • User interface
    Added XML views to display estate property records.
    Registered the views in the manifest.

Add a new real estate module to handle properties and related features.
Made it an application so it can be installed and used easily.
@robodoo
Copy link
Copy Markdown

robodoo commented Apr 3, 2026

Pull request status dashboard

- Introduce essential fields to the estate_property model for comprehensive property detail storage.
- Set name and expected_price fields as always required to ensure data integrity.
- Implement an API constraint to validate that expected_price is always greater than zero.

Chapter 3
- Add ir.model.access.csv to define and manage access rights for users within the real_estate module.
- Update __manifest__.py to include the path to the new ir.model.access.csv file, making it discoverable by Odoo.

Chapter #4
I-ntroduce the necessary UI views to display the estate model records in the Odoo interface.
-Includes XML files .
The new view files are registered in the module's manifest to ensure they are loaded correctly.

Chapter #5
@Arbaaz-Khan-Tech Arbaaz-Khan-Tech changed the title [ADD] real_estate: added real_estate module real_estate: Initial module with models, access rights, and UI views Apr 9, 2026
Copy link
Copy Markdown

@mash-odoo mash-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!
Thank you for your work.
Here are some few questions and suggestions.
Also please update your PR title

Comment thread estate/models/estate_property.py Outdated
Comment thread estate/models/estate_property.py Outdated
Comment thread estate/models/estate_property.py Outdated
Comment thread estate/models/estate_property.py Outdated
Comment thread estate/security/ir.model.access.csv Outdated
Comment thread estate/__manifest__.py
Comment thread estate/models/estate_property.py Outdated
@Arbaaz-Khan-Tech Arbaaz-Khan-Tech changed the title real_estate: Initial module with models, access rights, and UI views [ADD] real_estate: added real_estate module Apr 9, 2026
- Introduce active and state fields for properties to manage their lifecycle and visibility.
- Add a custom logo to the dashboard .
- Refactor existing code to adhere to project coding guidelines.
- Incorporate feedback from previous reviews .

Chapter #5
- Removed unused imports from __manifest__.py to resolve build errors.
- Compressed Real_Estate_Logo.jpg to reduce its size below 100KB, addressing a build error related to image size limits.

Chapter #5
- The 'postcode' field has been changed to a Char type to accommodate various international postal code formats.
- The 'living_area' field has been updated to a Float type to allow for more precise measurements of living space in square meters (sqm).

Chapter #5
- The 'garden_area' field has been updated to a Float type to allow for more precise measurements of living space in square meters (sqm).

Chapter #5
- Introduce a custom form view for the real estate module.
- Enhance user experience (UX) through the new form view.
- Implement a toggleable 'groupby' filter in the list view.

Chapter 6
Arbaaz-Khan-Tech and others added 11 commits April 16, 2026 18:03
- Introduce a new estate_property_type model to categorize and manage different property types.
- Add dedicated fields to the property model for storing buyer and seller information.
- Created a form view for the creation of new property types.
- Update the property form view to allow selection of buyers and sellers.

Chapter #7
- Introduce estate.property.tag model to manage property tags.
- Introduce estate.property.offer model to manage offers related to properties.
- Implement list and form views for property tags.
- Implement list and form views for property offers.

Chapter #7
- Introduce a computed field for 'total area' to automatically calculate the sum of 'living area' and 'garden area'.
- Implement a UX enhancement to automatically populate 'garden area' with a default value of 10 and 'orientation' with 'North' when the 'garden' option is selected.

Chapter odoo#8
-   Introduce a button to update property status to 'Sold' or 'Cancelled'.
-   Provide an additional button for administrators to accept or refuse property offers.

Chapter odoo#9
- Addressed the E712 linting warning related
- Added SQL constraints to ensure data integrity for offer prices, property tag/type names, and selling/expected prices.
- Introduced a new button to automatically accept the best offer for a property.
- Implemented a new button to automatically reject offers that are 90% lower than the expected price.
- Implemented custom display order logic for various models:
- estate.property: Ordered by ID in descending order.
- estate.property.offer: Ordered by Price in descending order.
- estate.property.tag: Ordered by Name.
- estate.property.type: Ordered by Name.

Chapter odoo#10 & 11
- Display connected properties in an inline view within the property type XML.
- Introduce "Accept" and "Refuse" action buttons in the property offer views.
- Configure these buttons to be visible only when the offer status allows the action.

Chapter odoo#10 & 11
- Refined the logic for calculating the best offer, transitioning from filtered
- Refined the logic of searching the recordset of offer which has best price
- Introduce a new sequence field to records.
- Utilize this field to define and control the display order of records.

Chapter odoo#11
…logic

- Hide garden area and orientation fields in the property form view when
Chapter odoo#11
- Made estate.property.offer and estate.property.tag list views editable.
- Configured the date_availability field on the estate.property list view to be optional and hidden by default.
- Applied conditional styling to estate.property list view:
- Properties with an offer received are displayed in green.
- Properties with an accepted offer are displayed in green and bold.
- Properties marked as sold are displayed as muted.
- Applied conditional styling to estate.property.offer list view:
- Refused offers are displayed in red.
- Accepted offers are displayed in green.
- Added a filter domain for the living area to include properties with an area greater than or equal to the specified value.

Chapter odoo#11
- Introduce a new stat button on the property type form view.
- This button provides quick access to a list of all offers related to properties of the given type.

Chapter odoo#11
 - Implement restrictions to prevent the deletion of properties not in 'new' or 'cancelled' states.
- Automatically update the property state to 'Offer Received' when a new offer is created.
 - Add validation to prevent the creation of offers with a price lower than an existing offer.
 - Display a list of available properties linked to a salesperson within their user form view.
- Rename 'buyer' and 'salesman' fields to 'buyer_id' and 'salesman_id' to follow naming conventions.

Chapter odoo#12
- Resolved a styling issue identified during the build process.

Chapter odoo#12
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