|
3 | 3 | <record id="action_estate_property" model="ir.actions.act_window"> |
4 | 4 | <field name="name">Properties</field> |
5 | 5 | <field name="res_model">estate.property</field> |
6 | | - <field name="view_mode">list,form</field> |
| 6 | + <field name="view_mode">list,form,kanban</field> |
7 | 7 | <field name="help" type="html"> |
8 | 8 | <p class="o_view_nocontent_smiling_face"> |
9 | 9 | Create a new property |
|
52 | 52 | </group> |
53 | 53 | </group> |
54 | 54 | <notebook> |
55 | | - <!-- <page string="Description"> |
56 | | - <field name="description" placeholder="Add property description..."/> |
57 | | - </page> --> |
58 | 55 | <page string="Details"> |
59 | 56 | <form> |
60 | 57 | <group> |
|
113 | 110 | </search> |
114 | 111 | </field> |
115 | 112 | </record> |
| 113 | + |
| 114 | + <record id="estate_property_kanban_view" model="ir.ui.view"> |
| 115 | + <field name="name">estate.property.kanban</field> |
| 116 | + <field name="model">estate.property</field> |
| 117 | + <field name="arch" type="xml"> |
| 118 | + <kanban default_group_by="property_type_id" records_draggable="False" groups_draggable="False"> |
| 119 | + <field name="name"/> |
| 120 | + <field name="expected_price"/> |
| 121 | + <field name="state"/> |
| 122 | + <field name="best_price"/> |
| 123 | + <field name="selling_price"/> |
| 124 | + <field name="tag_ids"/> |
| 125 | + <templates> |
| 126 | + <t t-name="card"> |
| 127 | + <div> |
| 128 | + <div> |
| 129 | + <field class="h2" name="name"/> |
| 130 | + </div> |
| 131 | + <div> |
| 132 | + Expected Price: <field name="expected_price"/> |
| 133 | + </div> |
| 134 | + <div> |
| 135 | + <p t-if="record.state.raw_value === 'offer_received'"> |
| 136 | + Best Price: <field name="best_price"/> |
| 137 | + </p> |
| 138 | + </div> |
| 139 | + <div> |
| 140 | + <p t-if="record.state.raw_value === 'sold'"> |
| 141 | + Selling Price: <field name="selling_price"/> |
| 142 | + </p> |
| 143 | + </div> |
| 144 | + <div> |
| 145 | + <field name="tag_ids"/> |
| 146 | + </div> |
| 147 | + </div> |
| 148 | + </t> |
| 149 | + </templates> |
| 150 | + </kanban> |
| 151 | + </field> |
| 152 | + </record> |
| 153 | + |
| 154 | + <record id="estate_property_action_kanban" model="ir.actions.act_window"> |
| 155 | + <field name="name">Properties(Kanban)</field> |
| 156 | + <field name="res_model">estate.property</field> |
| 157 | + <field name="view_mode">kanban,form</field> |
| 158 | + <field name="view_id" ref="estate_property_kanban_view"/> |
| 159 | + <field name="search_view_id" ref="estate_property_search_view"/> |
| 160 | + </record> |
116 | 161 | </odoo> |
0 commit comments