[LOSBO] Real Estate Property Management - Tutorials - #1407
Draft
losbo-odoo wants to merge 8 commits into
Draft
Conversation
[IMP] estate: added spcaes after comma in estate_property.py file
[IMP] estate: added a modal and fixed the working
…table (estate_property and estate_property_type) using Many2one
Differentiating the properties using tags, types along with tracking the offers received for each property, will streamline property manangement - introduced new models - 'estate.property.tags' : Labeling the properties - 'estate.proerty.types' : Categorizes properties - 'estate.property.offers' : track the buyer offers, prices and offer statuses - linked new models to 'estate.proerty.py' - Many2many relation to 'estate.property.tags' - Many2one relation to 'estate.property.types' - One2many realtion to 'estate.property.offers' - Updated UI views - Added estate_property_type_view.xml to manage property types. - Updated estate_property.xml to render type, tags and inline offer list tab
… and functions
I have added the available filter to allow users to isolate open properties, and i have added computed fields to dynamically calculate the fields
as i have added the relation between models it is necessary to add the ondelete attribute to handle the removed or unnecessary properties
1. Property Availabilty & filtering:
- Added 'state' field to 'estate.property' to track the lifecycle of a listing
- updated 'estate_property_views' to include the available filter, allowing users to isolate properties open for offer
2. Computed fields:
- Implemented computed fields ('total_offers', 'total_area', 'best_price') along with their respective computed functions
3. Database Integrity:
- Added `ondelete='cascade'` to the 'property_tag_ids' (Many2many relation) in 'estate_property.py' model and to the 'property_id' (Many2many relation) in 'estate_property_offers'
bit-odoo
reviewed
Sep 10, 2026
| # -*- coding: utf-8 -*- | ||
| { | ||
| 'name': "Awesome Dashboard", | ||
| 'name': "Awesome Dashboard1", |
There was a problem hiding this comment.
Can you please import it as per Odoo standard?
| "res.users", string="salesperson", default=lambda self: self.env.user | ||
| ) | ||
| offer_ids = fields.One2many("estate.property.offers", "property_id") | ||
|
|
| offer_ids = fields.One2many("estate.property.offers", "property_id") | ||
|
|
||
| total_offers = fields.Integer(compute="_compute_offers") | ||
|
|
| from odoo.exceptions import ValidationError | ||
|
|
||
|
|
||
| class TestModel(models.Model): |
Comment on lines
+8
to
+18
| today = datetime.now() | ||
|
|
||
| month = today.month + 3 | ||
| year = today.year | ||
| day = today.day | ||
|
|
||
| if month > 12: | ||
| year = year + 1 | ||
| month = month % 12 | ||
|
|
||
| three_month_date = today.replace(year=year, month=month, day=day) |
There was a problem hiding this comment.
Can you explain me the purpose of this?
| count = 0 | ||
| if record.offer_ids: | ||
| for offers in record.offer_ids: | ||
| if offers.status == "accepted": |
| <field name="property_tag_ids" widget="many2many_tags"/> | ||
| </div> | ||
| <group> | ||
| <group string="Pricing & Availability"> |
| <field name="total_offers"/> | ||
| <field name="state"/> | ||
| </group> | ||
| <group string="Property Specs"> |
| ] | ||
| ) | ||
| active = fields.Boolean("Active", default=True) | ||
| property_type_id = fields.Many2one("estate.property.type", string="Property_type") |
There was a problem hiding this comment.
Suggested change
| property_type_id = fields.Many2one("estate.property.type", string="Property_type") | |
| property_type_id = fields.Many2one("estate.property.type", string="Property type") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Implementation of the estate tutorial module covering initial module setup, security access, and property models: