Skip to content

Commit

Permalink
[IMP] _compute_auto_renew on quotation sent
Browse files Browse the repository at this point in the history
This allows to make the product contract settings work on ecommerce orders
  • Loading branch information
victor-champonnois committed Jan 10, 2025
1 parent 4b28839 commit 23ff111
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions product_contract/models/sale_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ def action_create_contract(self):
line.create_contract_line(line.contract_id)
return contract_model.browse(contracts)

def action_quotation_sent(self):
for line in self.order_line:
line._compute_auto_renew()
return super().action_quotation_sent()

Check warning on line 116 in product_contract/models/sale_order.py

View check run for this annotation

Codecov / codecov/patch

product_contract/models/sale_order.py#L115-L116

Added lines #L115 - L116 were not covered by tests

def action_confirm(self):
"""If we have a contract in the order, set it up"""
self.filtered(
Expand Down

0 comments on commit 23ff111

Please sign in to comment.