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 11 commits into
base: 18.0
Choose a base branch
from

Conversation

zadh-odoo
Copy link

@zadh-odoo zadh-odoo commented Jul 9, 2025

*=estate_account

This pull request introduces two interconnected modules: estate, which handles real estate management, and estate_account, which links property processes with Odoo’s accounting functionality.

The estate module enables users to add and control real estate properties. Properties can have attributes such as name, description, expected and selling price, type, associated tags, buyer, and salesperson. It supports the creation of offers on properties; offers may be accepted or declined, with an enforced business rule that an accepted offer must be at least 90% of the property’s expected price. After an offer is accepted, the property can then be marked as sold. Safeguards are in place so that a sold property cannot be cancelled, and a cancelled one cannot be sold, ensuring a logical and consistent sales workflow.

With estate_account, property sales are automatically reflected in Odoo’s accounting module by generating an invoice as soon as a property is sold. This provides seamless synchronization between property operations and financial documentation.

@robodoo
Copy link

robodoo commented Jul 9, 2025

Pull request status dashboard

@zadh-odoo zadh-odoo force-pushed the 18.0-training-zadh branch 4 times, most recently 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.

@zadh-odoo zadh-odoo force-pushed the 18.0-training-zadh branch 3 times, most recently from 9066f95 to 4562c04 Compare July 14, 2025 05:10
@zadh-odoo zadh-odoo changed the title [ADD] estate: added real estate module [ADD] estate,*: added real estate module Jul 14, 2025
- 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.
@zadh-odoo zadh-odoo force-pushed the 18.0-training-zadh branch from 923ccbf to a1fa17d Compare July 17, 2025 05:03
-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
@zadh-odoo zadh-odoo force-pushed the 18.0-training-zadh branch from a1fa17d to 875ac83 Compare July 17, 2025 05:05
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
…module data

- Added security groups, access rights, and record rules to both estate and estate_account modules.
- Defined and updated security XML files: created agent and manager groups, set appropriate access permissions for each model.
- Added record rules to restrict agents to their own properties and ensure managers have global access.
- Populated initial group and access data using XML data files.
- Updated module manifests to reference new security and data files.
- estate_account inherits and respects estate security, and applied access rules to accounting-related features.
- Create demo records for estate properties and link them to the appropriate property types. These records will be used for testing and demonstration purposes.
- Add demo offers related to the demo properties, ensuring each offer is associated with a valid property and partner.
- Add initial master data for property types, including Residential, Commercial, Industrial, and Land. This provides the base categories for estate properties.
Added a PDF report for estate properties showing all property offers using QWeb templates and report actions as outlined in the PDF report tutorial. Also inherited and extended this report in estate_account to display invoice information for sold properties. This involved organizing new templates and report actions under each module and updating manifest files accordingly.

This improves reporting capabilities for property offers and ensures that sales-related financial info is integrated into property documents. Enables business users to generate comprehensive property and accounting reports directly from the UI.
@zadh-odoo zadh-odoo force-pushed the 18.0-training-zadh branch from 875ac83 to f4747d4 Compare July 17, 2025 05:17
- Introduced new unit tests in the estate module covering key business processes:
  - Prevent offer creation on sold properties.
  - Disallow marking properties as sold without an accepted offer.
  - Ensure garden area and orientation fields reset appropriately when garden is unchecked.
- These tests improve the reliability and maintainability of the estate workflow.
@zadh-odoo zadh-odoo force-pushed the 18.0-training-zadh branch from 77f9831 to c135766 Compare July 17, 2025 10:22
…utorial

Introduce initial Owl components as part of the JavaScript framework learning exercise.
Includes examples of reactive state, component composition, prop passing, template rendering, and event handling using Owl.
Developed a custom dashboard module utilizing OWL and JavaScript to present important business metrics in a visually appealing and interactive interface.
The dashboard pulls real-time data from backend models, displaying it through summary cards and various charts.
This module serves as a practical example of constructing responsive dashboards in Odoo with client-side rendering and tailor-made components
This commit fixes the issue where the app was not visible in the Apps list after installation due to missing user access rights.

Before:
– After installing the app, it was not visible in the Apps list. The "Manager" group had to be manually assigned to see the app icon.

After:
– A default base rule is now applied, and the app is immediately visible after installation.
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