Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c408da5
[ADD] Estate: init
haall-odoo Nov 18, 2025
a946449
[IMP] estate: chapter 3
haall-odoo Nov 18, 2025
6deb7a6
[FIX] estate: CI PEP8 conformity for EoF
haall-odoo Nov 18, 2025
e429205
[FIX] estate: PEP8 conformity\nestate_property.py whitespace in blank…
haall-odoo Nov 18, 2025
ffb822c
[IMP] estate: Chapter 4
haall-odoo Nov 18, 2025
c71e880
[FIX] estate: fix whitespace in blank line
haall-odoo Nov 18, 2025
e01993f
[FIX] estate: license fix
haall-odoo Nov 18, 2025
de4a315
[IMP] estate: Chapter 5
haall-odoo Nov 18, 2025
de78e31
[IMP] Estate: Chapter 5 Sec 1
haall-odoo Nov 19, 2025
adb3316
[IMP] Estate: Chapter 6
haall-odoo Nov 19, 2025
e66dd36
[FIX] estate: review 1
haall-odoo Nov 19, 2025
55064b2
[FIX] estate: review fix 2 + chapter 7 part 1
haall-odoo Nov 19, 2025
218b8f0
[IMP] estate: chapter 7
haall-odoo Nov 19, 2025
ff73e1b
[FIX] estate: PEP8 fix
haall-odoo Nov 19, 2025
871dc8d
[IMP] estate: add computed field for total_area and best_price
haall-odoo Nov 19, 2025
6407935
[IMP] estate: chapter 8 reversed field
haall-odoo Nov 19, 2025
0b791ab
[FIX] gitignore: ignore vscode config
haall-odoo Nov 20, 2025
b5fc120
[IMP] estate: chapter 8
haall-odoo Nov 20, 2025
ac39bed
[FIX] estate: estate_property.py - EOL
haall-odoo Nov 20, 2025
ee8a1be
[IMP] estate: chapter 9
haall-odoo Nov 20, 2025
0faad12
[FIX] estate: chapter 9
haall-odoo Nov 20, 2025
be0cfdf
[IMP] estate: chapter 10
haall-odoo Nov 20, 2025
75b4558
[FIX] estate: inline comments spacing in estate_property_odder.py
haall-odoo Nov 20, 2025
d76827d
[FIX] estate: PEP8 correction estate_property_tag.py
haall-odoo Nov 20, 2025
88cd366
[FIX] estate: bypass constraint modification
haall-odoo Nov 20, 2025
70eb50e
[IMP] estate: add a ondelete decorator to reset the selling price
haall-odoo Nov 20, 2025
bcbe15d
[IMP] estate: chapter 11 part 1
haall-odoo Nov 20, 2025
73aacdc
[IMP] estate: chapter 11 part 2
haall-odoo Nov 20, 2025
5f60173
[FIX] estate: whitespace in blank line in estate_property.py
haall-odoo Nov 20, 2025
cd5b754
[IMP] estate: chapter 11 color picker part
haall-odoo Nov 20, 2025
c8cb661
[IMP] estate: chapter 11 part 3
haall-odoo Nov 21, 2025
6f106c1
[FIX] estate: PEP8 fix in estate_property_offer.py
haall-odoo Nov 21, 2025
3607166
[IMP] estate: chapter 11 end
haall-odoo Nov 21, 2025
09fdf45
[FIX] estate: estate.property.offer stored -> store
haall-odoo Nov 21, 2025
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: 1 addition & 0 deletions estate/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
16 changes: 16 additions & 0 deletions estate/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
'name': 'Estate',
'version': '0.0',
'depends': ['base'],
'author': 'haall-odoo',
'application': True,
'installable': True,
'category': '',
'description': '',
'license': 'GPL-3',
'data': [
'security/ir.model.access.csv',
'views/estate_property_views.xml',
'views/estate_menus.xml'
]
}
Empty file added estate/data/.gitkeep
Empty file.
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
35 changes: 35 additions & 0 deletions estate/models/estate_property.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import datetime as dt

from odoo import fields, models


