Skip to content
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

[ADD] estate: manage real estate property selling #210

Draft
wants to merge 14 commits into
base: 18.0
Choose a base branch
from

Conversation

adip-odoo
Copy link

This estate module will store the real estate property-related information
including property listings, offers, and related functionalities.

This estate module will store the real estate property-related information.

It includes fields to capture essential data such as
the property's name, description, location (postcode), availability date, and
pricing details, including the expected and selling price.

Additionally, it tracks key features like the number of bedrooms,
living area size, and the number of facades. The module also provides options to
indicate if the property includes a garage or garden, with additional details
such as garden size and orientation (North, South, East, or West).
This update enhances the Estate module by implementing access control and
creating a user interface for managing properties.
A CSV file defining security access rights has been added to regulate
permissions for different user roles. Additionally, action and XML files have
been created to configure and display views for the estate. Property model.

These enhancements ensure that properties are both secure and easily manageable
through the module's interface, supporting seamless interaction while
maintaining data integrity.
Created list, form and search view.
Connected models(types, tags, offers) with estate property
Also, added compute and onchange functions for property model.
added compute and onchange methods to make some automation on fields.
added business logic using buttons on offers.
add SQL and python constrain to validate fields.
sql and pyton based constrains added on fields for value validation
nothing new.
remove unnecessary lines and spaces in code
repaire the files formate and name
add the designing sprinkles on attribute and fields
which tells how the value should be displayed and edited from the user side.
improve the views of form and list view of model
@robodoo
Copy link

robodoo commented Dec 17, 2024

Pull request status dashboard

Copy link

@aktr-odoo aktr-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. Can you please have a look?

Comment on lines 1 to 2
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.

Choose a reason for hiding this comment

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

No need for this now.

{
'name': 'Real Estate',
'version': '1.0',
'author': "Odoo IN",

Choose a reason for hiding this comment

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

'author': "Odoo IN
Why?

Copy link
Author

Choose a reason for hiding this comment

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

Should I remove it or change it to another value?

Comment on lines 2 to 4
from . import estate_property_type
from . import estate_property_tag
from . import estate_property_offer

Choose a reason for hiding this comment

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

Arrange in alphabetical order

Comment on lines 1 to 3
from odoo import models, fields, api
from odoo.exceptions import UserError, ValidationError
from odoo.tools.float_utils import float_compare, float_is_zero

Choose a reason for hiding this comment

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

Arrange in alphabetical order

name = fields.Char(required=True, string='Title', trim=True)
description = fields.Text()
postcode = fields.Char()
date_availability = fields.Date(string='Available From', copy=False, default=fields.Date.add(fields.Date.today(), months=3))

Choose a reason for hiding this comment

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

Try to use datetime

<?xml version='1.0' encoding='utf-8'?>
<odoo>
<record id="estate_property_offer_action" model="ir.actions.act_window">
<field name="name">Property Offers</field>

Choose a reason for hiding this comment

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

Give proper name

<?xml version='1.0' encoding='utf-8'?>
<odoo>
<record id="estate_property_tag_action" model="ir.actions.act_window">
<field name="name">Property Tags</field>

Choose a reason for hiding this comment

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

Same here. Give proper name

</field>
</record>
</odoo>

Choose a reason for hiding this comment

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

??

Comment on lines 43 to 45
<br />
<br />
<br />

Choose a reason for hiding this comment

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

Why <br /> ?

@@ -0,0 +1,59 @@
<?xml version='1.0' encoding='utf-8'?>
<odoo>
<record id="estate_property_type_action" model="ir.actions.act_window">

Choose a reason for hiding this comment

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

Action are defined after views

# vals returns the value in Integer but we need estate.property() object.
property_id = self.env['estate.property'].browse(vals['property_id'])
if property_id.offer_ids and any(offer.price >= vals['price'] for offer in property_id.offer_ids):
raise ValidationError("You cannot create an offer lower than an existing offer.")

Choose a reason for hiding this comment

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

Can't we do this in constraints?

add demo data which will load at the installation time of the module.
add the pdf report to get the detailed report of the property and
for the user.
user can see and modify assigned property but
manager can have access to all the properties.
This update adds a wizard model and its corresponding view to
streamline the process of creating offers on multiple properties simultaneously.
… setup

added feature which ensured only users belonging to the selected company are
displayed in the salesperson dropdown.
Configured implied_ids in the estate_group_manager group to inherit permissions
from the estate_group_user group, streamlining group hierarchy and
ensuring proper access control.
Implemented functionality to add warranty on the product directly in quotations.
Automatically includes warranty costs in the final order amount.
Ensures warranty lines are removed when the associated product
is removed from the order.
Enhances usability by dynamically linking warranties to
parent products in the sale order.
It helps in creating a budget for specific periods.
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