Skip to content

Commit dce7040

Browse files
committed
[IMP] estate: Chapter 5 - Some UI to play with
1 parent 4946956 commit dce7040

File tree

5 files changed

+31
-3
lines changed

5 files changed

+31
-3
lines changed

estate/__manifest__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
'installable': True,
1616
'data': [
1717
'data/ir.model.access.csv',
18-
'views/templates.xml',
18+
'views/estate_property_views.xml',
19+
'views/estate_menus.xml',
1920
],
2021
}

estate/models/estate_property.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from odoo import fields, models
22

33
class EstatePropertyModel(models.Model):
4-
_name = "estate_property"
4+
_name = "estate.property"
55
_description = "Real Estate property database"
66
name = fields.Char(required=True)
77
description = fields.Text()

estate/views/estate_menus.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<odoo>
3+
<data>
4+
<menuitem id="estate_menu_root" name="Real Estate"/>
5+
6+
<menuitem id="estate_first_level_menu" name="Advertisements" parent="estate_menu_root"/>
7+
8+
<menuitem id="estate_property_menu_action"
9+
action="estate_property_action"
10+
parent="estate_first_level_menu"/>
11+
</data>
12+
</odoo>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<odoo>
3+
<data>
4+
<record id="estate_property_action" model="ir.actions.act_window">
5+
<field name="name">Properties</field>
6+
<field name="res_model">estate.property</field>
7+
<field name="view_mode">list,form</field>
8+
<field name="help" type="html">
9+
<p class="o_view_nocontent_smiling_face">
10+
Create your first property advertisement!
11+
</p>
12+
</field>
13+
</record>
14+
</data>
15+
</odoo>

estate/views/templates.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<odoo>
22
<data>
3-
<template id="estate.example" name="Awesome T-Shirt thank you">
3+
<template id="awesome_owl.playground" name="Awesome T-Shirt thank you">
44
<html>
55
<head>
66
<link type="image/x-icon" rel="shortcut icon" href="/web/static/img/favicon.ico"/>

0 commit comments

Comments
 (0)