[ADD] real_estate: added real_estate module#1227
[ADD] real_estate: added real_estate module#1227Arbaaz-Khan-Tech wants to merge 6 commits intoodoo:19.0from
Conversation
Add a new real estate module to handle properties and related features. Made it an application so it can be installed and used easily.
- 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
mash-odoo
left a comment
There was a problem hiding this comment.
Hello!
Thank you for your work.
Here are some few questions and suggestions.
Also please update your PR title
estate/models/estate_property.py
Outdated
| _description = "A real estate model with many fields" | ||
| name = fields.Char(required=True) | ||
| description = fields.Text() | ||
| postcode = fields.Integer() |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
estate/security/ir.model.access.csv
Outdated
| @@ -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 | |||
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
What's the purpose of using 'installable': True?
There was a problem hiding this comment.
When installable is set to true , user can install the module from web interface
estate/models/estate_property.py
Outdated
| living_area = fields.Integer() | ||
| facades = fields.Integer() |
There was a problem hiding this comment.
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.
- 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
48a97e2 to
7e244b4
Compare
- 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

This PR introduces a new
real_estatemodule as part of the tutorial.Features included
Created a new installable application module
real_estate.Added the
estate_propertymodel.Introduced required fields
nameandexpected_price.Added a constraint to ensure
expected_priceis greater than zero.Added
ir.model.access.csvto define user permissions.Updated
__manifest__.pyto include the access control file.Added XML views to display estate property records.
Registered the views in the manifest.