[ADD] estate:estate module creation and model implementation.#1194
[ADD] estate:estate module creation and model implementation.#1194habar-odoo wants to merge 11 commits intoodoo:19.0from
Conversation
bit-odoo
left a comment
There was a problem hiding this comment.
Hello @habar-odoo
Nice work!
I have added some comments.
No need to separate commit for this - 9394ad6, e69355a, bc2d081 , dede429
Can you please follow commit message guidelines?
https://www.odoo.com/documentation/19.0/contributing/development/git_guidelines.html
Thanks
estate/models/estate_property.py
Outdated
| from odoo import models, fields | ||
| from dateutil.relativedelta import relativedelta |
There was a problem hiding this comment.
Can you please follow the coding import guidelines?
https://www.odoo.com/documentation/19.0/contributing/development/coding_guidelines.html#imports
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 | |||
| access_estate_property,access_estate_property,model_estate_property,base.group_user,1,1,1,1 No newline at end of file | |||
There was a problem hiding this comment.
Should be one empty line at the end of the file.
estate/__manifest__.py
Outdated
| 'security/ir.model.access.csv', | ||
| 'views/estate_property_views.xml', | ||
| 'views/estate_menus.xml', | ||
| ], |
estate/models/estate_property.py
Outdated
| ('offerreceived', 'Offer Received'), | ||
| ('offeraccepted', 'Offer Accepted'), |
There was a problem hiding this comment.
| ('offerreceived', 'Offer Received'), | |
| ('offeraccepted', 'Offer Accepted'), | |
| ('offer_received', 'Offer Received'), | |
| ('offer_accepted', 'Offer Accepted'), |
A little bit readable 😅
fba649c to
7781522
Compare
bit-odoo
left a comment
There was a problem hiding this comment.
Hello,
Great Work!
Can you please add a description to this commit - 7781522
Also, can you please improve all your commit titles and messages according to the guidelines - https://www.odoo.com/documentation/19.0/contributing/development/git_guidelines.html#
Can you please improve the PR description?
Thanks
| from dateutil.relativedelta import relativedelta | ||
| from odoo import api, fields, models |
There was a problem hiding this comment.
Can you please follow the import coding guidelines?
estate/models/estate_property.py
Outdated
| facades = fields.Integer(string="Facades") | ||
| garage = fields.Boolean(string="Garage") | ||
| garden = fields.Boolean(string="Garden") |
There was a problem hiding this comment.
No need to add a string if your technical name and string name are the same because Odoo is generating the string by default.
| </group> | ||
| </page> | ||
| <page string="Offers"> | ||
| <field name="offer_ids"/> |
| <field name="name">estate.property.list</field> | ||
| <field name="model">estate.property</field> | ||
| <field name="arch" type="xml"> | ||
| <list string="Properties" limit="20"> |
There was a problem hiding this comment.
What is the purpose of adding limit=20?
There was a problem hiding this comment.
By default, Odoo typically displays 80 records per page. Setting limit="20" showing only 20 records at a time
d4b4165 to
57fb096
Compare
Initialize the real estate addon with a proper manifest and define the core 'estate.property' model. This provides the foundation for managing property listings, including essential fields like price, area, and availability.
e8faf37 to
e1f7fc8
Compare
Implement the security layer for the estate module. Added ir.model.access.csv to grant CRUD permissions to the standard user groups, ensuring properties and offers are manageable through the UI.
Introduce the UI entry points for the real estate module. Defined the window action and menu hierarchy to allow users to view and manage property records from the web interface.
Introduce custom layouts for property management. The form view provides a structured data entry interface, while the search view enables filtering by key attributes like price and status.
Introduce core relations for property management. Added property types, tags, and offer tracking to support complex data structures. This enables interaction through Many2one, Many2many, and One2many relationships. This completes Chapter 7 by linking properties with their associated types, tags, and offers.
Add a new field that automatically calculates the total property area. By linking the living area and garden area, the system now updates the total size whenever either value changes. This removes the need for manual entry and prevents mistakes.
Implement business logic to automatically track the highest bid for a property. Using a computed field, the system now identifies the 'best price' from all related offers, ensuring sellers see the most competitive deal at a glance.
1) Define two fields validity and deadline. 2) Create compute & inverse method for them 3) Also added search functionality in the estate property model for best offers.
1) Define _onchange_garden() to automatically set default garden_area and garden_orientation when the garden is enabled. 2) Clear these fields when the garden is disabled. 3) Add a warning notification when the garden checkbox is checked.
Added 'Cancel' and 'Sold' buttons to the estate.property model. A sold property cannot be cancelled, and a cancelled property cannot be marked as sold. Used Odoo Exceptions to show error messages for invalid actions.
e1f7fc8 to
9456a9a
Compare
This functionality define to accept & refuse offer once offer is accepted it set selling price and buyer to the corresponding property. generates error if more than one offer is try to accept, added buttons to the corresponding actions used 'checked' & 'unchecked' icons.
d8b352c to
176a677
Compare

Real Estate Property Module