Skip to content

[ADD] estate : real estate module implementation#1232

Draft
aykhu-odoo wants to merge 17 commits intoodoo:19.0from
odoo-dev:19.0-tutorials-estate-aykhu
Draft

[ADD] estate : real estate module implementation#1232
aykhu-odoo wants to merge 17 commits intoodoo:19.0from
odoo-dev:19.0-tutorials-estate-aykhu

Conversation

@aykhu-odoo
Copy link
Copy Markdown

@aykhu-odoo aykhu-odoo commented Apr 13, 2026

Implementation of Real Estate Advertisement Module & Web Dashboard (Owl)

Real Estate Module

  • Managed properties and offers (create, sell, accept/refuse) along with required business rules
  • Designed relationships between models and ensured data stays correct using constraints
  • Built the UI with list, form, and search views, along with menus, actions, and buttons
  • Security configuration using access rights

Owl (Web Framework)

  • Created basic UI components (like Counter and Todo list) to understand how Owl works
  • Handled user interactions such as adding, updating, and removing items with live updates
  • Connected and reused components by passing data and handling communication between them
  • Built a simple dashboard and integrated it into Odoo’s web interface using its services

Previous closed PR - #1193

…tion

- Configured manifest with required metadata and dependencies.
- It covers chapter- 2 and 3 task
- Added the required fields.
- Completed Ch 4 task for Access Rights
@robodoo
Copy link
Copy Markdown

robodoo commented Apr 13, 2026

Pull request status dashboard

@aykhu-odoo aykhu-odoo force-pushed the 19.0-tutorials-estate-aykhu branch 4 times, most recently from a0a9563 to 4fe99f0 Compare April 15, 2026 17:59
- Created an action
- Define main menu and submenus
- Add views to manifest 'data' list
- Completed Ch 5 Action and Menu part
- Added is_active and state fields in form
- Added fields in list view
- Improved and adjusted fields in Form View
- Completed Ch 5 and Ch 6 List and Form Views
@aykhu-odoo aykhu-odoo force-pushed the 19.0-tutorials-estate-aykhu branch from 4fe99f0 to b8bc03e Compare April 16, 2026 09:35
@bit-odoo bit-odoo closed this Apr 16, 2026
@bit-odoo bit-odoo reopened this Apr 16, 2026
@aykhu-odoo aykhu-odoo force-pushed the 19.0-tutorials-estate-aykhu branch from 26c6c8b to 92ab5a6 Compare April 20, 2026 08:35
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

Can you please update your pr description?

Thanks

Comment thread estate/models/estate_property.py Outdated
def action_property_sold(self):
for record in self:
if record.state == "cancelled":
raise UserError("Cancelled property cannot be set as sold.")
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It's good to make the error message translatable.
raise UserError(_("Cancelled property cannot be set as sold."))

Comment thread estate/models/estate_property.py Outdated
@api.depends('visit_ids')
def _compute_issue_count(self):
for record in self:
record.issue_count = len(record.issue_ids)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can you try it using read_group?

Comment thread estate/views/estate_property_views.xml Outdated
<field name="arch" type="xml">
<form>
<header>
<button name="action_rainbow_man" string="Sold" class="btn-primary" type="object" invisible="state != 'offer_accepted'"/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The name is not aligned with the string.

Comment thread estate/models/estate_property_offer.py Outdated

def action_accepted(self):
for offer in self.property_id.offer_ids:
if offer.status == "accepted":
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You already made the button invisible. No need for this condition.

<field name="property_type_id"/>
<field name="validity" width="100"/>
<field name="date_deadline"/>
<button name="action_accepted" type="object" string="Accept" icon="fa-check" invisible="status != False"/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
<button name="action_accepted" type="object" string="Accept" icon="fa-check" invisible="status != False"/>
<button name="action_offer_accepted" type="object" string="Accept" icon="fa-check" invisible="status != False"/>

<field name="validity" width="100"/>
<field name="date_deadline"/>
<button name="action_accepted" type="object" string="Accept" icon="fa-check" invisible="status != False"/>
<button name="action_refused" type="object" string="Refuse" icon="fa-times" invisible="status != False"/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
<button name="action_refused" type="object" string="Refuse" icon="fa-times" invisible="status != False"/>
<button name="action_offer_refused" type="object" string="Refuse" icon="fa-times" invisible="status != False"/>

