Skip to content

Commit ab9d9a6

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 ab9d9a6

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

estate/views/estate_property_offer_views.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<odoo>
33
<!-- List View -->
4+
<record id="estate_property_offer_view_list" model="ir.ui.view">
5+
<field name="name">estate.property.offer.view.list</field>
6+
<!-- List View -->
47
<record id="estate_property_offer_view_list" model="ir.ui.view">
58
<field name="name">estate.property.offer.view.list</field>
69
<field name="model">estate.property.offer</field>
710
<field name="arch" type="xml">
11+
<list editable="bottom" decoration-danger="status == 'refused'" decoration-success="status == 'accepted'">
812
<list editable="bottom" decoration-danger="status == 'refused'" decoration-success="status == 'accepted'">
913
<field name="price"/>
1014
<field name="partner_id"/>
1115
<field name="property_id"/>
16+
<field name="property_id"/>
1217
<field name="validity"/>
1318
<field name="date_deadline"/>
14-
<field name="status" column_invisible="1"/>
19+
<field name="status" />
1520
<button name="action_accept" type="object" icon="fa-check" title="Accept"/>
1621
<button name="action_refuse" type="object" icon="fa-times" title="Refuse"/>
1722

23+
1824
</list>
1925
</field>
2026
</record>
@@ -45,5 +51,6 @@
4551
<field name="res_model">estate.property.offer</field>
4652
<field name="view_mode">list,form</field>
4753
<field name="domain">[('property_id.property_type_id', '=', active_id)]</field>
54+
<field name="domain">[('property_id.property_type_id', '=', active_id)]</field>
4855
</record>
4956
</odoo>

0 commit comments

Comments
 (0)