class EstateProperty(models.Model):
_name = "estate.property"
_description = "An awesome estate module"

name = fields.Char(required=True)
description = fields.Text()
postcode = fields.Char()
date_availability = fields.Date(copy=False, default=dt.datetime.today() + dt.timedelta(days=90))
expected_price = fields.Float(required=True)
selling_price = fields.Float(readonly=True, copy=False)
bedrooms = fields.Integer(default=2)
living_area = fields.Integer()
facades = fields.Integer()
garage = fields.Boolean()
garden = fields.Boolean()
garden_area = fields.Integer()
garden_orientation = fields.Selection(
string='Orientation',
selection=[('north', 'North'), ('west', 'West'), ('south', 'South'), ('east', 'East')],
help="Choose the appropriate orientation of the garden"
)
active = fields.Boolean(default=True)
state = fields.Selection(
string="Estate status",
selection=[('new', 'New'), ('offer received', 'Offer Received'), ('offer accepted', 'Offer Accepted'), ('sold', 'Sold'), ('cancelled', 'Cancelled')],
help='This field explain the estate status.',
required=True,
copy=False,
default='new'
)
3 changes: 3 additions & 0 deletions estate/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink
access_estate_model,estate_property,model_estate_property,base.group_user,1,1,1,1
portal_access_estate_model,estate_property,model_estate_property,base.group_portal,1,0,0,0
8 changes: 8 additions & 0 deletions estate/views/estate_menus.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0"?>
<odoo>
<menuitem id="estate_menu_root" name="Estate">
<menuitem id="estate_first_level_menu" name="Advertisements">
<menuitem id="estate_model_menu_action" action="estate_model_action"/>
</menuitem>
</menuitem>
</odoo>
80 changes: 80 additions & 0 deletions estate/views/estate_property_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0"?>
<odoo>
<record id="estate_property_view_tree" model="ir.ui.view">
<field name="name">estate.property.name</field>
<field name="model">estate.property</field>
<field name="arch" type="xml">
<list string="Channel">
<field name="name" string="Title"/>
<field name="postcode"/>
<field name="bedrooms"/>
<field name="living_area" string="Living Area (sqm)"/>
<field name="expected_price"/>
<field name="selling_price"/>
<field name="date_availability" string="Available From"/>
</list>
</field>
</record>

<record id="estate_property_form_view" model="ir.ui.view">
<field name="name">estate.property.name</field>
<field name="model">estate.property</field>
<field name="arch" type="xml">
<form string="My new house">
<sheet>
<group>
<h1><field name="name" string="" placeholder="My new house"/></h1>
</group>
<group>
<group>
<field name="postcode" default="1000"/>
<field name="date_availability" string="Available From"/>
</group>
<group>
<field name="expected_price" default="150000"/>
<field name="selling_price"/>
</group>
</group>
<notebook>
<page string="Description">
<group>
<field name="description" help="When duplicated, status and date are not copied"/>
<field name="bedrooms" default="4"/>
<field name="living_area" string="Living Area (sqm)"/>
<field name="facades" default="4"/>
<field name="garage"/>
<field name="garden" default="True"/>
<field name="garden_area" string="Garden Area (sqm)"/>
<field name="garden_orientation"/>
</group>
</page>
</notebook>
</sheet>
</form>
</field>
</record>

<record id="estate_property_search_view" model="ir.ui.view">
<field name="name">estate.property.name</field>
<field name="model">estate.property</field>
<field name="arch" type="xml">
<search string="TestSearch">
<field name="name" string="Title"/>
<field name="postcode"/>
<field name="expected_price"/>
<field name="bedrooms"/>
<field name="living_area" string="Living Area (sqm)"/>
<field name="facades"/>
<separator/>
<filter name="Available" domain="['|', ('state', '=', 'new'), ('state', '=', 'offer received')]"/>
<filter name="Postcode" context="{'group_by': 'postcode'}"/>
</search>
</field>
</record>

<record id="estate_model_action" model="ir.actions.act_window">
<field name="name">Properties</field>
<field name="res_model">estate.property</field>
<field name="view_mode">list</field>
</record>
</odoo>