File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -9,18 +9,10 @@ class PropertyType(models.Model):
99 name = fields .Char (required = True )
1010 property_ids = fields .One2many ('estate.property' , 'property_type_id' , string = 'Properties' )
1111 sequence = fields .Integer (string = "Sequence" , default = 10 )
12- offer_ids = fields .One2many ("estate.property.offer" , compute = "_compute_offers " , string = "Offers" )
12+ offer_ids = fields .One2many ("estate.property.offer" , "property_type_id " , string = "Offers" )
1313 offer_count = fields .Integer (string = "Offer Count" , compute = "_compute_offer_count" )
1414
15-
1615 @api .depends ("offer_ids" )
1716 def _compute_offer_count (self ):
1817 for record in self :
1918 record .offer_count = len (record .offer_ids )
20-
21- def _compute_offers (self ):
22- for record in self :
23- offers = self .env ['estate.property.offer' ].search ([
24- ('property_type_id' , '=' , record .id )
25- ])
26- record .offer_ids = offers
You can’t perform that action at this time.
0 commit comments