|
10 | 10 | <field name="postcode" /> |
11 | 11 | <field name="expected_price" /> |
12 | 12 | <field name="bedrooms" /> |
13 | | - <field name="living_area" /> |
| 13 | + <field name="living_area" filter_domain="[('living_area', '>=', self)]" /> |
14 | 14 | <field name="facades" /> |
15 | 15 | <separator /> |
16 | 16 | <filter string="Available properties" name="available_properties" |
|
27 | 27 | <field name="arch" type="xml"> |
28 | 28 | <form string="Estate Property"> |
29 | 29 | <header> |
30 | | - <button name="action_sold_property" type="object" string="Sold" /> |
31 | | - <button name="action_cancel_property" type="object" string="Cancel" /> |
| 30 | + <button name="action_sold_property" type="object" string="Sold" |
| 31 | + invisible="state == 'sold'" /> |
| 32 | + <button name="action_cancel_property" type="object" string="Cancel" |
| 33 | + invisible="state == 'sold'" /> |
32 | 34 | <field name="state" widget="statusbar" /> |
33 | 35 | </header> |
34 | 36 | <sheet> |
35 | 37 | <div class="oe_title"> |
36 | 38 | <h1 class="mb32"> |
37 | 39 | <field name="name" placeholder="House" class="mb16" /> |
38 | 40 | </h1> |
39 | | - <field name="property_tags_ids" widget="many2many_tags" /> |
| 41 | + <field name="property_tags_ids" widget="many2many_tags" |
| 42 | + options="{'color_field': 'color'}" /> |
40 | 43 | </div> |
41 | 44 | <group> |
42 | 45 | <group> |
43 | | - <field name="property_type_id" /> |
| 46 | + <field name="property_type_id" options="{'no_create_edit': true, 'no_create': true}" /> |
44 | 47 | <field name="postcode" /> |
45 | 48 | <field name="date_availability" /> |
46 | 49 | </group> |
|
59 | 62 | <field name="facades" /> |
60 | 63 | <field name="garage" /> |
61 | 64 | <field name="garden" /> |
62 | | - <field name="garden_area" /> |
63 | | - <field name="garden_orientation" /> |
| 65 | + <field name="garden_area" invisible="not garden" /> |
| 66 | + <field name="garden_orientation" invisible="not garden" /> |
64 | 67 | <field name="total_area" /> |
65 | 68 | </group> |
66 | 69 | </page> |
67 | 70 | <page string="Offers"> |
68 | 71 | <group> |
69 | | - <field name="offer_ids" /> |
| 72 | + <field name="offer_ids" readonly="state in ('offer_accepted', 'sold', 'cancelled')" /> |
70 | 73 | </group> |
71 | 74 | </page> |
72 | 75 | <page string="Other Info"> |
|
85 | 88 | <field name="name">estate.property.list</field> |
86 | 89 | <field name="model">estate.property</field> |
87 | 90 | <field name="arch" type="xml"> |
88 | | - <list string="Properties"> |
| 91 | + <list string="Properties" |
| 92 | + decoration-success="state in ('offer_received', 'offer_accepted')" |
| 93 | + decoration-bf="state == 'offer_accepted'" |
| 94 | + decoration-muted="state == 'sold'"> |
89 | 95 | <field name="name" string="Title" /> |
90 | 96 | <field name="property_type_id" /> |
91 | 97 | <field name="postcode" /> |
92 | 98 | <field name="bedrooms" /> |
93 | 99 | <field name="living_area" /> |
94 | 100 | <field name="expected_price" /> |
95 | 101 | <field name="selling_price" /> |
96 | | - <field name="date_availability" /> |
| 102 | + <field name="date_availability" optional="hide" /> |
97 | 103 | </list> |
98 | 104 | </field> |
99 | 105 | </record> |
|
0 commit comments