|
3 | 3 | <record id="estate_property_action" 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="context">{'search_default_available': True}</field> |
8 | 8 | </record> |
9 | 9 |
|
|
100 | 100 | <filter string="Postcode" name="group_by_postcode" context="{'group_by':'postcode'}"/> |
101 | 101 | </group> |
102 | 102 | </search> |
| 103 | + </field> |
| 104 | + </record> |
103 | 105 |
|
104 | | - |
| 106 | + <record id="estate_property_view_kanban" model="ir.ui.view"> |
| 107 | + <field name="name">estate.properties.view.kanban</field> |
| 108 | + <field name="model">estate.property</field> |
| 109 | + <field name="arch" type="xml"> |
| 110 | + <kanban default_group_by="state" group_create="false" groups_draggable="False" records_draggable="False"> |
| 111 | + <field name="tag_ids"/> |
| 112 | + <field name="state"/> |
| 113 | + <templates> |
| 114 | + <t t-name="card"> |
| 115 | + <div class="oe_kanban_global_click"> |
| 116 | + <div> |
| 117 | + <h2> |
| 118 | + <field name="name"/> |
| 119 | + </h2> |
| 120 | + </div> |
| 121 | + <div> |
| 122 | + <span>Expected price :</span> |
| 123 | + <field name="expected_price"/> |
| 124 | + </div> |
| 125 | + <div t-if="record.state.raw_value === 'offer_received'"> |
| 126 | + <span>Best price :</span> |
| 127 | + <field name="best_price"/> |
| 128 | + </div> |
| 129 | + <div t-if="record.state.raw_value === 'offer_accepted'"> |
| 130 | + <span>Selling price :</span> |
| 131 | + <field name="selling_price"/> |
| 132 | + </div> |
| 133 | + <div class="oe_kanban_tags"> |
| 134 | + <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/> |
| 135 | + </div> |
| 136 | + </div> |
| 137 | + </t> |
| 138 | + </templates> |
| 139 | + </kanban> |
105 | 140 | </field> |
106 | 141 | </record> |
107 | 142 |
|
| 143 | + |
| 144 | + |
108 | 145 | </odoo> |
0 commit comments