-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[ADD] estate: added real estate module #846
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: 18.0
Are you sure you want to change the base?
Conversation
- Created new 'estate' module. - Added base model 'estate.property' with fields mentioned in exercise. - Set up module structure. - Set 'name' and 'expected_price' as required fields.
- Added security rules for the estate. - Registered the security files in __manifest__.py to enable permission. - Created menu items for the estate.property model. - Added XML files for actions and menus. - Added basic views for the estate.property model, including form and list views. - Set default values for fields, made certain fields readonly.
-Created new models for property offers,tags and types. -Defined relation between these data models for accessing data across the model. -Created new views for property types,property tags. -Defined action on button click , created computed fields .
- Added SQL constraints to ensure: - Property expected price is strictly positive - Property selling price is positive - Offer price is strictly positive - Property tag name and property type name are unique - Added Python constraint to prevent selling price from being set below 90% of expected price - Changes in UI: - Added inline list view for properties on property type form - Used statusbar widget for property state display - Defined default ordering for models and enabled manual ordering for property types via sequence field - Applied widget options to restrict creation/editing of property types from property form
d7e6602
to
824ce8f
Compare
…module Applied model and view inheritance patterns to extend core functionality Enabled interactions between modules for enhanced business workflows Updated business logic to support new integration features
824ce8f
to
756fc9e
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.
Quick pass.
There are of unwanted diff in the code base.
Also the PR message is not appropriate, please adapt this as well.
view_mode = fields.Selection(selection_add=[ | ||
('gallery', "Awesome Gallery") | ||
], ondelete={'gallery': 'cascade'}) | ||
], ondelete={'gallery': 'cascade'}) |
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.
why this change ?
@@ -0,0 +1 @@ | |||
from . import models |
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.
Licensing is missing
'author': "Dhruvrajsinh Zala (zadh)", | ||
'installable': True, | ||
'application': True, | ||
'data': ['security/ir.model.access.csv', 'views/estate_property_views.xml', 'views/estate_property_offers.xml', 'views/estate_property_type_views.xml', 'views/estate_property_tags.xml', 'views/res_users_views.xml', 'views/estate_menus.xml'], |
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.
Indentation is not correct
description = fields.Text() | ||
postcode = fields.Char() |
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.
Missing the string property
expected_price = fields.Float(required=True) | ||
selling_price = fields.Float(readonly=True, copy=False) | ||
bedrooms = fields.Integer(default=2) |
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.
Same missing the string property is missing in the field definition
<field name="price"/> | ||
<field name="partner_id"/> | ||
<field name="validity"/> | ||
<field name="date_deadline"/> | ||
<button name="action_accept_offer" type="object" title="Accept" icon="fa-check" invisible="status in ( | ||
'accepted','refused')"/> | ||
<button name="action_refuse_offer" type="object" title="Refuse" icon="fa-times" invisible="status in ( | ||
'accepted','refused')"/> | ||
</list> | ||
</field> |
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.
Indentation is off
</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.
Why this extra space is left here ?
|
||
|
||
|
||
|
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.
Why this space ?
|
||
|
||
|
||
|
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.
?
journal = self.env["account.journal"].search( | ||
[("type", "=", "sale")], limit=1 | ||
) |
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.
Is searching inside a for loop a good idea ?
This PR adds demo data to the estate module as per the Odoo Estate tutorial.
Features:
-Estate module initialization and configuration
-Property model definition with key fields
-Basic list and form views
-Menu and action setup for navigation
-Implemented Inheritance
-Creates Invoice on Property Sell