Skip to content

[ADD] estate: add real estate advertisement module#1230

Draft
vikvi-odoo wants to merge 21 commits intoodoo:19.0from
odoo-dev:19.0-tutorial-vikvi
Draft

[ADD] estate: add real estate advertisement module#1230
vikvi-odoo wants to merge 21 commits intoodoo:19.0from
odoo-dev:19.0-tutorial-vikvi

Conversation

@vikvi-odoo
Copy link
Copy Markdown

@vikvi-odoo vikvi-odoo commented Apr 6, 2026

Add a new real estate advertisement module that allows
users to manage property listings. The module includes
the data model, security access rights, and the basic
UI to navigate and interact with property records.

Chapter-2 to Chapter-5

@robodoo
Copy link
Copy Markdown

robodoo commented Apr 6, 2026

Pull request status dashboard

@vikvi-odoo vikvi-odoo requested review from mash-odoo and removed request for mash-odoo April 6, 2026 04:30
@vikvi-odoo vikvi-odoo force-pushed the 19.0-tutorial-vikvi branch from c610728 to cdb5287 Compare April 6, 2026 12:46
@vikvi-odoo vikvi-odoo changed the title Add chapter 4 [ADD] estate: add real estate advertisement module Apr 8, 2026
@mash-odoo mash-odoo removed their request for review April 8, 2026 06:23
Copy link
Copy Markdown

@bit-odoo bit-odoo left a comment

Choose a reason for hiding this comment

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

Hello @vikvi-odoo

You have written too many comments in the code.
Writing a comment is good, but no need to write a comments onevery single line. It's only required, like when there is a complex computation, etc.

Please use ruff for proper formatting.

Thanks

Comment thread estate/models/estate_property.py
Comment thread estate/models/estate_property.py Outdated
Comment thread estate/models/estate_property.py Outdated
Comment thread estate/security/ir.txt Outdated
Comment thread estate/views/estate_menus.xml Outdated
Comment thread estate/views/estate_menus.xml Outdated
Comment thread estate/views/estate_property_views.xml Outdated
- Create the initial __manifest__.py file to define the module's metadata and make it discoverable by Odoo.
- Add the __init__.py file to mark the directory as a Python package and prepare for importing future models and other components.
- Establish the basic structure required for the new 'estate' module to be loaded and function within the Odoo framework.
- Updated the commit message to accurately reflect the changes made in the estate module for Chapter 2.
- fix the space issue in the __init__.py file of the estate module to ensure proper formatting and readability.
- Created estate.property model
- Added module structure and manifest configuration
- Implemented fields and basic validations
- Fixed import and dependency issues
- Resolved runtime errors during module loading

[fix] estate: fix issue of external id and access rights

[fix] estate: fix issue of access rights for estate.property model

[fix] estate: fix issue of installation of estate module due to missing access rights
- Added ir.model.access.csv for estate.property
- Configured basic CRUD permissions for internal users

Chapter 4 - Security Intro
-   Introduce the estate module into the user interface.
-   Add estate_menus.xml to define the module's menu structure and make it visible.
-   Include estate_property_views.xml to define the initial property views.
-   Implement the necessary extra fields and conditions as required by chapter 5.
- Removed superfluous comments that added noise without providing value.
- Addressed inconsistent indentation to ensure adherence to code style guidelines.
- Addressed inconsistent indentation to ensure adherence to code style guidelines.
@vikvi-odoo vikvi-odoo force-pushed the 19.0-tutorial-vikvi branch from 79e4560 to e80d110 Compare April 9, 2026 04:40
- Implement the list view for the estate properties.
- Implement the form view for detailed property management.
- Implement the search view to allow filtering and grouping of properties.
- These views are introduced as part of the Chapter 6 exercises in the Odoo development tutorial.
Implement Many2one, Many2many, and One2many relationships:
- Add Many2one link from property to property type
- Add Many2many link between property and property tags
- Add One2many link from property to offers
- Update views to display the new relational fields
- The estate module's manifest was updated to include a proper description.
- A standard LICENSE  has been added .
- These additions ensure the module is complete and adheres to standard Odoo module structure.
- Implement action_sold_property and action_cancel_property buttons.
- Add validation to prevent cancelling a sold property and vice-versa.
- Add action_accept_offer and action_reject_offer buttons in offer list.
- Implement logic to automatically set selling_price and buyer upon offer acceptance.
- Add UserError constraints to ensure data integrity during state transitions.
…t view

