-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
base: 18.0
Are you sure you want to change the base?
Conversation
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
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,
I have added some comments. Can you please have a look?
estate/__manifest__.py
Outdated
# -*- coding: utf-8 -*- | ||
# Part of Odoo. See LICENSE file for full copyright and licensing details. |
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 need for this now.
estate/__manifest__.py
Outdated
{ | ||
'name': 'Real Estate', | ||
'version': '1.0', | ||
'author': "Odoo IN", |
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.
'author': "Odoo IN
Why?
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.
Should I remove it or change it to another value?
estate/models/__init__.py
Outdated
from . import estate_property_type | ||
from . import estate_property_tag | ||
from . import estate_property_offer |
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.
Arrange in alphabetical order
estate/models/estate_property.py
Outdated
from odoo import models, fields, api | ||
from odoo.exceptions import UserError, ValidationError | ||
from odoo.tools.float_utils import float_compare, float_is_zero |
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.
Arrange in alphabetical order
estate/models/estate_property.py
Outdated
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)) |
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.
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> |
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.
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> |
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.
Same here. Give proper name
</field> | ||
</record> | ||
</odoo> | ||
|
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.
??
<br /> | ||
<br /> | ||
<br /> |
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.
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"> |
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.
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.") |
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.
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.
This estate module will store the real estate property-related information
including property listings, offers, and related functionalities.