-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[ADD] estate:Initialize new module #1101
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
base: 19.0
Are you sure you want to change the base?
Conversation
-Define manifest file -Define new model and security file Chapter 1: Architecture Overview Chapter 2: A New Application Chapter 3: Models And Basic Fields Chapter 4: Security - A Brief Introduction
- Created estate property form and list view - Created search bar fields Chapter 5: Finally, Some UI To Play With Chapter 6: Basic Views
1e865d3 to
ce13e13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
Great job so far!
i have added some comments, and can you please add a linter like Ruff.
Commit title like [ADD] estate: basic menus, form and list views
ce13e13
You can use this to write a proper commit message.
https://odoo-commit.firebaseapp.com/
Thanks
estate/models/estate_property.py
Outdated
| from odoo import fields, models | ||
| from dateutil.relativedelta import relativedelta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please follwe this guidelines?
4712d52
estate/models/estate_property.py
Outdated
| garden_orientation = fields.Selection( | ||
| string='Garden Orientation', | ||
| selection=[('north', 'North'), | ||
| ('south', 'South'), | ||
| ('east', 'East'), | ||
| ('west', 'West')]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| garden_orientation = fields.Selection( | |
| string='Garden Orientation', | |
| selection=[('north', 'North'), | |
| ('south', 'South'), | |
| ('east', 'East'), | |
| ('west', 'West')]) | |
| garden_orientation = fields.Selection( | |
| string='Garden Orientation', | |
| selection=[ | |
| ('north', 'North'), | |
| ('south', 'South'), | |
| ('east', 'East'), | |
| ('west', 'West') | |
| ] | |
| ) |
| state = fields.Selection( | ||
| string='State', | ||
| default='new', | ||
| required=True, | ||
| copy=False, | ||
| selection=[('new', 'New'), | ||
| ('offer received', 'Offer Received'), | ||
| ('offer accepted', 'Offer accepted'), | ||
| ('sold', 'Sold'), | ||
| ('cancelled', 'Cancelled')] | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| state = fields.Selection( | |
| string='State', | |
| default='new', | |
| required=True, | |
| copy=False, | |
| selection=[('new', 'New'), | |
| ('offer received', 'Offer Received'), | |
| ('offer accepted', 'Offer accepted'), | |
| ('sold', 'Sold'), | |
| ('cancelled', 'Cancelled')] | |
| ) | |
| state = fields.Selection( | |
| string='State', | |
| default='new', | |
| required=True, | |
| copy=False, | |
| selection=[ | |
| ('new', 'New'), | |
| ('offer received', 'Offer Received'), | |
| ('offer accepted', 'Offer accepted'), | |
| ('sold', 'Sold'), | |
| ('cancelled', 'Cancelled') | |
| ] | |
| ) |
Created search views for the estate.property model. Added menu items and actions to open the property Type Created new model estate.property.type Chapter 6: Basic Views
90db89e to
c2aec78
Compare
Created Many2one, Many2many, and One2many relations between models. Added a new list and form view for the estate.property.offer model. Updated the property view. Chapter 7: Relations Between Models
|
I have implemented all the suggested changes in the latest commits. |
Define 'total_area' and 'best_price' as computed fields on the property model. Add date_deadline and validity with inverse methods to handle offer durations. Use onchange to update garden area and orientation when garden is toggled. Chapter 8: Computed Fields And Onchanges
bit-odoo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
Good Work!
I have added some comments.
Can you please adapt your PR description.
Thanks
estate/models/estate_property.py
Outdated
| total_area = fields.Integer(compute="_compute_total") | ||
| best_price = fields.Float(compute="_compute_maximum") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compute method name should be _compute_<field_name>.
estate/security/ir.model.access.csv
Outdated
| access_estate_property,access_estate_property,model_estate_property,base.group_user,1,1,1,1 | ||
| access_estate_property_type,access_estate_property_type,model_estate_property_type,base.group_user,1,1,1,1 | ||
| access_estate_property_tag,access_estate_property_tag,model_estate_property_tag,base.group_user,1,1,1,1 | ||
| access_estate_property_offer,access_estate_property_offer,model_estate_property_offer,base.group_user,1,1,1,1 No newline at end of file |
There was a problem hiding this comment.
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 at EOF.
estate/views/estate_menus.xml
Outdated
| parent="estate_property_menu_root" | ||
| sequence="1"/> | ||
| <menuitem | ||
| id="estate_property_properties" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refer to this documentation for XML IDs and naming - https://www.odoo.com/documentation/19.0/contributing/development/coding_guidelines.html#xml-ids-and-naming
| <field name="expected_price"/> | ||
| <field name="selling_price"/> | ||
| <field name="garden_area"/> | ||
| <field name="garden_orientation"/> | ||
| <field name="state"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can make some fields optional for better readability.
…mments -Add accept/refuse actions for property offers with validation. -Update property state and selling price on offer acceptance -Add action buttons for offers and properties -Add SQL constraint -Rename compute methods to follow naming conventions -Fix XML IDs according to guidelines -Make non-essential fields optional for better form readability -Add missing newline at end of access rights CSV file Chapter 9: Ready For Some Action Chapter 10: Constraints
5458010 to
cfaae95
Compare
|
Thank You for your feedback. I have implemented the changes and updated the PR accordingly. |
- Added Python constraints for validation - Improved button styling - Added widget and list order to enhance UI - Added a default filter
34536b2 to
b8ed874
Compare
- Added Stat button to XML views. - Defined new relationship for Stat button - Improved button UI design and integration within views - Introduced Tags Color field and made it visible in the list view Chapter 11: Add The Sprinkles

Implements the functionality of Real estate module. Key features include the creation of models, fields, views and business logic for property and offer management.
The implementation focuses on optimizing property and offer workflow with computed fields, constrains and decorators.