Skip to content

Commit a76b9fe

Browse files
committed
[IMP] estate: enrich the different views (list, form, and search) of the estate module.
The views created were basic one and need some custumization to be use in a business application. List view: the following fields have been added: Title, Postcode, bedrooms, Living Area (sqm), Expected Price, Selling Price, Available From Form view: It is now composed of groups and a notebook with a page description Search view: Search has now other predifened shorcuts (Title, Postcode, expectedPrice, Bedrooms, Living Area, Facades), a predefined filter "Available" (that looks for properties with the state New or Offer received) and a Group by filter on the postcodes
1 parent ab1280b commit a76b9fe

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

estate/views/estate_property_views.xml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,82 @@
11
<?xml version="1.0"?>
22
<odoo>
3+
<record id="estate_property_view_search" model="ir.ui.view">
4+
<field name="name">estate.property.search</field>
5+
<field name="model">estate.property</field>
6+
<field name="arch" type="xml">
7+
<search string="Search...">
8+
<field name="name" string="Title"/>
9+
<field name="postcode"/>
10+
<field name="expected_price"/>
11+
<field name="bedrooms"/>
12+
<field name="living_area" string="Living Area (sqm)"/>
13+
<field name="facades"/>
14+
<filter string="Available" name="filter_available" domain="['|',
15+
('state', '=', 'new'),
16+
('state', '=', 'offer_received')]"/>
17+
<filter string="Postcode" name="groupby_postcode" context="{'group_by': 'postcode'}"/>
18+
</search>
19+
</field>
20+
</record>
21+
22+
<record id="estate_property_view_form" model="ir.ui.view">
23+
<field name="name">estate.property.form</field>
24+
<field name="model">estate.property</field>
25+
<field name="arch" type="xml">
26+
<form string="Estate Property">
27+
<sheet>
28+
<h1><group>
29+
<field name="name" string="Title"/>
30+
</group></h1>
31+
32+
<group>
33+
<group>
34+
<field name="postcode"/>
35+
<field name="date_availability" string="Available From"/>
36+
</group>
37+
<group>
38+
<field name="expected_price"/>
39+
<field name="selling_price"/>
40+
</group>
41+
</group>
42+
<notebook>
43+
<page string="Description">
44+
<group>
45+
<field name="description"/>
46+
<field name="bedrooms"/>
47+
<field name="living_area" string="Living Area (sqm)"/>
48+
<field name="facades"/>
49+
<field name="garage"/>
50+
<field name="garden"/>
51+
<field name="garden_area"/>
52+
<field name="garden_orientation"/>
53+
<field name="state"/>
54+
</group>
55+
56+
</page>
57+
</notebook>
58+
</sheet>
59+
</form>
60+
</field>
61+
62+
</record>
63+
64+
<record id="estate_property_view_list" model="ir.ui.view">
65+
<field name="name">estate.property.list</field>
66+
<field name="model">estate.property</field>
67+
<field name="arch" type="xml">
68+
<list string="Estate property">
69+
<field name="name" string="Title"/>
70+
<field name="postcode"/>
71+
<field name="bedrooms"/>
72+
<field name="living_area" string="Living Area (sqm)"/>
73+
<field name="expected_price"/>
74+
<field name="selling_price"/>
75+
<field name="date_availability" string="Available From"/>
76+
</list>
77+
</field>
78+
</record>
79+
380
<record id="estate_property_action" model="ir.actions.act_window">
481
<field name="name">Properties</field>
582
<field name="res_model">estate.property</field>

0 commit comments

Comments
 (0)