-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[ADD] estate : add real estate module #1128
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
artn-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.
Nice job so far !
Just some small styling nitpicks, otherwise it's all good.
We try to always put a new line at the end of a file, this can be done automatically when you save your file in vscode if the Insert Final Newline option is activated.
estate/__manifest__.py
Outdated
| 'name': 'Estate', | ||
| 'version': '1.9', | ||
| 'category': 'Real Estate', | ||
| 'summary' : 'Manage your real estate 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.
Unwanted white space here
| 'summary' : 'Manage your real estate properties', | |
| 'summary': 'Manage your real estate properties', |
estate/models/estate_property.py
Outdated
| _name = 'estate.property' | ||
| _description = 'Estate Property' | ||
| name = fields.Char(string='Name', required=True) | ||
|
|
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.
Try to put the new line between the private attributes and the fields instead
| _name = 'estate.property' | |
| _description = 'Estate Property' | |
| name = fields.Char(string='Name', required=True) | |
| _name = 'estate.property' | |
| _description = 'Estate Property' | |
| name = fields.Char(string='Name', required=True) |
csan-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.
Great work! Just a few minor nitpicks
Add SQL constraints to ensure prices are positive and names are unique. Implement a Python constraint to prevent selling prices below 90% of the expected price.
Implement several UI improvements to enhance user experience and data visibility: - Add state-based decorations (color/bold) to the property and offer list views. - Add inline buttons to the offer list for quick 'Accept' and 'Refuse' actions. - Implement a stat button on the property type form to display a count of related offers. - Enhance the property form with statusbar, ribbons, and color-coded tags. - Update search views with custom filter domains and default groupings.
Create a new link module 'estate_account' that depends on 'estate' and 'account'.
Implement model inheritance for 'estate.property' to override 'action_sold':
- Automatically create an 'account.move' (Customer Invoice) for the property buyer.
- Add two invoice lines using the Command namespace:
1. Commission: 6% of the property selling price.
2. Administrative fees: Fixed amount of 100.00.
Create a kanban view with name, selling price, expected price, best price and tag ids and group them by type id
csan-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.
Perfect! Just make sure to follow the guidelines for the commit title :)
csan-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.
Good job! Just a couple of quick changes needed.
| <record id="estate_property_offer_action" model="ir.actions.act_window"> | ||
| <field name="name">Offers</field> | ||
| <field name="res_model">estate.property.offer</field> | ||
| <field name="view_mode">list,form</field> | ||
| <field name="domain">[('property_type_id', '=', active_id)]</field> | ||
| <field name="view_ids" eval="[(5, 0, 0), (0, 0, {'view_mode': 'list', 'view_id': ref('estate_property_offer_view_tree_stat')})]"/> | ||
| </record> |
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.
To maintain better organization and consistency, all views related to a specific model should be kept together in the same XML file. Therefore, this code would be more appropriately placed in estate_property_offer_views.xml.
| <record id="estate_property_offer_view_tree_stat" model="ir.ui.view"> | ||
| <field name="name">estate.property.offer.list.stat</field> | ||
| <field name="model">estate.property.offer</field> | ||
| <field name="arch" type="xml"> | ||
| <list string="Property Offers" editable="bottom" | ||
| decoration-danger="status == 'refused'" | ||
| decoration-success="status == 'accepted'"> | ||
| <field name="property_id"/> | ||
| <field name="price"/> | ||
| <field name="partner_id"/> | ||
| <field name="validity"/> | ||
| <field name="date_deadline"/> | ||
| </list> | ||
| </field> | ||
| </record> |
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.
| <record id="estate_property_offer_view_tree_stat" model="ir.ui.view"> | |
| <field name="name">estate.property.offer.list.stat</field> | |
| <field name="model">estate.property.offer</field> | |
| <field name="arch" type="xml"> | |
| <list string="Property Offers" editable="bottom" | |
| decoration-danger="status == 'refused'" | |
| decoration-success="status == 'accepted'"> | |
| <field name="property_id"/> | |
| <field name="price"/> | |
| <field name="partner_id"/> | |
| <field name="validity"/> | |
| <field name="date_deadline"/> | |
| </list> | |
| </field> | |
| </record> |
| "author": "Odoo", | ||
| "license": "LGPL-3", | ||
| "depends": ["estate", "account"], | ||
| "data": [], |
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.
| "data": [], |

No description provided.