Skip to content

Commit 4626609

Browse files
author
raibr
committed
[FIX] estate: replace invalid models.Constraint with _sql_constraints
The models.Constraint syntax does not exist in Odoo's ORM. SQL constraints must be defined using the _sql_constraints class attribute.
1 parent 806e103 commit 4626609

File tree

1 file changed

+21
-17
lines changed

1 file changed

+21
-17
lines changed

estate/views/estate_property_offer_views.xml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,19 @@
55
<field name="name">estate.property.offer.view.list</field>
66
<field name="model">estate.property.offer</field>
77
<field name="arch" type="xml">
8-
<list editable="bottom" decoration-danger="status == 'refused'" decoration-success="status == 'accepted'">
9-
<field name="price"/>
10-
<field name="partner_id"/>
11-
<field name="property_id"/>
12-
<field name="validity"/>
13-
<field name="date_deadline"/>
14-
<field name="status" column_invisible="1"/>
15-
<button name="action_accept" type="object" icon="fa-check" title="Accept"/>
16-
<button name="action_refuse" type="object" icon="fa-times" title="Refuse"/>
17-
8+
<list editable="bottom" decoration-danger="status == 'refused'"
9+
decoration-success="status == 'accepted'">
10+
<field name="price" />
11+
<field name="partner_id" />
12+
<field name="property_id" />
13+
<field name="property_id" />
14+
<field name="validity" />
15+
<field name="date_deadline" />
16+
<field name="status" />
17+
<button name="action_accept" type="object" icon="fa-check" title="Accept" />
18+
<button name="action_refuse" type="object" icon="fa-times" title="Refuse" />
19+
20+
1821
</list>
1922
</field>
2023
</record>
@@ -27,12 +30,12 @@
2730
<form>
2831
<sheet>
2932
<group>
30-
<field name="price"/>
31-
<field name="partner_id"/>
32-
<field name="property_id"/>
33-
<field name="validity"/>
34-
<field name="date_deadline"/>
35-
<field name="status"/>
33+
<field name="price" />
34+
<field name="partner_id" />
35+
<field name="property_id" />
36+
<field name="validity" />
37+
<field name="date_deadline" />
38+
<field name="status" />
3639
</group>
3740
</sheet>
3841
</form>
@@ -45,5 +48,6 @@
4548
<field name="res_model">estate.property.offer</field>
4649
<field name="view_mode">list,form</field>
4750
<field name="domain">[('property_id.property_type_id', '=', active_id)]</field>
51+
<field name="domain">[('property_id.property_type_id', '=', active_id)]</field>
4852
</record>
49-
</odoo>
53+
</odoo>

0 commit comments

Comments
 (0)