Skip to content

Commit ea78790

Browse files
committed
[IMP] estate: Added Kanban view
1 parent e810c33 commit ea78790

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

estate/views/estate_property_views.xml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<record id="estate_property_action" model="ir.actions.act_window">
55
<field name="name">Properties</field>
66
<field name="res_model">estate.property</field>
7-
<field name="view_mode">tree,form</field>
7+
<field name="view_mode">tree,form,kanban</field>
88
<field name="context">{'search_default_available': True}</field>
99
</record>
1010

@@ -115,4 +115,35 @@
115115
</field>
116116
</record>
117117

118+
<record id="estate_property_view_kanban" model="ir.ui.view">
119+
<field name="name">estate.property.kanban</field>
120+
<field name="model">estate.property</field>
121+
<field name="arch" type="xml">
122+
<kanban default_group_by="state">
123+
<field name="state"/>
124+
<templates>
125+
<t t-name="kanban-box">
126+
<div class="oe_kanban_global_click">
127+
<strong class="o_kanban_record_title">
128+
<field name="name"/>
129+
</strong>
130+
<div>
131+
Expected price: <field name="expected_price"/>
132+
</div>
133+
<div t-if="record.state.value">
134+
<div t-if="record.state.raw_value == 'offer_received' or record.state.raw_value == 'sold'">
135+
Best price: <field name="best_price"/>
136+
</div>
137+
<div t-if="record.state.raw_value == 'offer_accepted' or record.state.raw_value == 'sold'">
138+
Selling price: <field name="selling_price"/>
139+
</div>
140+
</div>
141+
<field name="tag_ids" options="{'color_field': 'color'}"/>
142+
</div>
143+
</t>
144+
</templates>
145+
</kanban>
146+
</field>
147+
</record>
148+
118149
</odoo>

0 commit comments

Comments
 (0)