|
4 | 4 | <field name="name">Properties</field>
|
5 | 5 | <field name="res_model">estate.property</field>
|
6 | 6 | <field name="search_view_id" ref="estate.estate_property_search_view"/>
|
| 7 | + <field name="context">{'search_default_filter_available': True}</field> |
7 | 8 | <field name="view_mode">list,form</field>
|
8 | 9 | </record>
|
9 | 10 |
|
10 | 11 | <record id="estate_property_list_view" model="ir.ui.view">
|
11 | 12 | <field name="name">estate.list_view</field>
|
12 | 13 | <field name="model">estate.property</field>
|
13 | 14 | <field name="arch" type="xml">
|
14 |
| - <list string="Properties"> |
| 15 | + <list string="Properties" decoration-success="status in ['offer_accepted', 'offer_receieved']" decoration-bf="status == 'offer_accepted'" decoration-muted="status in ['sold', 'cancelled']"> |
15 | 16 | <field name="postcode"/>
|
16 | 17 | <field name="bedrooms"/>
|
17 | 18 | <field name="living_area"/>
|
18 | 19 | <field name="expected_price"/>
|
19 | 20 | <field name="selling_price"/>
|
20 | 21 | <field name="date_availability"/>
|
21 | 22 | <field name="property_type_id"/>
|
22 |
| - <field name="property_tag_ids" widget="many2many_tags"/> |
| 23 | + <field name="property_tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/> |
23 | 24 | </list>
|
24 | 25 | </field>
|
25 | 26 | </record>
|
|
30 | 31 | <field name="arch" type="xml">
|
31 | 32 | <form string="New Property">
|
32 | 33 | <header>
|
33 |
| - <button name="action_mark_property_as_sold" string="Mark as Sold" type="object" class="btn-primary"/> |
34 |
| - <button name="action_mark_property_as_cancelled" string="Cancel" type="object"/> |
| 34 | + <group invisible="(status == 'cancelled') or (status == 'sold')"> |
| 35 | + <button name="action_mark_property_as_sold" string="Mark as Sold" type="object" class="btn-primary"/> |
| 36 | + <button name="action_mark_property_as_cancelled" string="Cancel" type="object"/> |
| 37 | + </group> |
| 38 | + <field name="status" widget="statusbar"/> |
35 | 39 | </header>
|
36 | 40 | <sheet>
|
37 | 41 | <h1 class="mb32">
|
38 | 42 | <field name="name"/>
|
39 | 43 | </h1>
|
40 | 44 | <group>
|
41 | 45 | <group>
|
42 |
| - <field name="property_tag_ids" widget="many2many_tags"/> |
| 46 | + <field name="property_tag_ids" widget="many2many_tags" options="{'color_field': 'color'}"/> |
43 | 47 | <field name="seller_id"/>
|
44 | 48 | <field name="postcode"/>
|
45 |
| - <field name="property_type_id"/> |
| 49 | + <field name="property_type_id" options="{'no_create': true}"/> |
46 | 50 | <field name="date_availability"/>
|
47 | 51 | </group>
|
48 | 52 | <group>
|
|
61 | 65 | <field name="facades"/>
|
62 | 66 | <field name="has_garage" string="Garage"/>
|
63 | 67 | <field name="has_garden" string="Graden"/>
|
| 68 | + <field name="best_offer_price" string="Best offer price:"/> |
| 69 | + </group> |
| 70 | + <group invisible="not has_garden"> |
64 | 71 | <field name="garden_area"/>
|
65 | 72 | <field name="garden_orientation"/>
|
66 | 73 | </group>
|
67 | 74 | </page>
|
68 | 75 |
|
69 | 76 | <page string="Offers">
|
70 |
| - <field name="offer_ids"/> |
| 77 | + <field name="offer_ids" readonly="status == 'offer_accepted'"/> |
71 | 78 | </page>
|
72 | 79 | </notebook>
|
73 | 80 | </sheet>
|
|
84 | 91 | <field name="postcode" string="Postcode"/>
|
85 | 92 | <field name="expected_price" string="Expected Price"/>
|
86 | 93 | <field name="bedrooms" string="Bedrooms"/>
|
87 |
| - <field name="living_area" string="Living Area"/> |
| 94 | + <field name="living_area" string="Living Area" filter_domain="[('living_area', '>=', self)]"/> |
88 | 95 | <field name="facades" string="Facades"/>
|
89 | 96 | <filter string="Available" name="filter_available" domain="[('status', 'in', ['new', 'offer_receieved'])]"/>
|
90 | 97 | <group expand="0" string="Group By">
|
|
0 commit comments