diff --git a/.gitignore b/.gitignore
index b6e47617de1..736fa2fc3ce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -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.
diff --git a/awesome_dashboard/controllers/controllers.py b/awesome_dashboard/controllers/controllers.py
index 56d4a051287..05977d3bd7f 100644
--- a/awesome_dashboard/controllers/controllers.py
+++ b/awesome_dashboard/controllers/controllers.py
@@ -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:
diff --git a/awesome_owl/__manifest__.py b/awesome_owl/__manifest__.py
index e8ac1cda552..55002ab81de 100644
--- a/awesome_owl/__manifest__.py
+++ b/awesome_owl/__manifest__.py
@@ -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',
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..e0b57ac32a4
--- /dev/null
+++ b/estate/__manifest__.py
@@ -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",
+}
diff --git a/estate/models/__init__.py b/estate/models/__init__.py
new file mode 100644
index 00000000000..676dff40e94
--- /dev/null
+++ b/estate/models/__init__.py
@@ -0,0 +1 @@
+from . import (estate_property, estate_property_type, estate_property_tag, estate_property_offer)
diff --git a/estate/models/estate_property.py b/estate/models/estate_property.py
new file mode 100644
index 00000000000..518c739ea83
--- /dev/null
+++ b/estate/models/estate_property.py
@@ -0,0 +1,63 @@
+from odoo import fields, models, api
+
+
+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()
+ bedrooms = fields.Integer()
+ 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,
+ 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", default=0)
+
+ @api.depends('offer_ids')
+ def _compute_best_offer(self):
+ self.best_offer = max(self.offer_ids.mapped("price"))
diff --git a/estate/models/estate_property_offer.py b/estate/models/estate_property_offer.py
new file mode 100644
index 00000000000..2487d1bf909
--- /dev/null
+++ b/estate/models/estate_property_offer.py
@@ -0,0 +1,17 @@
+from odoo import fields, models
+
+
+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)
diff --git a/estate/models/estate_property_tag.py b/estate/models/estate_property_tag.py
new file mode 100644
index 00000000000..198c1037c41
--- /dev/null
+++ b/estate/models/estate_property_tag.py
@@ -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)
diff --git a/estate/models/estate_property_type.py b/estate/models/estate_property_type.py
new file mode 100644
index 00000000000..ced40ef01cc
--- /dev/null
+++ b/estate/models/estate_property_type.py
@@ -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)
diff --git a/estate/security/ir.model.access.csv b/estate/security/ir.model.access.csv
new file mode 100644
index 00000000000..fb35ae265bf
--- /dev/null
+++ b/estate/security/ir.model.access.csv
@@ -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
\ No newline at end of file
diff --git a/estate/views/estate_menus.xml b/estate/views/estate_menus.xml
new file mode 100644
index 00000000000..499c393921e
--- /dev/null
+++ b/estate/views/estate_menus.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/estate/views/estate_property.xml b/estate/views/estate_property.xml
new file mode 100644
index 00000000000..a94eb729f47
--- /dev/null
+++ b/estate/views/estate_property.xml
@@ -0,0 +1,116 @@
+
+
+
+ Properties
+ estate.property
+ list,form
+
+
+
+
+ estate.property.list
+ estate.property
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ estate.property.form
+ estate.property
+
+
+
+
+
+
+
+ estate.property.search
+ estate.property
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/estate/views/estate_property_offer.xml b/estate/views/estate_property_offer.xml
new file mode 100644
index 00000000000..658c842f534
--- /dev/null
+++ b/estate/views/estate_property_offer.xml
@@ -0,0 +1,31 @@
+
+
+
+
+ estate.property.offer.list
+ estate.property.offer
+
+
+
+
+
+
+
+
+
+
+ estate.property.offer.form
+ estate.property.offer
+
+
+
+
+
diff --git a/estate/views/estate_property_tag.xml b/estate/views/estate_property_tag.xml
new file mode 100644
index 00000000000..3d236893b1d
--- /dev/null
+++ b/estate/views/estate_property_tag.xml
@@ -0,0 +1,34 @@
+
+
+
+ Property Tag
+ estate.property.tag
+ list,form
+
+
+
+ estate.property.tag.list
+ estate.property.tag
+
+
+
+
+
+
+
+
+ estate.property.tag.form
+ estate.property.tag
+
+
+
+
+
diff --git a/estate/views/estate_property_type.xml b/estate/views/estate_property_type.xml
new file mode 100644
index 00000000000..020ae3a4e55
--- /dev/null
+++ b/estate/views/estate_property_type.xml
@@ -0,0 +1,32 @@
+
+
+
+ Properties Type
+ estate.property.type
+ list,form
+
+
+
+ estate.property.type.list
+ estate.property.type
+
+
+
+
+
+
+
+
+ estate.property.type.form
+ estate.property.type
+
+
+
+
+
diff --git a/website_airproof/__manifest__.py b/website_airproof/__manifest__.py
index f6cd9dc0d5e..2c2c62d6a18 100644
--- a/website_airproof/__manifest__.py
+++ b/website_airproof/__manifest__.py
@@ -7,6 +7,9 @@
'license': 'LGPL-3',
'depends': ['website_sale', 'website_sale_wishlist', 'website_blog', 'website_mass_mailing'],
'data': [
+ # Snippets
+ 'views/snippets/options.xml',
+ 'views/snippets/s_airproof_carousel.xml',
# Options
'data/presets.xml',
'data/website.xml',
@@ -24,9 +27,6 @@
'views/website_templates.xml',
'views/website_sale_templates.xml',
'views/website_sale_wishlist_templates.xml',
- # Snippets
- 'views/snippets/options.xml',
- 'views/snippets/s_airproof_carousel.xml',
# Images
'data/images.xml',
],