diff --git a/awesome_dashboard/__manifest__.py b/awesome_dashboard/__manifest__.py
index a1cd72893d7..c24c020c649 100644
--- a/awesome_dashboard/__manifest__.py
+++ b/awesome_dashboard/__manifest__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
{
- 'name': "Awesome Dashboard",
+ 'name': "Awesome Dashboard1",
'summary': """
Starting module for "Discover the JS framework, chapter 2: Build a dashboard"
diff --git a/estate/__init__.py b/estate/__init__.py
new file mode 100644
index 00000000000..0650744f6bc
--- /dev/null
+++ b/estate/__init__.py
@@ -0,0 +1 @@
+from . import models
diff --git a/estate/__manifest__.py b/estate/__manifest__.py
new file mode 100644
index 00000000000..b143fd69227
--- /dev/null
+++ b/estate/__manifest__.py
@@ -0,0 +1,20 @@
+{
+ "name": "real estate",
+ "author": "Lokesh",
+ "version": "1.0.0",
+ "license": "LGPL-3",
+ # "depends": ["base"],
+ "application": True,
+ "installable": True,
+ "data": [
+ "security/ir.model.access.csv",
+ "views/estate_property_views.xml", # the order should be like this, first we need to define the views and then we need to define the action and then the menu if the order is not maintained then error will be thrown.
+ "views/estate_property_type_view.xml",
+ "views/estate_property_menu.xml",
+ ],
+ "assets": {
+ "web.assets_backend": [
+ "estate/static/src/estate.css",
+ ],
+ },
+}
diff --git a/estate/models/__init__.py b/estate/models/__init__.py
new file mode 100644
index 00000000000..d94b9f7ac63
--- /dev/null
+++ b/estate/models/__init__.py
@@ -0,0 +1,6 @@
+from . import (
+ estate_property,
+ estate_property_offers,
+ estate_property_tag,
+ estate_property_type,
+)
diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py
new file mode 100644
index 00000000000..94625fc86e8
--- /dev/null
+++ b/estate/models/estate_property.py
@@ -0,0 +1,55 @@
+from datetime import datetime
+
+from odoo import fields, models
+
+
+class TestModel(models.Model):
+ 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)
+
+ _name = "estate.property"
+ _description = "This is a dummy table"
+
+ name = fields.Char(translate=True, default="Unknown", required=True)
+ description = fields.Text()
+ postcode = fields.Char()
+ date_availability = fields.Date(copy=False, default=three_month_date.date())
+ expected_price = fields.Float(required=True)
+ selling_price = fields.Float(readonly=True, copy=False)
+ bedrooms = fields.Integer()
+ living_area = fields.Integer()
+ facades = fields.Integer()
+ garage = fields.Boolean()
+ garden = fields.Boolean()
+ garden_area = fields.Integer()
+ garden_orientation = fields.Selection(
+ [
+ ("north", "North"),
+ ("south", "South"),
+ ("east", "East"),
+ ("west", "West"),
+ ],
+ string="Direction",
+ default="north",
+ )
+ active = fields.Boolean("Active", default=True)
+ property_type_id = fields.Many2one("estate.property.type", string="Property_type")
+ property_tag_ids = fields.Many2many(
+ "estate.property.tag",
+ string="Property_Tag",
+ )
+
+ buyer = fields.Many2one("res.partner", string="buyer", copy=False)
+ user_id = fields.Many2one(
+ "res.users", string="salesperson", default=lambda self: self.env.user
+ )
+ offer_ids = fields.One2many("estate.property.offers", "property_id")
diff --git a/estate/models/estate_property_offers.py b/estate/models/estate_property_offers.py
new file mode 100644
index 00000000000..954d6a2de68
--- /dev/null
+++ b/estate/models/estate_property_offers.py
@@ -0,0 +1,11 @@
+from odoo import fields, models
+
+
+class PropertyOffer(models.Model):
+ _name = "estate.property.offers"
+ _description = "this model is used to define the offers received to the property"
+
+ price = fields.Float()
+ status = fields.Selection([("accepted", "Accepted"), ("refused", "Refused")])
+ partner_id = fields.Many2one("res.partner", required=True)
+ property_id = fields.Many2one("estate.property", required=True)
diff --git a/estate/models/estate_property_tag.py b/estate/models/estate_property_tag.py
new file mode 100644
index 00000000000..0eb50006c3d
--- /dev/null
+++ b/estate/models/estate_property_tag.py
@@ -0,0 +1,8 @@
+from odoo import fields, models
+
+
+class PropertyTag(models.Model):
+ _name = "estate.property.tag"
+ _description = "this model is used to define tags to the properties"
+
+ name = fields.Char(string="Tags")
diff --git a/estate/models/estate_property_type.py b/estate/models/estate_property_type.py
new file mode 100644
index 00000000000..e751128b841
--- /dev/null
+++ b/estate/models/estate_property_type.py
@@ -0,0 +1,9 @@
+from odoo import fields, models
+
+
+class PropertyType(models.Model):
+ _name = "estate.property.type"
+ _description = "this is used to define the types"
+
+ name = fields.Char(required=True, string="Type")
+ tags = fields.Char(string="tags")
diff --git a/estate/security/ir.model.access.csv b/estate/security/ir.model.access.csv
new file mode 100644
index 00000000000..a6013d437c5
--- /dev/null
+++ b/estate/security/ir.model.access.csv
@@ -0,0 +1,6 @@
+id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
+access_estate_property_user1,estate.property.user,model_estate_property,base.group_user,1,0,0,0
+access_estate_property_user,estate.property.user,model_estate_property,base.group_system,1,1,1,1
+access_estate_property_type_user,estate.property.type.user,model_estate_property_type,base.group_user,1,1,1,1
+access_estate_property_tag_user,estate.property.tag.user,model_estate_property_tag,base.group_user,1,1,1,1
+access_estate_property_offer_user,estate.property.offer.user,model_estate_property_offers,base.group_user,1,1,1,1
diff --git a/estate/static/src/estate.css b/estate/static/src/estate.css
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/estate/views/estate_property_menu.xml b/estate/views/estate_property_menu.xml
new file mode 100644
index 00000000000..4d13f8652f2
--- /dev/null
+++ b/estate/views/estate_property_menu.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
diff --git a/estate/views/estate_property_type_view.xml b/estate/views/estate_property_type_view.xml
new file mode 100644
index 00000000000..edc5aea3c87
--- /dev/null
+++ b/estate/views/estate_property_type_view.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ estate.property.type
+
+
+
+
+
+
+
+ Property Type
+ estate.property.type
+ list,form
+
+
diff --git a/estate/views/estate_property_views.xml b/estate/views/estate_property_views.xml
new file mode 100644
index 00000000000..8d1623e40fb
--- /dev/null
+++ b/estate/views/estate_property_views.xml
@@ -0,0 +1,99 @@
+
+
+
+ estate.property
+
+
+
+
+
+
+ estate property search view
+ estate.property
+
+
+
+
+
+
+
+
+
+
+ estate property views
+ estate.property
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Property
+ estate.property
+ list,form
+
+