|
4 | 4 | <field name="name">Properties</field> |
5 | 5 | <field name="res_model">estate.property</field> |
6 | 6 | <field name="view_mode">list,form,search</field> |
| 7 | + <field name="search_view_id" ref="estate_property_view_search"/> |
| 8 | + <field name="context">{'search_default_available': True}</field> |
7 | 9 | </record> |
8 | 10 |
|
9 | | - <record id="estate_property_view_tree" model="ir.ui.view"> |
| 11 | + <record id="estate_property_view_list" model="ir.ui.view"> |
10 | 12 | <field name="name">estate.property.list</field> |
11 | 13 | <field name="model">estate.property</field> |
12 | 14 | <field name="arch" type="xml"> |
13 | | - <list string="Properties"> |
| 15 | + <list string="Properties" decoration-success="status in ['offer_received','offer_accepted']" decoration-bf="status == 'offer_accepted'" decoration-muted="status == 'sold'"> |
| 16 | + <field name="sequence" widget="handle"/> |
14 | 17 | <field name="name" string="Title"/> |
15 | 18 | <field name="property_type_id" string="Property Type"/> |
16 | 19 | <field name="tag_ids" string="Tags" widget="many2many_tags"/> |
|
19 | 22 | <field name="living_area" string="Living Area (sqm)"/> |
20 | 23 | <field name="expected_price" string="Expected Price" widget="monetary" options="{'currency_field': 'currency_id'}"/> |
21 | 24 | <field name="selling_price" string="Selling Price" widget="monetary" options="{'currency_field': 'currency_id'}"/> |
22 | | - <field name="date_availability" string="Available From"/> |
| 25 | + <field name="date_availability" string="Available From" optional="hide"/> |
23 | 26 | </list> |
24 | 27 | </field> |
25 | 28 | </record> |
|
31 | 34 | <form string="Property"> |
32 | 35 | <sheet> |
33 | 36 | <header> |
34 | | - <button name="action_set_sold" type="object" string="Sold" class="btn-primary"/> |
35 | | - <button name="action_set_canceled" type="object" string="Cancel" class="btn-secondary"/> |
| 37 | + <button name="action_set_sold" type="object" string="Sold" class="btn-primary" invisible="status in ['sold', 'canceled']"/> |
| 38 | + <button name="action_set_canceled" type="object" string="Cancel" class="btn-secondary" invisible="status in ['sold', 'canceled']"/> |
| 39 | + <field name="status" widget="statusbar" statusbar_visible="new,offer_received,offer_accepted,sold"/> |
36 | 40 | </header> |
37 | 41 | <div class="oe_title"> |
38 | 42 | <h1> |
39 | 43 | <field name="name"/> |
40 | 44 | </h1> |
41 | | - <field name="tag_ids" widget="many2many_tags" string="Tags"/> |
| 45 | + <field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color',}" string="Tags"/> |
42 | 46 | </div> |
43 | 47 | <group> |
44 | 48 | <group> |
45 | | - <field name="status" string="Status"/> |
46 | | - <field name="property_type_id" string="Property Type"/> |
| 49 | + <field name="property_type_id" string="Property Type" options="{'no_create': True, 'no_open': True}"/> |
47 | 50 | <field name="postcode" string="Postcode"/> |
48 | 51 | <field name="date_availability" string="Available From"/> |
49 | 52 | </group> |
|
63 | 66 | <field name="facades" string="Facades"/> |
64 | 67 | <field name="garage" string="Garage"/> |
65 | 68 | <field name="garden" string="Garden"/> |
66 | | - <field name="garden_area" string="Garden Area (sqm)"/> |
67 | | - <field name="garden_orientation" string="Garden Orientation"/> |
| 69 | + <field name="garden_area" string="Garden Area (sqm)" visible="garden"/> |
| 70 | + <field name="garden_orientation" string="Garden Orientation" visible="garden"/> |
68 | 71 | <field name="total_area" string="Total Area (sqm)"/> |
69 | 72 | </group> |
70 | 73 | </page> |
71 | 74 | <page string="Offers"> |
72 | | - <field name="offer_ids"> |
73 | | - <list string="Offers"> |
| 75 | + <field name="offer_ids" readonly="status in ['offer_accepted', 'sold', 'canceled']"> |
| 76 | + <list string="Offers" editable="top" decoration-success="status == 'accepted'" decoration-danger="status == 'refused'"> |
74 | 77 | <field name="price" string="Price" widget="monetary" options="{'currency_field': 'currency_id'}"/> |
75 | 78 | <field name="partner_id" string="Partner"/> |
76 | 79 | <field name="validity" string="Validity (days)"/> |
77 | 80 | <field name="date_deadline" string="Deadline"/> |
78 | | - <button name="action_accept_offer" type="object" icon="fa-check"/> |
79 | | - <button name="action_refuse_offer" type="object" icon="fa-times"/> |
80 | | - <field name="status" string="Status"/> |
| 81 | + <button name="action_accept_offer" type="object" icon="fa-check" invisible="status"/> |
| 82 | + <button name="action_refuse_offer" type="object" icon="fa-times" title="Refuse Offer" invisible="status"/> |
81 | 83 | </list> |
82 | | - <form string="Offer"> |
83 | | - <group> |
84 | | - <field name="price" string="Price"/> |
85 | | - <field name="partner_id" string="Partner"/> |
86 | | - <field name="validity" string="Validity (days)"/> |
87 | | - <field name="date_deadline" string="Deadline"/> |
88 | | - <field name="status" string="Status"/> |
89 | | - </group> |
90 | | - </form> |
91 | 84 | </field> |
92 | 85 | </page> |
93 | 86 | <page string="Other Info"> |
|
113 | 106 | <field name="property_type_id" string="Property Type"/> |
114 | 107 | <field name="tag_ids" string="Tags"/> |
115 | 108 | <field name="bedrooms" string="Bedrooms"/> |
116 | | - <field name="living_area" string="Living Area (sqm)"/> |
| 109 | + <field name="living_area" string="Living Area (sqm)" filter_domain="[('living_area', '>=', self)]"/> |
117 | 110 | <field name="facades" string="Facades"/> |
118 | 111 |
|
119 | | - <filter string="Available" name="available" domain="[('status', 'in', ['new', 'offer_received'])]"/> |
| 112 | + <filter name="available" string="Available" domain="[('status', 'in', ['new', 'offer_received'])]"/> |
120 | 113 |
|
121 | 114 | <group> |
122 | 115 | <filter string="Postcode" name="postcode" context="{'group_by': 'postcode'}"/> |
|
0 commit comments