From 6ddbc11cafed7aa7b54e8a0cddae54c71bf3e829 Mon Sep 17 00:00:00 2001 From: Victor Champonnois Date: Fri, 10 Jan 2025 17:23:04 +0100 Subject: [PATCH] [IMP] _compute_auto_renew on quotation sent This allows to make the product contract settings work on ecommerce orders --- product_contract/models/sale_order.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/product_contract/models/sale_order.py b/product_contract/models/sale_order.py index dd3bc2a7ad..1097a7bbc2 100644 --- a/product_contract/models/sale_order.py +++ b/product_contract/models/sale_order.py @@ -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(