Skip to content

Commit

Permalink
[FIX] product_contract: add sol name dependes
Browse files Browse the repository at this point in the history
  • Loading branch information
sbejaoui committed Nov 22, 2024
1 parent 0bcce04 commit 7dd87ac
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion product_contract/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,14 @@ def _set_contract_line_start_date(self):
start_date = start_date + relativedelta(day=31)
line.date_start = start_date

@api.depends("product_id")
@api.depends(
"product_id",
"contract_start_date_method",
"date_start",
"date_end",
"recurring_rule_type",
"recurring_invoicing_type",
)
def _compute_name(self):
res = super()._compute_name()
for line in self:
Expand Down
2 changes: 2 additions & 0 deletions product_contract/models/sale_order_line_contract_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,13 @@ class SaleOrderLineContractMixin(models.AbstractModel):
compute="_compute_contract_line_date_start",
store=True,
readonly=False,
precompute=True,
)
date_end = fields.Date(
compute="_compute_contract_line_date_end",
store=True,
readonly=False,
precompute=True,
)
contract_line_id = fields.Many2one(
comodel_name="contract.line",
Expand Down

0 comments on commit 7dd87ac

Please sign in to comment.