Comment thread estate/views/estate_property_views.xml Outdated
Comment on lines +17 to +20
<field name="property_type_id"/>
<field name="property_tags_ids" widget="many2many_tags" options="{'color_field': 'color'}" width="300"/>
<field name="bedrooms"/>
<field name="living_area"/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No need to display too many fields. You can make these fields optional.

@aykhu-odoo aykhu-odoo force-pushed the 19.0-tutorials-estate-aykhu branch from 92ab5a6 to 27f6eb8 Compare April 27, 2026 06:07
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,
Tag is not proper for this commit 115d75c
Can you improve your all commit message - 52fa0f3, 15bd5fa , 99d70a3, 53c0bc3 , 115d75c , 9d1e10b

Thanks

Comment on lines +12 to +13
if (this.props.onincrement) {
this.props.onincrement();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

can you please enable linter -> ./addons/web/tooling/enable.sh

<TodoList/>
</div>
</t>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unneccary diff.

const ref = useRef(refName);

onMounted(() => {
ref.el.focus();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

same linting issue.


for record in self:
record.issue_count = data.get(record, 0)
# record.issue_count = len(record.issue_ids)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do not push commented code.

"The selling price cannot be lower than 90% of the expected price."
))

def action_property_sold(self):
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

for offer in property_id.offer_ids:
if current_price < offer.price:
raise UserError(_("Offer Price cannot be less than previous offer prices"))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unneccary space.

raise UserError(_("Offer Price cannot be less than previous offer prices"))

offers = super().create(vals_list)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unneccary space.

for offer in offers:
if offer.property_id.state == 'new':
offer.property_id.state = 'offer_received'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unneccary space.

- Implemented search view
- Added property types, tags, and offers models
- Linked properties with buyer, salesperson, types, tags, and offers
- Completed Ch 6 and Ch 7.
- Added Best Offer and Total Area fields in property form view
- Covers 2 tasks of chapter 8.
…nction

- Added Validity and date_deadline fields with inverse function
- Implemented onchange logic for garden_area and garden_orientation
- Suggested fixes implemented
- Covers last 2 tasks of chapter 8.
- Added sold and cancelled action buttons for state transition
- Prevent invalid transitions between 'sold' and 'cancelled' states
- Introduce Accept and Refuse buttons for property offers
- Assign buyer and selling price to property on acceptance
- Restrict multiple offers from being accepted for the same property
- Chapter 9 Completed.
- Ensure positive property and offer prices
- Ensure unique property tag and type names
- Chapter 10 task 1 completed.
- Adds constraint using float_compare, ignores zero selling price.
- Chapter 10 completed.
- Added inline list view for property types
- Implemented statusbar widget for property state
- Defined default ordering on models
- Added conditional visibility and readonly attributes
- Enhanced list views with decorations and optional fields
- Introduced stat button on property type to access related offers
- Added related field and computed offer count for property types
- Chapter 11 completed
- Extended CRUD methods for offer validation, state update
- Added constraints to prevent invalid operations (state and offer price check)
- Inherited res.users to add property_ids relation
- Implemented view inheritance to display properties in user form
- Completed chapter 12
- Integrated account module to create invoices from sold properties
- Reused account.move for financial operations
- Enhanced kanban view using QWeb templating
- Implemented conditional UI logic with t-if and raw values
- Chapter 13 and 14 completed.
- Added visit scheduling with list, form, and calendar views
- Added constraint to prevent overlapping visits within the same property
- Automatically create calendar events on visit creation
- Added issue reporting with list and form views
- Completed Group Tasks.
- Added chatter and activities
- Implemented logic to reject all other offers when one is accepted
- Added “Accept Best Offer” action to simplify offer selection
- Added rainbow animation when a property is marked as sold
- Display sold ribbon in form and kanban views
- Updated kanban default grouping to state and disabled record drag
- Made “Sold” and “Accept Best Offer” buttons conditional primary actions
…ard)

- Create Counter component with increment action
- Introduce TodoList component to manage todos
- Add dynamic todo creation
- Implement toggle functionality for todo completion
- Add conditional styling based on state
- Implement delete functionality for removing todos
- Refactor Card to use slots and add toggle-able content.
@aykhu-odoo aykhu-odoo force-pushed the 19.0-tutorials-estate-aykhu branch from 5de64f4 to 5fa3a74 Compare April 28, 2026 09:40
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