File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,7 +74,6 @@ def _check_selling_price(self):
7474 self .env ._ ("The selling price cannot be lower than 90% of the expected price! Check your offers or adjust the expected price." )
7575 )
7676
77-
7877 @api .depends ('living_area' , 'garden_area' )
7978 def _compute_total_area (self ):
8079 for record in self :
Original file line number Diff line number Diff line change 11from odoo .tests .common import TransactionCase
2- from odoo .exceptions import UserError , ValidationError
2+ from odoo .exceptions import UserError
33
44
55class EstatePropertyCommon (TransactionCase ):
66 @classmethod
77 def setUpClass (cls ):
8- super (EstatePropertyCommon , cls ).setUpClass ()
8+ super ().setUpClass ()
99
10- cls .property = cls .env ['estate.property' ].create ({'name' : "Test Property" ,'expected_price' : 1.0 })
10+ cls .property = cls .env ['estate.property' ].create ({'name' : "Test Property" , 'expected_price' : 1.0 })
1111
1212 def test_01_prevent_offer_for_sold_property (self ):
1313 """Test that creating an offer for a sold property raises a UserError."""
1414
15- offer = self .env ['estate.property.offer' ].create ({'property_id' : self .property .id ,'price' : 2.0 })
15+ offer = self .env ['estate.property.offer' ].create ({'property_id' : self .property .id , 'price' : 2.0 })
1616 offer .action_accept ()
1717
1818 self .property .action_sell ()
1919
2020 with self .assertRaises (UserError ):
21- self .env ['estate.property.offer' ].create ({'property_id' : self .property .id ,'price' : 3.0 })
21+ self .env ['estate.property.offer' ].create ({'property_id' : self .property .id , 'price' : 3.0 })
2222
2323 def test_02_prevent_sell_no_accepted_offers (self ):
2424 """Test that selling a property without an accepted offer raises a UserError."""
You can’t perform that action at this time.
0 commit comments