From 502c45b000aec4a4931a26798035245f70ecce4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Alix?= Date: Mon, 13 Jan 2025 15:51:47 +0100 Subject: [PATCH] sale_stock_release_channel_partner_by_date: look for archived specific channel --- .../models/sale_order.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sale_stock_release_channel_partner_by_date/models/sale_order.py b/sale_stock_release_channel_partner_by_date/models/sale_order.py index adea84563b..9bea5fad32 100644 --- a/sale_stock_release_channel_partner_by_date/models/sale_order.py +++ b/sale_stock_release_channel_partner_by_date/models/sale_order.py @@ -61,7 +61,11 @@ def _get_release_channel_partner_date(self): self.ensure_one() model = self.env["stock.release.channel.partner.date"] domain = self._get_release_channel_partner_date_domain() - return domain and model.search(domain, limit=1) or model + return ( + domain + and model.with_context(active_test=False).search(domain, limit=1) + or model + ) def _get_release_channel_partner_date_domain(self): self.ensure_one()