Skip to content

[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

Draft
wants to merge 5 commits into
base: 18.0
Choose a base branch
from

Conversation

zadh-odoo
Copy link

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

zadh-odoo added 4 commits July 2, 2025 19:02
- 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
@robodoo
Copy link

robodoo commented Jul 9, 2025

Pull request status dashboard

@zadh-odoo zadh-odoo force-pushed the 18.0-training-zadh branch 3 times, most recently from d7e6602 to 824ce8f Compare July 9, 2025 13:36
…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
@zadh-odoo zadh-odoo force-pushed the 18.0-training-zadh branch from 824ce8f to 756fc9e Compare July 10, 2025 04:48
@zadh-odoo zadh-odoo changed the title [ADD] estate: Added real estate module [ADD] estate: added real estate module Jul 10, 2025
Copy link

@maad-odoo maad-odoo left a 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.

Comment on lines 8 to +10
view_mode = fields.Selection(selection_add=[
('gallery', "Awesome Gallery")
], ondelete={'gallery': 'cascade'})
], ondelete={'gallery': 'cascade'})

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

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'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation is not correct

Comment on lines +26 to +27
description = fields.Text()
postcode = fields.Char()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing the string property

Comment on lines +33 to +35
expected_price = fields.Float(required=True)
selling_price = fields.Float(readonly=True, copy=False)
bedrooms = fields.Integer(default=2)

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

Comment on lines +15 to +24
<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>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation is off

Comment on lines +6 to +10
</record>




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 ?

Comment on lines +7 to +10




Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this space ?

Comment on lines +133 to +136




Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Comment on lines +14 to +16
journal = self.env["account.journal"].search(
[("type", "=", "sale")], limit=1
)

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants