Skip to content

Commit 480524f

Browse files
committed
[IMP] estate: chapter 14 add kanban view
1 parent 0e04612 commit 480524f

1 file changed

Lines changed: 30 additions & 2 deletions

File tree

estate/views/estate_property_views.xml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
<record id="estate_property_action_view" model="ir.actions.act_window">
44
<field name="name">Properties</field>
55
<field name="res_model">estate.property</field>
6-
<field name="view_mode">list,form</field>
6+
<field name="view_mode">list,form,kanban</field>
77
<field name="context">{'search_default_available': True}</field>
88
</record>
9-
109
<record id="estate_property_view_list" model="ir.ui.view">
1110
<field name="name">estate.property.list</field>
1211
<field name="model">estate.property</field>
@@ -111,5 +110,34 @@
111110
</search>
112111
</field>
113112
</record>
113+
<record id="estate_property_view_kanban" model="ir.ui.view">
114+
<field name="name">estate.property.kanban</field>
115+
<field name="model">estate.property</field>
116+
<field name="arch" type="xml">
117+
<kanban string="Properties" default_group_by="property_type_id" groups_draggable="False" records_draggable="False">
118+
<template>
119+
<t t-name="card">
120+
<div>
121+
<field name="name" class="fw-bold fs-5"/>
122+
</div>
123+
<div>
124+
Expected Price :
125+
<field name="expected_price" string="Expected Price"/>
126+
</div>
127+
<div t-if="record.state.raw_value == 'offer_received'">
128+
Best Offer :
129+
<field name="best_offer"/>
130+
</div>
131+
<div t-if="record.state.raw_value == 'offer_accepted'">
132+
Selling Price :
133+
<field name="selling_price"/>
134+
</div>
135+
<field name="tag_ids"/>
136+
</t>
137+
</template>
138+
<field name="state"/>
139+
</kanban>
140+
</field>
141+
</record>
114142
</odoo>
115143

0 commit comments

Comments
 (0)