File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -40,12 +40,11 @@ def action_refuse(self):
4040 @api .constrains ("price" )
4141 def _check_offer_price_is_ok (self ):
4242 for record in self :
43- if float_compare (self .price , self .property_id .best_price , 2 ) == - 1 :
44- raise ValidationError (_ ("Le prix de vente doit être supérieur à %d" , self .property_id .best_price ))
43+ if float_compare (record .price , record .property_id .best_price , 2 ) == - 1 :
44+ raise ValidationError (_ ("Le prix de vente doit être supérieur à %d" , record .property_id .best_price ))
4545
4646 @api .model_create_multi
4747 def create (self , vals_list ):
4848 offers = super ().create (vals_list )
4949 offers .property_id .state = 'Offer Received'
5050 return offers
51-
Original file line number Diff line number Diff line change 22
33
44class EstateProperty (models .Model ):
5+ _name = "estate.property"
56 _inherit = ["estate.property" ]
67
78 def action_mark_as_sold (self ):
@@ -12,11 +13,11 @@ def action_mark_as_sold(self):
1213 "name" : "Accompte" ,
1314 "quantity" : "1" ,
1415 "price_unit" : self .selling_price * 0.06
15- }),
16+ }),
1617 Command .create ({
1718 "name" : "Frais administratifs" ,
1819 "quantity" : "1" ,
19- "price_unit" : 100
20+ "price_unit" : 100
2021 })
2122 ],
2223 'partner_id' : self .buyer .id ,
You can’t perform that action at this time.
0 commit comments