Skip to content

Commit 8d26a6b

Browse files
committed
[IMP] estate: add customized kanban view to property
1 parent 8ff4802 commit 8d26a6b

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

estate/views/estate_property_views.xml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,38 @@
8282
</field>
8383
</record>
8484

85+
<record id="estate_property_view_kanban" model="ir.ui.view">
86+
<field name="name">estate.property.kanban</field>
87+
<field name="model">estate.property</field>
88+
<field name="arch" type="xml">
89+
<kanban default_group_by="property_type_id" records_draggable="False">
90+
<templates>
91+
<t t-name="card">
92+
<div class="d-flex">
93+
<field name="name" class="fw-bold fs-5 mb-1"/>
94+
</div>
95+
<div>
96+
Expected Price:
97+
<field name="expected_price"/>
98+
</div>
99+
<div t-if="record.state == 'offer_received'">
100+
Best Offer:
101+
<field name="best_offer"/>
102+
</div>
103+
<div t-if="record.state == 'offer_accepted'">
104+
Selling Price:
105+
<field name="selling_price"/>
106+
</div>
107+
<footer class="pt-0">
108+
<field name="tag_ids" widget="many2many_tags"/>
109+
</footer>
110+
111+
</t>
112+
</templates>
113+
</kanban>
114+
</field>
115+
</record>
116+
85117
<record id="estate_property_search" model="ir.ui.view">
86118
<field name="name">estate.property.search</field>
87119
<field name="model">estate.property</field>
@@ -107,7 +139,7 @@
107139
<record id="estate_property_model_action" model="ir.actions.act_window">
108140
<field name="name">Properties</field>
109141
<field name="res_model">estate.property</field>
110-
<field name="view_mode">list,form</field>
142+
<field name="view_mode">kanban,list,form</field>
111143
<field name="context">{'search_default_available': True}</field>
112144
</record>
113145
</odoo>

0 commit comments

Comments
 (0)