Skip to content

[ADD] real_estate: added real_estate module#1227

Draft
Arbaaz-Khan-Tech wants to merge 6 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 6 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

_description = "A real estate model with many fields"
name = fields.Char(required=True)
description = fields.Text()
postcode = fields.Integer()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Giving an actual thought to use this data type instead of Char is really appreciatable.
Just one concern I wanna raise here that will it satisfy all the conditions?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

A real estate name is generally short, so for the most part it will work perfectly. However, if a property has a very long name, it could be an issue. Should we keep it as Char with an increased limit, or switch to Text?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I meant for the postcode field

@@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
estate.access_estate_property,access_estate_property,estate.model_estate_property,base.group_user,1,1,1,1 No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Always leave an extra line at the end of every file.
It's a part of the convention. You can apply it to all files.

],
'license': 'LGPL-3', # Default License
'application': True,
'installable': True,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What's the purpose of using 'installable': True?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

When installable is set to true , user can install the module from web interface

Comment on lines +16 to +17
living_area = fields.Integer()
facades = fields.Integer()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Also just a suggestion.. you can sort the fields alphabetically so that it becomes easier to find the field while you want to take a reference of it when building any logic.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Sure

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