|
4 | 4 | <field name="name">Properties</field> |
5 | 5 | <field name="res_model">estate.property</field> |
6 | 6 | <field name="view_mode">list,form</field> |
| 7 | + <field name="context">{'search_default_available': True}</field> |
7 | 8 | </record> |
8 | 9 |
|
9 | 10 | <record id="estate_property_view_list" model="ir.ui.view"> |
10 | 11 | <field name="name">estate.property.list</field> |
11 | 12 | <field name="model">estate.property</field> |
12 | 13 | <field name="arch" type="xml"> |
13 | | - <list string="Channel"> |
| 14 | + <list string="Channel" decoration-success="offer_ids or buyer_id" decoration-bf="buyer_id" decoration-muted="state == 'cancelled'"> |
14 | 15 | <field name="name" string="Title"/> |
15 | 16 | <field name="postcode"/> |
| 17 | + <field name="tag_ids" string="Tags" widget="many2many_tags" options="{'color_field': 'color'}"/> |
16 | 18 | <field name="bedrooms"/> |
17 | 19 | <field name="living_area" string="Living Area (sqm)"/> |
18 | 20 | <field name="expected_price"/> |
19 | 21 | <field name="selling_price"/> |
20 | | - <field name="date_availability" string="Available From"/> |
| 22 | + <field name="date_availability" string="Available From" optional="hide"/> |
21 | 23 | </list> |
22 | 24 | </field> |
23 | 25 | </record> |
|
28 | 30 | <field name="arch" type="xml"> |
29 | 31 | <form string="Propreties"> |
30 | 32 | <header> |
31 | | - <button name="action_set_sold" string="Sold" type="object"/> |
32 | | - <button name="action_set_cancelled" string="Cancel" type="object"/> |
| 33 | + <button name="action_set_sold" string="Sold" type="object" invisible="state in ['sold', 'cancelled']"/> |
| 34 | + <button name="action_set_cancelled" string="Cancel" type="object" invisible="state in ['sold', 'cancelled']"/> |
| 35 | + <field name="state" widget="statusbar" statusbar_visible="new,received,accepted,sold"/> |
33 | 36 | </header> |
34 | 37 | <sheet> |
35 | 38 | <h1> |
|
39 | 42 | <group> |
40 | 43 | <field name="postcode"/> |
41 | 44 | <field name="date_availability"/> |
| 45 | + <field name="type_id" options="{'no_quick_create': true, 'no_create_edit': true}"/> |
42 | 46 | </group> |
43 | 47 | <group> |
44 | 48 | <field name="expected_price"/> |
|
55 | 59 | <field name="facades"/> |
56 | 60 | <field name="garage"/> |
57 | 61 | <field name="garden"/> |
58 | | - <field name="garden_area" string="Garden Area (sqm)"/> |
59 | | - <field name="garden_orientation"/> |
| 62 | + <field name="garden_area" string="Garden Area (sqm)" invisible="not garden"/> |
| 63 | + <field name="garden_orientation" invisible="not garden"/> |
60 | 64 | <field name="total_area" string="Total Area (sqm)"/> |
61 | | - <field name="tag_ids" widget="many2many_tags"/> |
| 65 | + <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': true}"/> |
62 | 66 | </group> |
63 | 67 | </page> |
64 | 68 | <page string="Offers"> |
65 | | - <field name="offer_ids"/> |
| 69 | + <field name="offer_ids" readonly="state in ['sold', 'cancelled', 'accepted']"/> |
66 | 70 | </page> |
67 | 71 | <page string="More Info"> |
68 | 72 | <group> |
|
85 | 89 | <field name="postcode"/> |
86 | 90 | <field name="expected_price"/> |
87 | 91 | <field name="bedrooms"/> |
88 | | - <field name="living_area" string="Living Area (sqm)"/> |
| 92 | + <field name="living_area" string="Living Area (sqm)" filter_domain="[('living_area', '>=', self)]"/> |
89 | 93 | <field name="facades"/> |
90 | 94 | <filter string="Available" name="available" domain="['|', ('state', '=', 'new'), ('state', '=', 'received')]"/> |
91 | 95 | <filter string="Postcode" name="postcode" context="{'group_by':'postcode'}"/> |
|
0 commit comments