-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[ADD] estate: initial Real Estate module with models, views, and rela… #757
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
…tions Introduce the base structure of the Real Estate application as per Odoo 18 developer tutorial, covering the foundational data model, views, menus, access rights, and key relationships. This commit adds: - A new module named `estate`. - The main model `estate.property` with relevant business fields (name, price, expected price, description, living area, garden, garage, etc.). - Custom menus, actions, form and list views for `estate.property`. - Field attributes like `readonly`, `copy`, `required`, and default values. - Access rights through `ir.model.access.csv` for developers. - Multiple record filtering using `domain`, `search`, and view buttons. - Related models: - estate.property.type`: Many2one for property types. - estate.property.tag`: Many2many tags with selection UI. - estate.property.offer`: One2many offer list per property with inline editing - Links to existing models: `res.partner` (buyer), `res.users` (salesperson). - Navigation enhancements through related fields and smart buttons. - Search enhancements using filters for related fields like tags and type. The goal of this commit is to build a working foundation of the real estate sales module including a robust data model, basic UI, and relations required for future business logic and workflow implementation. task-001 (Chapter 1–7 Odoo 18 Developer Tutorial)
Enhance the Real Estate module by implementing computed fields, onchange behavior, SQL constraints, and business logic for handling property offers as outlined in Chapters 9 and 10 of the Odoo 18 Developer Tutorial. This commit adds: - Computed fields: - `total_area`: combines living and garden areas. - `best_price`: dynamically shows the highest offer on a property. - Onchange method to auto-fill garden attributes when the garden is checked - Python constraints using `@api.constrains` to: - Ensure selling price is at least 90% of expected price. - Validate date availability is not in the past. - SQL-level check constraints to enforce: - `expected_price > 0` on estate.property. - `price > 0` on estate.property.offer. - Action methods for accepting and refusing property offers: - Accepting sets offer status and updates property selling price/buyer. - Refusing only updates offer status. - Constraints ensure only one offer can be accepted per property. - Improved inline editing experience in offer list view. - Readonly fields, computed badges, and smart button usability refinements. These changes enforce critical business rules and improve user feedback, ensuring data consistency and meaningful interactions within the Real Estate flow. task-002 (Chapter 9–10 Odoo 18 Developer Tutorial)
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.
Hello @raaa-odoo
Nice work overall looks good.
Few comments mostly related to coding guidelines and nitpicking.
Cheers!!
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.
Hello @raaa-odoo
Some questions/suggestions
Thanks!!
<group> | ||
<field name="tag_ids" string = "Tag" widget="many2many_tags" options="{'color_field': 'color'}"/> | ||
<field name="property_type_id" | ||
options="{'no_create': True, 'no_create_edit': 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.
'no_create_edit': True
no need for this i think only 'no_create': True
can serve the purpose.
a0405b1
to
304ff73
Compare
… transitions This commit completes the enhancements from chapters 11 to 15 of the Odoo 18 Real Estate module. It introduces a range of improvements: - Added state field with custom transitions (`new`, `offer received`, `offer accepted`, `sold`, `cancelled`), including buttons and logic for Sold/Cancelled. - Added computed fields: total_area (living + garden), best_offer, and selling_price. - Added SQL constraints and Python constraints to ensure offers are above a threshold and selling price is logically correct. - Used computed and inverse fields to manage garden area visibility based on the garden boolean. - Refactored UI behavior (e.g., readonly fields) based on the state of the property. - Automatically assigns partner to offers upon creation. - Used Inheritance for inheriting the class and use the features. - Created kanban view while using drag and drop. These changes reinforce business rules and improve usability for real estate agents managing listings and offers.
Refactored the code to enhance readability and maintainability by improving indentation, spacing, and overall formatting. No functional or logic changes were made—only visual/code style adjustments for clarity. This improves code quality and aligns with best practices for clean code.
Refactored the code to enhance readability and maintainability by improving indentation, spacing, and overall formatting. No functional or logic changes were made—only visual/code style adjustments for clarity. This improves code quality and aligns with best practices for clean code.
Enhance the estate module with collaborative features, realistic demo content, fine-grained access control, and printable PDF output to support real-world usage, development, and testing. - Enabled chatter by adding `mail.thread` and `mail.activity.mixin` to property and offer models for tracking and communication. - Added a demo data file to preload properties, offers, and users for development and testing. - Implemented access control using mixins and record rules to restrict read/write/delete permissions based on ownership and roles. - Introduced a QWeb PDF report for properties with a print button to export property data as a downloadable document. Improves module functionality, security, and usability for real-world use and testing.
This commit includes three major enhancements to the estate module: 1. Website Controller: - Added a new website controller to render a list of available properties on the frontend (`/properties`). - Implemented optional filtering by min and max price using query parameters. 2. Add Offer Wizard: - Introduced a wizard to allow adding offers to multiple properties in bulk. - Activated via a new Add Offer button on the estate property list view. 3. Test Cases: - Added unit tests to ensure the correctness of the code and logic. These improvements significantly enhance usability for both website visitors and internal users, especially salespeople handling bulk property offers.
This commit includes three major enhancements to the estate module: 1. Website Controller: - Added a new website controller to render a list of available properties on the frontend (`/properties`). - Implemented optional filtering by min and max price using query parameters. 2. Add Offer Wizard: - Introduced a wizard to allow adding offers to multiple properties in bulk. - Activated via a new Add Offer button on the estate property list view. 3. Test Cases: - Added unit tests to ensure the correctness of the code and logic. These improvements significantly enhance usability for both website visitors and internal users, especially salespeople handling bulk property offers.
…ises Refactored test case logic in the estate module to improve clarity and reliability. Also finalized all exercises in the awesome_owl module using the OWL framework, including the following key enhancements: - Refactored the Card component to use slots instead of a content prop - Implemented content toggling in Card with button and open/close state - Ensured safe and correct rendering of dynamic HTML using t-raw - Improved Playground layout with professional and colorful design - Fixed TodoList display logic and checkbox behavior These changes align the implementation with best practices in OWL and improve user experience and maintainability.
This commit restructures the 8000 dashboard to render items dynamically based on a centralized configuration list. This approach enables easier extension and reuse of dashboard item types, improving maintainability and scalability. Key changes include: Introduction of dashboard_items.js to define a list of item configurations, including type, title, and props. This enables dynamic rendering of dashboard widgets like NumberCard and PieChartCard. The DashboardItem component now acts as a dynamic wrapper that loads and renders the appropriate child component based on its type. This is achieved using Owl's dynamic component syntax and t-component. Separation of each card type into its own file (NumberCard, PieChartCard) to promote single-responsibility design and reuse across modules. All components continue to use Bootstrap utility classes and maintain responsive, clean, and modern styling. This change lays the foundation for a fully extensible dashboard architecture, where new visualizations can be added without modifying the core dashboard view.
This commit introduces a mandatory deposit system for rental products to secure rentals against potential damages or late returns. The implementation includes: 1. System configuration to set a deposit product that will be used across all rental deposits 2. Product-level settings to enable deposits and specify amounts per unit 3. Automatic addition of deposit lines to rental orders 4. Frontend display of deposit information for customer transparency The deposit system works by: - Allowing administrators to configure a deposit product in Settings - Enabling per-product deposit requirements with customizable amounts - Automatically adding deposit lines when rental products are ordered - Calculating deposit totals based on product quantity - Maintaining clear relationships between rentals and their deposits This feature was implemented to reduce financial risk for rental businesses while maintaining a smooth customer experience. The system ensures deposits are always collected when required without manual intervention from sales staff. task- Add rental deposit functionality
… transitions This commit completes the enhancements from chapters 11 to 15 of the Odoo 18 Real Estate module. It introduces a range of improvements: - Added state field with custom transitions (`new`, `offer received`, `offer accepted`, `sold`, `cancelled`), including buttons and logic for Sold/Cancelled. - Added computed fields: total_area (living + garden), best_offer, and selling_price. - Added SQL constraints and Python constraints to ensure offers are above a threshold and selling price is logically correct. - Used computed and inverse fields to manage garden area visibility based on the garden boolean. - Refactored UI behavior (e.g., readonly fields) based on the state of the property. - Automatically assigns partner to offers upon creation. - Used Inheritance for inheriting the class and use the features. - Created kanban view while using drag and drop. These changes reinforce business rules and improve usability for real estate agents managing listings and offers.
304ff73
to
0f69fe9
Compare
…tions
Introduce the base structure of the Real Estate application as per Odoo 18 developer tutorial, covering the foundational data model, views, menus, access rights, and key relationships.
This commit adds:
estate
.estate.property
with relevant business fields (name, price, expected price, description, living area, garden, garage, etc.).estate.property
.readonly
,copy
,required
, and default values.ir.model.access.csv
for developers.domain
,search
, and view buttons.res.partner
(buyer),res.users
(salesperson).The goal of this commit is to build a working foundation of the real estate sales module including a robust data model, basic UI, and relations required for future business logic and workflow implementation.
task-001 (Chapter 1–7 Odoo 18 Developer Tutorial)