- Add 'title' attribute to Accept and Reject buttons in the offer list view.
- Resolve view validation error: "A button with icon attribute must have title".
… 10)

- Add SQL constraints to ensure expected_price and offer price are strictly positive.
- Add unique SQL constraints for property type and tag names to prevent duplicates.
- Implement Python @api.constrains to enforce the "90% Rule": selling price
  cannot be lower than 90% of the expected price.
- Use float_compare and float_is_zero tools for robust numerical validation.
-Clean up estate_property_offer.py by removing the ValidationError import which is no longer utilized in the current implementation.
@vikvi-odoo vikvi-odoo requested a review from bit-odoo April 22, 2026 13:25
Copy link
Copy Markdown

@bit-odoo bit-odoo left a comment

Choose a reason for hiding this comment

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

Hello,
I have added some comments.
Your code is not aligned with coding guidelines.
Please refer to the coding guidelines documentation.
https://www.odoo.com/documentation/19.0/contributing/development/coding_guidelines.html

Also, can you please update your PR description, as it should be generic.

Thanks

Comment thread estate/models/estate_property.py
Comment thread estate/models/estate_property.py
Comment thread estate/models/estate_property.py Outdated
Comment thread estate/models/estate_property.py Outdated
Comment thread estate/models/estate_property_offer.py
Comment thread estate/models/estate_property_offer.py Outdated
Comment thread estate/models/estate_property.py Outdated
Comment thread estate/models/estate_property_tag.py
Comment thread estate/git Outdated
Comment thread estate/views/estate_property_views.xml Outdated
- Adjust SQL constraints ordering and fix Python formatting/spacing for better readability.
- Implement business logic in action_accept_offer to automatically mark all other
  offers as 'Refused' once one is accepted.
- Clean up XML files by correcting indentation, removing trailing spaces.
@vikvi-odoo vikvi-odoo force-pushed the 19.0-tutorial-vikvi branch 2 times, most recently from 2823bf0 to 87e616b Compare April 27, 2026 12:57
…ter 11)

Enhance the Real Estate module with improved user interaction and visual feedback:

- Logic: Implement automatic button visibility; 'Sold'/'Cancel' buttons hide on finalized states, and 'Accept'/'Reject' buttons hide once an offer is processed.
- UI/UX: Add color support for property tags and enable inline editing (editable='bottom') for the offers list view.
- Visuals: Add row decorations (colors/bolding) to track property states and offer statuses at a glance.
- Navigation: Add a default search filter and a Stat Button on Property Types to display a filtered list of related offers.
- Formatting: Corrected Python spacing to comply with Odoo coding standards and pass linter checks.
- Cleanup: Remove debug print statements and refine recordset sorting.
@vikvi-odoo vikvi-odoo force-pushed the 19.0-tutorial-vikvi branch from 87e616b to 09a857c Compare April 27, 2026 13:12
…ter 11)

Enhance the Real Estate module with improved user interaction and visual feedback:
- Logic: Implement automatic button visibility; 'Sold'/'Cancel' buttons hide on finalized states, and 'Accept'/'Reject' buttons hide once an offer is processed.
- UI/UX: Add color support for property tags and enable inline editing (editable='bottom') for the offers list view.
- Visuals: Add row decorations (colors/bolding) to track property states and offer statuses at a glance.
- Navigation: Add a default search filter and a Stat Button on Property Types to display a filtered list of related offers.
- Formatting: Corrected all XML indentation and Python spacing to comply with Odoo coding standards and pass linter checks.
- Cleanup: Remove debug print statements and refine recordset sorting.
…e (Chapter 12)

- Logic: Override 'create' in property offers to enforce that new offers
  cannot be lower than existing ones.
- Logic: Update property state to 'Offer Received' automatically upon
  successful offer creation.
- Security: Implement @api.ondelete protection to prevent deleting
  properties unless they are in 'New' or 'Cancelled' states.
- Inheritance: Extend 'res.users' to include a one2many relationship
  with estate properties.
- UI: Add a dedicated 'Real Estate Properties' notebook page to the
  User form view to display assigned listings.
Remove an accidental print statement in estate_property_offer.py
that was causing automated check failures.
Clean up the code to ensure compliance with Odoo coding standards.
- Remove unused variable record from estate.property.offer.py
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