|
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="real_estate_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="Properties" |
| 15 | + decoration-success="state in ('offer_received', 'offer_accepted',)" |
| 16 | + decoration-bf="state in ('offer_accepted',)" |
| 17 | + decoration-muted="state in ('sold',)"> |
14 | 18 | <field name="name" required="True"/>
|
15 | 19 | <field name="postcode"/>
|
16 | 20 | <field name="bedrooms" string="Bedrooms"/>
|
|
27 | 31 | <field name="name">estate.property.form</field>
|
28 | 32 | <field name="model">estate.property</field>
|
29 | 33 | <field name="arch" type="xml">
|
30 |
| - <form string="Test"> |
| 34 | + <form string="Properties"> |
31 | 35 | <header>
|
32 |
| - <button name="action_cancel_property" type="object" string="Cancel"/> |
33 |
| - <button name="action_sold_property" type="object" string="Sold"/> |
| 36 | + <button name="action_cancel_property" type="object" string="Cancel" |
| 37 | + invisible="state in ('cancelled', 'sold',)"/> |
| 38 | + <button name="action_sold_property" type="object" string="Sold" |
| 39 | + invisible="state in ('cancelled', 'sold',)"/> |
| 40 | + <field name="state" widget="statusbar" |
| 41 | + statusbar_visible="new,offer_received,offer_accepted,sold" |
| 42 | + options="{'clickable': '1'}"/> |
34 | 43 | </header>
|
35 | 44 | <sheet>
|
36 |
| - <h1 > |
37 |
| - <field name="name" /> |
| 45 | + <h1> |
| 46 | + <field name="name"/> |
38 | 47 | </h1>
|
39 | 48 | <div class="mb32">
|
40 |
| - <field name="tag_ids" widget="many2many_tags"/> |
| 49 | + <field name="tag_ids" widget="many2many_tags" |
| 50 | + options="{'color_field': 'color'}"/> |
41 | 51 | </div>
|
42 | 52 | <group>
|
43 | 53 | <group>
|
44 |
| - <field name="postcode" /> |
45 |
| - <field name="date_availability" /> |
46 |
| - <field name="state" /> |
| 54 | + <field name="postcode"/> |
| 55 | + <field name="date_availability" optional="hide"/> |
| 56 | + <field name="property_type_id" options="{'no_create': true}"/> |
47 | 57 | </group>
|
48 | 58 | <group>
|
49 |
| - <field name="expected_price" /> |
50 |
| - <field name="selling_price" /> |
51 |
| - <field name="best_price" /> |
| 59 | + <field name="expected_price"/> |
| 60 | + <field name="selling_price"/> |
| 61 | + <field name="best_price"/> |
52 | 62 | </group>
|
53 | 63 | </group>
|
54 | 64 | <notebook>
|
55 | 65 | <page string="Description">
|
56 | 66 | <group>
|
57 | 67 | <group>
|
58 |
| - <field name="bedrooms" /> |
59 |
| - <field name="living_area" /> |
60 |
| - <field name="facades" /> |
61 |
| - <field name="property_type_id" string="Property Type"/> |
62 |
| - <field name="description" /> |
| 68 | + <field name="bedrooms"/> |
| 69 | + <field name="living_area"/> |
| 70 | + <field name="facades"/> |
| 71 | + <field name="description"/> |
63 | 72 | </group>
|
64 | 73 | <group>
|
65 |
| - <field name="garage" /> |
66 |
| - <field name="garden" /> |
67 |
| - <field name="garden_area" /> |
68 |
| - <field name="garden_orientation" /> |
69 |
| - <field name="total_area" /> |
70 |
| - <field name="active" invisible="1" /> |
| 74 | + <field name="garage"/> |
| 75 | + <field name="garden"/> |
| 76 | + <field name="garden_area" invisible="not garden"/> |
| 77 | + <field name="garden_orientation" invisible="not garden"/> |
| 78 | + <field name="total_area"/> |
| 79 | + <field name="active" invisible="1"/> |
71 | 80 | </group>
|
72 | 81 | </group>
|
73 | 82 | </page>
|
74 | 83 | <page string="Offers">
|
75 |
| - <group> |
76 |
| - <field name="offer_ids"/> |
77 |
| - </group> |
| 84 | + <field name="offer_ids" |
| 85 | + readonly="state in ('offer_accepted', 'sold', 'cancelled')"/> |
78 | 86 | </page>
|
79 | 87 | <page string="Other Info">
|
80 | 88 | <group>
|
|
97 | 105 | <field name="postcode" string="Postcode"/>
|
98 | 106 | <field name="expected_price" string="Expected Price"/>
|
99 | 107 | <field name="bedrooms" string="Bedrooms"/>
|
100 |
| - <field name="living_area" string="Living Area (sqm)"/> |
| 108 | + <field name="living_area" string="Living Area (sqm)" |
| 109 | + filter_domain="[('living_area', '>=', self)]"/> |
101 | 110 | <field name="facades" string="Facades"/>
|
102 | 111 | <separator/>
|
103 |
| - <!-- <filter domain="['|', ('state', '=', 'new'), ('state', '=', 'offer_received'),]" name="available" string="Available"/> --> |
104 |
| - <filter domain="[('state', 'in', ['new', 'offer_received'])]" name="available" string="Available"/> |
| 112 | + <filter domain="[('state', 'in', ['new', 'offer_received'])]" name="available" |
| 113 | + string="Available"/> |
105 | 114 | <separator/>
|
106 | 115 | <group expand="1" string="Group By">
|
107 | 116 | <filter string="Postcode" name="postcode" context="{'group_by':'postcode'}"/>
|
|
0 commit comments