[IMP] estate: added auto fields and smart defaults#1224
[IMP] estate: added auto fields and smart defaults#1224patsh-odoo wants to merge 5 commits intoodoo:19.0from
Conversation
bit-odoo
left a comment
There was a problem hiding this comment.
Hello @patsh-odoo
Can you please follow the git guidelines?
https://www.odoo.com/documentation/19.0/contributing/development/git_guidelines.html
And can you please use ruff for proper formatting?
You can check this style error - https://runbot.odoo.com/runbot/batch/2459862/build/106615533
Thanks
estate/models/estate_property.py
Outdated
| from odoo import models, fields | ||
|
|
||
|
|
||
| class estate(models.Model): |
There was a problem hiding this comment.
The class name is in Pascal case. Please read the Python coding guidelines.
https://www.odoo.com/documentation/19.0/contributing/development/coding_guidelines.html#python
| estate_property_ac1,basic_access,model_estate_property,base.group_user,1,1,1,1 | ||
| estate_property_type_ac1,basic_access_type,model_estate_property_type,base.group_user,1,1,1,1 | ||
| estate_property_tag_ac1,basic_access_tag,model_estate_property_tag,base.group_user,1,1,1,1 | ||
| estate_property_offer_ac1,basic_access_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.
Should be one empty line at the end of the file.
estate/views/estate_menus.xml
Outdated
| <menuitem id="estate_property_menu_action_property_tag" action="estate_property_tag_action1"/> | ||
| </menuitem> | ||
| </menuitem> | ||
| </odoo> No newline at end of file |
There was a problem hiding this comment.
Should be one empty line at the end of the file.
| </record> | ||
|
|
||
|
|
||
| </odoo> No newline at end of file |
There was a problem hiding this comment.
Should be one empty line at the end of the file.
| </form> | ||
| </field> | ||
| </record> | ||
|
|
| </field> | ||
| </record> | ||
|
|
||
| </odoo> No newline at end of file |
There was a problem hiding this comment.
Should be one empty line at the end of the file.
| <field name="arch" type="xml"> | ||
| <form> | ||
| <div class="oe_title"> | ||
| <h1><field name="name"/></h1> |
| </field> | ||
| </record> | ||
|
|
||
| </odoo> 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
| 'name': "estate", | ||
| 'depends': ['base'], | ||
| 'application': True, | ||
| 'data': ['security/ir.model.access.csv', 'views/estate_property_type_views.xml', 'views/estate_property_tag_views.xml', 'views/estate_property_offer_views.xml', 'views/estate_property_views.xml', 'views/estate_menus.xml'] |
There was a problem hiding this comment.
| 'data': ['security/ir.model.access.csv', 'views/estate_property_type_views.xml', 'views/estate_property_tag_views.xml', 'views/estate_property_offer_views.xml', 'views/estate_property_views.xml', 'views/estate_menus.xml'] | |
| 'data': [ | |
| 'security/ir.model.access.csv', | |
| 'views/estate_property_type_views.xml', | |
| 'views/estate_property_tag_views.xml', | |
| 'views/estate_property_offer_views.xml', | |
| 'views/estate_property_views.xml', | |
| 'views/estate_menus.xml' | |
| ], |
db4a40c to
fba0a1d
Compare
This commit introduces the new estate module, which includes features to define and organize property listings. Users can now record essential details such as names, postcodes, and descriptions, alongside specific features like the number of bedrooms, living area size, and garden details. It also includes tracking for pricing, availability dates, and the current status of the property (such as "New", "Offer Received", or "Sold"). These properties can be viewed and managed through simple, easy-to-use lists and detailed forms. The need for this module stems from the requirement to make property management easy and centralized. By moving away from manual tracking, this update enables the team to see all property details at a glance in a list view and manage specific information within a single form. This ensures that every listing is accounted for and the sales process is organized and easy to follow for all users. chapter: 1,2,3,4,5
Added custom search, form, and list views for properties in the estate module. These changes were made because the default views did not organize property information clearly. The custom views group related fields like title, postcode, expected price, bedrooms, living area, and facades together, making it easier to read and manage property details. The search view includes filters to show only available properties and allows users to group properties by attributes like postcode. This helps users quickly find, sort, and compare properties in a structured and organized way. chapter: 6(Basic Views)
fba0a1d to
3e66a6e
Compare
8becf43 to
654f91d
Compare
Added fields for buyer, salesperson, and related property offers, as well as property tags (like “cozy”). Custom views for these fields were also created. These changes make it easier to see and manage all key details of a property in one place. Users can quickly identify the buyer and salesperson, check associated offers, and view property features at a glance. Tags and custom views help organize the information and make it more accessible.
Added total area and best offer calculation, linked offer validity and deadline dates setting any one will automatically set another, and default values for garden details will be automatically filled when garden is selected. These changes make data entry easier and reduce manual work. The total area and best offer are calculated automatically, so users don’t need to compute them. Offer validity and deadline are connected, meaning entering one will automatically fill the other, avoiding confusion. When a garden is selected, related fields like area and orientation are pre-filled with default values, helping users enter information faster and more consistently. chapter: 8(Computed Fields And Onchanges)
User can now click a Sold or Cancel button to change a property’s status instantly. The system also protects your data by making sure a house that is already sold cannot be canceled, and a canceled house cannot be sold. Additionally, individual offers now have Accept and Refuse buttons. When you accept an offer, the system automatically fills in the buyer's name and the final price on the main page, ensuring that only one offer can be finalized for a property. These buttons make user's work faster because the system does the typing for user, user don't have to copy and paste the buyer's name or the price. The rules keep records correct by making sure user don't click the wrong button by accident. chapter: 9(Ready For Some Action?)
654f91d to
ffe3c75
Compare

[ADD] estate: added computed fields and onchange method
Added computed fields to display total area, offer validity and offer deadline
date
it was necessary to display total area calculated from garden area and living
area so added compute method to calculate total area and added it to estate
property views, added offer validity and offer dead line fields to
estate_property_offer model they depend on each other so added compute and
inverse methods so user don't need to add another if one is added, added
onchange method so if user selects garden, default orientation and garden area
are populated
chapter: 8(Computed Fields And Onchanges)
task: add computed fields and onchange methods