|
4 | 4 | <record id="estate_property_action" model="ir.actions.act_window"> |
5 | 5 | <field name="name">Real Estate Properties</field> |
6 | 6 | <field name="res_model">estate.property</field> |
| 7 | + <field name="context">{'search_default_property_state': True}</field> |
7 | 8 | <field name="view_mode">list,form</field> |
8 | 9 | <field name="help" type="html"> |
9 | 10 | <p class="o_view_nocontent_smiling_face"> |
|
18 | 19 | <field name="arch" type="xml"> |
19 | 20 | <form string="Estate Property Form"> |
20 | 21 | <header> |
21 | | - <button name="action_mark_as_sold" type="object" string="SOLD"/> |
22 | | - <button name="action_mark_as_cancelled" type="object" string="CANCEL"/> |
| 22 | + <button name="action_mark_as_sold" type="object" string="SOLD" invisible="not active"/> |
| 23 | + <button name="action_mark_as_cancelled" type="object" string="CANCEL" invisible="not active"/> |
23 | 24 | <field name="state" widget="statusbar"/> |
| 25 | + <field name="active" invisible="True"/> |
24 | 26 | </header> |
25 | 27 | <sheet> |
26 | 28 | <div> |
|
29 | 31 | </h1> |
30 | 32 | <group> |
31 | 33 | <group> |
32 | | - <field name="property_tags_ids" widget="many2many_tags"/> |
| 34 | + <field name="property_tags_ids" widget="many2many_tags" options="{'no_create': True, 'color_field': 'color'}"/> |
33 | 35 | <field name="property_type_id"/> |
34 | 36 | <field name="postcode"/> |
35 | 37 | <field name="date_availability"/> |
|
50 | 52 | <field name="facades"/> |
51 | 53 | <field name="garage"/> |
52 | 54 | <field name="garden"/> |
53 | | - <field name="garden_area"/> |
54 | | - <field name="garden_orientation"/> |
| 55 | + <field name="garden_area" invisible="not garden"/> |
| 56 | + <field name="garden_orientation" invisible="not garden"/> |
55 | 57 | <field name="total_area"/> |
56 | 58 | </group> |
57 | 59 | </page> |
58 | 60 | <page string="Offers"> |
59 | 61 | <group> |
60 | | - <field name="offer_ids"/> |
| 62 | + <field name="offer_ids" readonly="state in ('cancelled', 'sold', 'offer_accepted')"/> |
61 | 63 | </group> |
62 | 64 | </page> |
63 | 65 | <page string="Other Info"> |
|
76 | 78 | <field name="name">estate.property.list</field> |
77 | 79 | <field name="model">estate.property</field> |
78 | 80 | <field name="arch" type="xml"> |
79 | | - <list string="Channel"> |
| 81 | + <list string="Channel" decoration-success="state in ('offer_received', 'offer_accepted')" decoration-bf="state == 'offer_accepted'" decoration-muted="state == 'sold'"> |
80 | 82 | <field name="name"/> |
81 | 83 | <field name="postcode"/> |
82 | 84 | <field name="bedrooms"/> |
83 | 85 | <field name="living_area"/> |
84 | 86 | <field name="expected_price"/> |
85 | 87 | <field name="selling_price"/> |
86 | | - <field name="date_availability"/> |
| 88 | + <field name="date_availability" optional="True"/> |
87 | 89 | </list> |
88 | 90 | </field> |
89 | 91 | </record> |
|
94 | 96 | <field name="arch" type="xml"> |
95 | 97 | <search string="Search properties"> |
96 | 98 | <field name="name" string="Property Name" /> |
| 99 | + <field name="living_area" string="Living Area (sqm)" filter_domain="[('living_area', '>=', self)]"/> |
97 | 100 | <field name="bedrooms" string="Number Of Bedrooms"/> |
98 | 101 | <separator/> |
99 | 102 | <group> |
|
0 commit comments