Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
91e246b
[FIX] website_airproof: fix template loading order issue
omarait-mlouk Sep 24, 2025
f6e9016
[FIX] awesome_owl: Fix missing css variables
clbr-odoo Nov 21, 2025
f18cc42
[FIX] awesome_dashboard: Get rid of the deprecated warning
clbr-odoo Nov 21, 2025
b80f298
[ADD] estate: initialize module for real estate application
karad-odoo Jul 2, 2026
1f97e5e
[CLN] estate: add manifest author and license details
karad-odoo Jul 3, 2026
e560927
[CLN] estate: clean up manifest configuration
karad-odoo Jul 3, 2026
0f6da14
[ADD] estate: create property data model
karad-odoo Jul 3, 2026
76106ec
[LINT] estate: apply standard code formatting
karad-odoo Jul 3, 2026
ac7022b
[ADD] estate: add user access rights for properties
karad-odoo Jul 3, 2026
c96f13d
[ADD] estate: add navigation menus and default record logic
karad-odoo Jul 6, 2026
da9b8e9
[CLN] tutorials: prevent committing personal IDE settings
karad-odoo Jul 6, 2026
041b7b0
[ADD] estate: add summary list view for property listings
karad-odoo Jul 7, 2026
0fed210
[FIX] estate: fix mismatched field names on property list view
karad-odoo Jul 8, 2026
64a0a9a
[ADD] estate: add structured form view for property details
karad-odoo Jul 8, 2026
57ac839
[ADD] estate: enable search bar functionality for properties
karad-odoo Jul 9, 2026
99b1b4f
[ADD] estate: add quick filters and location grouping
karad-odoo Jul 13, 2026
4729b95
[IMP] estate: prevent stale price copying on new records
karad-odoo Jul 13, 2026
cb0b27f
[IMP] estate: bump module version to trigger registry sync
karad-odoo Jul 13, 2026
20ab864
[FIX] estate: improve search usability and form field placement
karad-odoo Jul 14, 2026
62fb7a6
[REF] estate: separate menu declarations from view files
karad-odoo Jul 21, 2026
d69a6a7
[ADD] estate: add property type model for categorization
karad-odoo Jul 24, 2026
357c527
[ADD] estate: adding property types to allow property filtering
karad-odoo Jul 27, 2026
cff0e08
[ADD] estate: added property types to settings menu
karad-odoo Jul 28, 2026
6826887
[ADD] estate: add buyer and salesman fields to property form
karad-odoo Jul 30, 2026
33a10cf
[ADD] estate: add property tags using many2many relationship
karad-odoo Aug 6, 2026
44e0b2e
[ADD] estate: add user access rights for property tags
karad-odoo Aug 6, 2026
b0b8f29
[ADD] estate: added window action for property tags
karad-odoo Aug 7, 2026
e5b839a
[ADD] estate: Display property tags in Property list and form
karad-odoo Aug 7, 2026
3300726
[ADD] estate: added property offer model with one2many relationship
karad-odoo Aug 10, 2026
7444ac4
[ADD] estate: added property offers view in notebook tab
karad-odoo Aug 10, 2026
d9381b3
[ADD] estate: added computed total area field to property model
karad-odoo Aug 11, 2026
ea9f40a
[ADD] estate: added computed best offer field to property model
karad-odoo Aug 11, 2026
feeabb0
[IMP] estate: simplified best offer compute logic
karad-odoo Aug 11, 2026
794c8a3
[ADD] estate: added deadline date and validity fields with compute-in…
karad-odoo Aug 13, 2026
cf050cf
[ADD] estate: added onchange decorator for garden fields
karad-odoo Aug 14, 2026
37c1679
[ADD] estate: added object buttons for sold and cancel state transitions
karad-odoo Aug 17, 2026
820f2c5
[ADD] estate: added accept and refuse actions for property offers
karad-odoo Aug 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore

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.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
Expand Down
2 changes: 1 addition & 1 deletion awesome_dashboard/controllers/controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
logger = logging.getLogger(__name__)

