Skip to content

Commit 8470d17

Browse files
committed
[IMP] Estate:Fixed Issues and Completed Chapter-4
Fixed warnings and errors raised by the first push. Created security/ir.model.access.csv file in estate for defining access rights. Added the data in csv file and defined the csv file in manifest.
1 parent 88181a3 commit 8470d17

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

estate/__manifest__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
{'name': 'Real Estate', 'depends': ['base']}
1+
{
2+
'name': 'Real Estate',
3+
'author': 'soham',
4+
'license': 'LGPL-3',
5+
'depends': ['base'],
6+
'data': [
7+
'security/ir.model.access.csv',
8+
],
9+
'installable': True,
10+
'application': True,
11+
}

estate/models/estate_property.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
from odoo import fields, models
22

3+
34
class EstateProperty(models.Model):
45
_name = "estate.property"
5-
_description = "Real Estate Property" # Removes the terminal warning
6+
_description = "Real Estate Property"
67

7-
# Required fields (not null in database)
88
name = fields.Char(required=True)
99
expected_price = fields.Float(required=True)
10-
11-
# Basic fields
1210
description = fields.Text()
1311
postcode = fields.Char()
1412
date_availability = fields.Date()
@@ -19,10 +17,9 @@ class EstateProperty(models.Model):
1917
garage = fields.Boolean()
2018
garden = fields.Boolean()
2119
garden_area = fields.Integer()
22-
23-
# Selection field (Dropdown)
2420
garden_orientation = fields.Selection(
2521
string='Orientation',
2622
selection=[('north', 'North'), ('south', 'South'), ('east', 'East'), ('west', 'West')],
2723
help="The direction the garden faces."
28-
)
24+
25+
)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
2+
access_estate_property,access_estate_property,model_estate_property,base.group_user,1,1,1,1

0 commit comments

Comments
 (0)