Skip to content

[ADD] estate, estate_account: Introduce real estate management #841

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

Conversation

niyp-odoo
Copy link

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

This pull request introduces two new modules:

  1. estate: A custom module for managing real estate properties. It includes features such as property listings, offer management, tags, property types, user access controls, and various views (form, kanban, etc.). The module also provides demo data and PDF reports for properties and salespersons.

  2. estate_account: An extension module that links the estate module with Odoo's invoicing app. It automatically generates invoices when a property is sold, enabling seamless financial integration with the property sales workflow.

Both modules follow Odoo coding guidelines and include appropriate access rights, data models, constraints, and UI improvements.

@robodoo
Copy link

robodoo commented Jul 9, 2025

Pull request status dashboard

@niyp-odoo niyp-odoo force-pushed the 18.0-training-niyp branch from 1ee28cc to 1d80a90 Compare July 10, 2025 16:02
Copy link

@deso-odoo deso-odoo left a comment

Choose a reason for hiding this comment

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

Here is the review!

Some comments:

Follow commit message guidelines. This tool can be helpful.

  1. There are multiple commits that are not needed which are like fix errors, fix linting, etc. you should use commit amend and fix it in the original commit.
  2. Many commits includes changes that are not related to that specific commit, i.e, you change code that should instead be amended in the original commit itself, can you fix such issues.
  3. Can you have a look at linting in all your files. I see too many linting issues.

'installable': True,
'application': True,
'auto_install': False
}

Choose a reason for hiding this comment

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

Try to always add a EOL in each file so that when someone adds lines in the future, the last line of the previous devs is not in the diff. Also github shows a red marker for it.

Choose a reason for hiding this comment

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

Empty file created...

Comment on lines 8 to 27
name = fields.Char(required=True)
description = fields.Text()
postcode = fields.Char()
date_avaiblity = fields.Date()
expected_price = fields.Float(required=True)
selling_price = fields.Float()
bedrooms = fields.Integer()
living_area = fields.Integer()
facades = fields.Integer()
garage = fields.Boolean()
garden = fields.Boolean()
garden_area = fields.Integer()

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 1 to 2
from odoo import fields,models

from datetime import date
from dateutil.relativedelta import relativedelta

Choose a reason for hiding this comment

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

The imports should be

  1. External libraries (one per line sorted and split in python stdlib)
  2. Imports of odoo
  3. Imports from Odoo modules (rarely, and only if necessary)

Inside these 3 groups, the imported lines are alphabetically sorted. You can use RUFF to help you sort them.

Comment on lines 3 to 8
<record id="estate_property_action" model="ir.actions.act_window">
<field name="name">Properties</field>
<field name="res_model">estate.property</field>
<field name="view_mode">list,form</field>
</record>

Choose a reason for hiding this comment

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

Check for linting through out the file.

@@ -1,4 +1,4 @@
from odoo import fields,models
from odoo import fields,models,api

Choose a reason for hiding this comment

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

should be sorted alphabetically.

</record>

<record id = "estate_property_tag_tree" model="ir.ui.view">
<field name = "name">estate.property.tag.list</field>

Choose a reason for hiding this comment

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

Suggested change
<field name = "name">estate.property.tag.list</field>
<field name="name">estate.property.tag.list</field>

same applies for code below.

Comment on lines 14 to 13
<field name="context">{}</field>
<field name="domain">[('property_id.property_type_id', '=', active_id)]</field>

Choose a reason for hiding this comment

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

Can you specify me the use of this two lines?

Comment on lines 29 to 31
<record id = "estate_property_type_form" model = "ir.ui.view">
<field name = "name">estate.property.type.form</field>
<field name = "model">estate.property.type</field>
<field name = "arch" type="xml">

Choose a reason for hiding this comment

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

check for linting throughout the file.

