Skip to content

Commit 302bf58

Browse files
author
Martin Doyen
committed
[IMP] estate: property kanban view
1 parent da40c46 commit 302bf58

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

estate/views/estate_property_views.xml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,38 @@
9494
</field>
9595
</record>
9696

97-
97+
<record id="estate_property_view_kanban" model="ir.ui.view">
98+
<field name="name">estate.property.view.kanban</field>
99+
<field name="model">estate.property</field>
100+
<field name="arch" type="xml">
101+
<kanban string="Properties" default_group_by="property_type_id" records_draggable="False">
102+
<field name="state"/>
103+
<templates>
104+
<t t-name="card">
105+
<field name="name" class="fw-bold fs-5"/>
106+
<field name="property_tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/>
107+
<div>
108+
Expected Price:
109+
<field name="expected_price"/>
110+
</div>
111+
<div t-if="record.state.raw_value == 'offer_received'">
112+
Best Offer:
113+
<field name="best_offer"/>
114+
</div>
115+
<div t-if="record.state.raw_value == 'offer_accepted'">
116+
Selling Price:
117+
<field name="selling_price"/>
118+
</div>
119+
</t>
120+
</templates>
121+
</kanban>
122+
</field>
123+
</record>
98124

99125
<record id="estate_property_action" model="ir.actions.act_window">
100126
<field name="name">Properties</field>
101127
<field name="res_model">estate.property</field>
102-
<field name="view_mode">list,form</field>
128+
<field name="view_mode">list,form,kanban</field>
103129
<field name="context">{'search_default_available': True}</field>
104130
</record>
105131
</odoo>

0 commit comments

Comments
 (0)