Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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 real_estate/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
14 changes: 14 additions & 0 deletions real_estate/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "real_estate",
"version": "1.0",
"depends": ["base"],
"category": "tutorials",
"author": "prcha-odoo",
"license": "LGPL-3",
"description": "A real estate module",
"installable": True,
"application": True,
"data": [
"security/ir.model.access.csv",
],
}
2 changes: 2 additions & 0 deletions real_estate/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import estate_property

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Should be only one empty line at the end of the file.

31 changes: 31 additions & 0 deletions real_estate/models/estate_property.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from odoo import fields, models


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

name = fields.Char(string="Property Name")
description = fields.Text(string="Description")
postcode = fields.Char(string="Postal Code")
date_availability = fields.Date(
string="Available From", default=lambda self: fields.Date.today()
)
expected_price = fields.Float(string="Expected Price", required=True)
selling_price = fields.Float(string="Selling Price", required=True)
bedrooms = fields.Integer(string="Bedroom Count")
living_area = fields.Integer(string="Living Area Count")
facades = fields.Integer(string="Facades Count")
has_garage = fields.Boolean(string="Has any Garage ?")
has_garden = fields.Boolean(string="Has any Garden ?")
garden_area = fields.Integer(string="Garden Area in (sq meter)")
garden_orientation = fields.Selection(
string="Garden Orientation",
selection=[
("north", "North"),
("south", "South"),
("east", "East"),
("west", "West"),
],
)
active = fields.Boolean(string="Field Activity Status", default=True)
2 changes: 2 additions & 0 deletions real_estate/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
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
Binary file added real_estate/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.