class AwesomeDashboard(http.Controller):
@http.route('/awesome_dashboard/statistics', type='json', auth='user')
@http.route('/awesome_dashboard/statistics', type='jsonrpc', auth='user')
def get_statistics(self):
"""
Returns a dict of statistics about the orders:
Expand Down
2 changes: 2 additions & 0 deletions awesome_owl/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
'assets': {
'awesome_owl.assets_playground': [
('include', 'web._assets_helpers'),
('include', 'web._assets_backend_helpers'),
'web/static/src/scss/pre_variables.scss',
'web/static/lib/bootstrap/scss/_variables.scss',
'web/static/lib/bootstrap/scss/_maps.scss',
('include', 'web._assets_bootstrap'),
('include', 'web._assets_core'),
'web/static/src/libs/fontawesome/css/font-awesome.css',
Expand Down
1 change: 1 addition & 0 deletions estate/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions estate/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "Estate",
"version": "1.1",
"category": "",
"summary": "",
"website": "",
"application": True,
"installable": True,
"data": [
"security/ir.model.access.csv",
"views/estate_property_offer.xml",
"views/estate_property_tag.xml",
"views/estate_property_type.xml",
"views/estate_property.xml",
"views/estate_menus.xml",
],
"depends": ["base"],
"author": "Kaushal Radadiya",
"license": "LGPL-3",
}
1 change: 1 addition & 0 deletions estate/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import (estate_property, estate_property_type, estate_property_tag, estate_property_offer)
89 changes: 89 additions & 0 deletions estate/models/estate_property.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
from odoo import fields, models, api
from odoo.exceptions import UserError


class EstateModel(models.Model):
_name = "estate.property"
_description = "Real Estate Property"

name = fields.Char(required=True)
description = fields.Text()
postcode = fields.Char()
date_availability = fields.Date()
expected_price = fields.Float(required=True)
selling_price = fields.Float(readonly=True, copy=False)
bedrooms = fields.Integer(default=2)
living_area = fields.Integer(string="Living Area (sqm)")
facades = fields.Integer()
garage = fields.Boolean()
garden = fields.Boolean()
garden_area = fields.Integer(string="Garden Area (sqm)")

garden_orientation = fields.Selection(
selection=[
('north', "North"),
('south', "South"),
('east', "East"),
('west', "West"),
],
string="Garden Orientation"
)

state = fields.Selection(
selection=[
('new', "New"),
('offer_received', "Offer Received"),
('offer_accepted', "Offer Accepted"),
('sold', "Sold"),
('cancelled', "Cancelled"),
],
required=True,
readonly=True,
copy=False,
default="new",
string="Status"
)

active = fields.Boolean(default=True)
property_type_id = fields.Many2one("estate.property.type", string="Property Type")
salesman_id = fields.Many2one("res.users", string="Salesman", default=lambda self: self.env.user)
buyer_id = fields.Many2one("res.partner", string="Buyer", copy=False)
tag_id = fields.Many2many("estate.property.tag", string="Property Tag")
offer_ids = fields.One2many("estate.property.offer", "property_id")

total_area = fields.Integer(compute="_compute_total_area", string="Total Area (sqm)")

@api.depends('garden_area', 'living_area')
def _compute_total_area(self):
for record in self:
record.total_area = record.garden_area + record.living_area

best_offer = fields.Integer(compute="_compute_best_offer", string="Best Offer")

@api.depends('offer_ids')
def _compute_best_offer(self):
for record in self:
record.best_offer = max(record.offer_ids.mapped("price"), default=0)

@api.onchange('garden')
def _onchange_garden(self):
if self.garden:
self.garden_area = 10
self.garden_orientation = 'north'
else:
self.garden_area = 0
self.garden_orientation = ''

def set_sold(self):
if self.state == 'cancelled':
raise UserError("Cancelled Property cannot be Sold")
else:
self.state = 'sold'
return True

def set_cancelled(self):
if self.state == 'sold':
raise UserError("Sold Property cannot be Cancelled")
else:
self.state = 'cancelled'
return True
43 changes: 43 additions & 0 deletions estate/models/estate_property_offer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
from odoo import fields, models, api
from datetime import timedelta


class EstatePropertyOffer(models.Model):
_name = "estate.property.offer"
_description = "Real Estate Property Offer"

price = fields.Float()
status = fields.Selection(
selection=[
('accepted', "Accepted"),
('refused', "Refused"),
],
copy=False
)
partner_id = fields.Many2one("res.partner", required=True)
property_id = fields.Many2one("estate.property", required=True)

validity = fields.Integer(default=7)
date_deadline = fields.Date(compute="_compute_date_deadline", inverse="_inverse_date_deadline")

@api.depends('create_date', 'validity')
def _compute_date_deadline(self):
for record in self:
if record.create_date:
record.date_deadline = record.create_date.date() + timedelta(days=record.validity)
else:
record.date_deadline = fields.Date.today() + timedelta(days=record.validity)

def _inverse_date_deadline(self):
for record in self:
record.validity = (record.date_deadline - record.create_date.date()).days

def offer_accepted(self):
for record in self:
record.status = 'accepted'
return True

def offer_refused(self):
for record in self:
record.status = 'refused'
return True
8 changes: 8 additions & 0 deletions estate/models/estate_property_tag.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from odoo import fields, models


class EstatePropertyTag(models.Model):
_name = "estate.property.tag"
_description = "Real Estate Property Tag"

name = fields.Char(required=True)
8 changes: 8 additions & 0 deletions estate/models/estate_property_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from odoo import fields, models


class EstatePropertyType(models.Model):
_name = "estate.property.type"
_description = "Real Estate Property Type"

name = fields.Char(required=True)
5 changes: 5 additions & 0 deletions estate/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_estate_property,access_estate_property,model_estate_property,base.group_user,1,1,1,1
access_estate_property_type,estate.property.type,model_estate_property_type,base.group_user,1,1,1,1
access_estate_property_tag,estate.property.tag,model_estate_property_tag,base.group_user,1,1,1,1
access_estate_property_offer,estate.property.offer,model_estate_property_offer,base.group_user,1,1,1,1
36 changes: 36 additions & 0 deletions estate/views/estate_menus.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>

<!-- Top Menu-->
<menuitem id="estate_menu_root"
name="Real Estate"/>

<!-- Category Menu-->
<menuitem id="estate_first_level_menu"
name="Advertisements"
parent="estate_menu_root"/>

<!-- Properties Menu-->
<menuitem id="estate_property_menu_action"
name="Properties"
parent="estate_first_level_menu"
action="estate.estate_property_action"/>

<!-- Settings Menu-->
<menuitem id="estate_property_settings_menu"
name="Settings"
parent="estate_menu_root"/>

<!-- Property Type Menu-->
<menuitem id="estate_property_settings_type"
name="Property Types"
parent="estate_property_settings_menu"
action="estate.estate_property_type_actions"/>

<!-- Property Tag Menu-->
<menuitem id="estate_property_settings_tag"
name="Property Tags"
parent="estate_property_settings_menu"
action="estate.estate_property_tag_actions"/>

</odoo>
115 changes: 115 additions & 0 deletions estate/views/estate_property.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<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>

<!-- List View-->
<record id="estate_property_view_list" model="ir.ui.view">
<field name="name">estate.property.list</field>
<field name="model">estate.property</field>
<field name="arch" type="xml">
<list string="Properties">
<field name='name' string="Name"/>
<field name='tag_id' widget='many2many_tags'/>
<field name='postcode' string="Postcode"/>
<field name='bedrooms' string="Bedrooms"/>
<field name='living_area'/>
<field name='garden_area'/>
<field name='total_area'/>
<field name='expected_price' string="Expected Price"/>
<field name='best_offer'/>
<field name='selling_price' string="Selling Price"/>
<field name='date_availability' string="Available From"/>
<field name='state' string="State"/>
</list>
</field>
</record>

<!-- Form View-->
<record id="estate_property_view_form" model="ir.ui.view">
<field name="name">estate.property.form</field>
<field name="model">estate.property</field>
<field name="arch" type="xml">
<form string="Property">
<sheet>
<header>
<button name="set_sold" type="object" class="oe_highlight" string="Sold"/>
<button name="set_cancelled" type="object" string="Cancel"/>
</header>
<div>
<h2>
<field name="name" placeholder="Enter Property Name"/>
</h2>
</div>
<h6>
<field name='tag_id' widget='many2many_tags' placeholder="Enter Tags"/>
</h6>

<group>
<group>
<field name="state"/>
<field name="property_type_id"/>
<field name="postcode"/>
<field name="date_availability"/>
</group>
<group>
<field name="expected_price"/>
<field name="selling_price"/>
<field name="best_offer"/>
</group>
</group>
<notebook>
<page string="Description">
<group>
<field name="description"/>
<field name="bedrooms"/>
<field name="facades"/>
<field name="garage"/>
<field name="garden"/>
<field name="living_area"/>
<field name="garden_area" readonly="not garden"/>
<field name="total_area"/>
<field name="garden_orientation" readonly="not garden"/>
</group>
</page>
<page string="Offers">
<field name="offer_ids"/>
</page>
<page string="Other Info">
<group>
<group>
<field name="salesman_id"/>
<field name="buyer_id"/>
</group>
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>

<!-- Search Filter-->
<record id="estate_property_view_search" model="ir.ui.view">
<field name="name">estate.property.search</field>
<field name="model">estate.property</field>
<field name="arch" type="xml">
<search>
<field name="name"/>
<field name="postcode"/>
<field name="expected_price"/>
<field name="bedrooms"/>
<field name="living_area"/>
<field name="facades"/>

<filter name="filter_available" string="Available"
domain="['|', ('state', '=', 'new'), ('state', '=', 'offer_received')]"/>
<filter name="group_by_postcode" string="Postcode" context="{'group_by': 'postcode'}"/>

</search>
</field>
</record>
</odoo>
Loading