'partner_id': property.buyer_id.id,
'move_type': 'out_invoice',
'invoice_line_ids': [
(0, 0, {

Choose a reason for hiding this comment

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

Can use Command.create({...}).

@niyp-odoo niyp-odoo force-pushed the 18.0-training-niyp branch 8 times, most recently from d020eb9 to e55461d Compare July 14, 2025 10:43
This commit introduces the new  estate module, designed to manage real estate
properties within the Odoo environment. It includes the creation of
property-related models, basic views, menus, and initial security access rights.
The module lays the foundation for further enhancements such as property
listings, offers, and tag management.
@niyp-odoo niyp-odoo force-pushed the 18.0-training-niyp branch from 527b780 to b2ac76c Compare July 16, 2025 07:53
niyp-odoo added 12 commits July 16, 2025 13:31
Added new fields to various models within the estate module to support extended
functionality and data capture. These additions improve the module’s ability to
store and manage detailed property-related information in alignment with
business requirements.
This commit adds test cases to validate the key workflows in the estate module,
including property creation, status transitions, and offer handling.These tests
ensure better coverage and help prevent regressions during future development.
Enhanced the user interface of the estate module by refining form views,
improving layout structure, and aligning elements for better usability. These
changes provide a cleaner and more intuitive experience for users managing
property-related data.
Implemented action methods to allow users to accept or refuse property offers
directly from the offer form view. These actions update the offer status
accordingly and enforce business rules related to property state transitions.
This enhancement improves the decision-making workflow and aligns with real
world offer handling processes.
Added SQL and Python constraints to ensure business rules such as preventing the
creation of properties with zero price. Also improved the user interface by
enhancing inline views for better data management and usability within related
models. These changes help enforce data integrity and provide a more intuitive
experience for users.
Enhanced the module by integrating it with Odoo's invoicing system. When a
property is marked as sold, a corresponding customer invoice is now
automatically created. This automation ensures accurate and timely financial
tracking of property sales, streamlining the workflow between property
management and accounting.
Refactored the estate module codebase to comply with Odoo's coding standards,
including naming conventions, field ordering, and XML formatting. Also resolved
warnings related to missing attributes, deprecated methods, and model
definitions to improve overall code quality and maintainability.
Configured security access rules in the estate module to control read, write,
create, and delete permissions for specific user groups. These changes ensure
that users can only perform actions appropriate to their roles, enhancing data
protection and compliance with access control standards.
Added proper access control for specific user groups to ensure that permissions
for creating, reading, writing, and deleting estate-related records are
appropriately enforced. Also included demo data to demonstration of the module's
features. These changes enhance both the security
and usability of the estate module during development and evaluation.
Introduced a Kanban view in the estate module to provide a more visual and
intuitive way of managing property records. The view displays key details such
as expected price, and selling price allowing users to track property progress
at a glance.
Implemented QWeb-based PDF report generation for estate properties and their
associated salespersons. These reports compile relevant details into a printable
format, making it easier to share or archive key information related to real
estate operations.
This commit adds test cases to validate the key workflows in the estate module,
including property creation, status transitions, and offer handling.These tests
ensure better coverage and help prevent regressions during future development.
@niyp-odoo niyp-odoo force-pushed the 18.0-training-niyp branch from b2ac76c to d87c362 Compare July 16, 2025 08:02
@niyp-odoo niyp-odoo changed the title [ADD] estate: Added Estate module [ADD] estate, estate_account: Introduce real estate management Jul 16, 2025
Introduced new Owl components in the awesome_owl module, including interactive
Cards, a dynamic TodoList with task management, and a reactive Counter. These
components demonstrate the usage of Owl's reactive framework and enhance the UI
with reusable and interactive widgets for frontend development in Odoo.
@niyp-odoo niyp-odoo force-pushed the 18.0-training-niyp branch from d87c362 to d272742 Compare July 18, 2025 04:59
Developed a custom dashboard module using OWL and JavaScript to display
key business metrics in a dynamic and user-friendly interface.
The dashboard integrates with backend models to show real-time data using
cards and charts.This module demonstrates how to build interactive dashboards
in Odoo using client-side rendering and custom components.
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