@@ -78,11 +78,11 @@ class Agreement(models.Model):
78
78
comodel_name = 'agreement.line' ,
79
79
compute = '_compute_line_id' ,
80
80
)
81
- compensation_line_id = fields .Many2one (
81
+ tea_money_line_id = fields .Many2one (
82
82
comodel_name = 'agreement.line' ,
83
83
compute = '_compute_line_id' ,
84
84
)
85
- deposit_line_id = fields .Many2one (
85
+ security_deposit_line_id = fields .Many2one (
86
86
comodel_name = 'agreement.line' ,
87
87
compute = '_compute_line_id' ,
88
88
)
@@ -119,19 +119,19 @@ def _compute_line_id(self):
119
119
if not lines :
120
120
continue
121
121
rent_line_ids = lines .filtered (
122
- lambda l : l .product_id .lease_type == 'rent' )
123
- compensation_line_ids = lines .filtered (
124
- lambda l : l .product_id .lease_type == 'compensation ' )
125
- deposit_line_ids = lines .filtered (
126
- lambda l : l .product_id .lease_type == 'deposit ' )
122
+ lambda l : l .product_id .value_type == 'rent' )
123
+ tea_money_line_ids = lines .filtered (
124
+ lambda l : l .product_id .value_type == 'tea_money ' )
125
+ security_deposit_line_ids = lines .filtered (
126
+ lambda l : l .product_id .value_type == 'security_deposit ' )
127
127
transfer_line_ids = lines .filtered (
128
- lambda l : l .product_id .lease_type == 'transfer' )
128
+ lambda l : l .product_id .value_type == 'transfer' )
129
129
if rent_line_ids :
130
130
rec .rent_line_id = rent_line_ids [0 ]
131
- if compensation_line_ids :
132
- rec .compensation_line_id = compensation_line_ids [0 ]
133
- if deposit_line_ids :
134
- rec .deposit_line_id = deposit_line_ids [0 ]
131
+ if tea_money_line_ids :
132
+ rec .tea_money_line_id = tea_money_line_ids [0 ]
133
+ if security_deposit_line_ids :
134
+ rec .security_deposit_line_id = security_deposit_line_ids [0 ]
135
135
if transfer_line_ids :
136
136
rec .transfer_line_id = transfer_line_ids [0 ]
137
137
0 commit comments