Skip to content

Commit d0d2f25

Browse files
committed
[12.0][IMP] Change field's name in agreement
1 parent 885868c commit d0d2f25

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

acm/acm_agreement_contract/models/agreement.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ class Agreement(models.Model):
7878
comodel_name='agreement.line',
7979
compute='_compute_line_id',
8080
)
81-
compensation_line_id = fields.Many2one(
81+
tea_money_line_id = fields.Many2one(
8282
comodel_name='agreement.line',
8383
compute='_compute_line_id',
8484
)
85-
deposit_line_id = fields.Many2one(
85+
security_deposit_line_id = fields.Many2one(
8686
comodel_name='agreement.line',
8787
compute='_compute_line_id',
8888
)
@@ -119,19 +119,19 @@ def _compute_line_id(self):
119119
if not lines:
120120
continue
121121
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')
127127
transfer_line_ids = lines.filtered(
128-
lambda l: l.product_id.lease_type == 'transfer')
128+
lambda l: l.product_id.value_type == 'transfer')
129129
if rent_line_ids:
130130
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]
135135
if transfer_line_ids:
136136
rec.transfer_line_id = transfer_line_ids[0]
137137

0 commit comments

Comments
 (0)