Skip to content

Commit c47b738

Browse files
committed
[ADD] access rights
1 parent c8f3257 commit c47b738

File tree

4 files changed

+27
-2
lines changed

4 files changed

+27
-2
lines changed

.vscode/launch.json

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Restart Server",
9+
"type": "debugpy",
10+
"request": "launch",
11+
"program": "/home/odoo/odoo_firsttest/odoo18/odoo-bin",
12+
"args": ["--addons-path=/home/odoo/odoo_firsttest/odoo18/addons/,/home/odoo/odoo_firsttest/enterprise/,/home/odoo/odoo_firsttest/tutorials",
13+
"-d",
14+
"rd-demo",
15+
"-u",
16+
"estate"
17+
],
18+
"console": "integratedTerminal"
19+
}
20+
]
21+
}

estate/__manifest__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
'name': "Awesome Estate",
33
'depends': ['base'],
44
'installable': True,
5-
'application': True
5+
'application': True,
6+
'data':['security/ir.model.access.csv']
67
}

estate/models/estate_property.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ class EstateProperty(models.Model):
1818
garage = fields.Boolean()
1919
garden = fields.Boolean()
2020
garden_area = fields.Integer()
21-
garden_orientation = fields.Selection([('north','North'), ('south','South'), ('east', 'East'), ('west', 'West')], string = 'Garden Orientation')
21+
garden_orientation = fields.Selection([('north','North'), ('south','South'), ('east', 'East'), ('west', 'West')], string = 'Garden Orientation')
22+

estate/security/ir.model.access.csv

+2
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+
estate.access_estate_property,access_estate_property,estate.model_estate_property,base.group_user,1,0,0,0

0 commit comments

Comments
 (0)