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 6ddbc11
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()
super().action_quotation_sent()

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

0 comments on commit 6ddbc11

Please sign in to comment.