From 00da877b29ce88c1a21b5fd4632fe1cdb5340009 Mon Sep 17 00:00:00 2001 From: "Georg A. G. Notter" Date: Mon, 7 Aug 2023 16:22:41 +0200 Subject: [PATCH] Fix Singleton Exception (#29) --- sale_start_end_dates/models/sale_order.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sale_start_end_dates/models/sale_order.py b/sale_start_end_dates/models/sale_order.py index 0acd7cdacd6..172e412d81d 100644 --- a/sale_start_end_dates/models/sale_order.py +++ b/sale_start_end_dates/models/sale_order.py @@ -166,7 +166,7 @@ def _compute_start_date(self): line.start_date = order.default_start_date elif line.start_date and not line.product_id.must_have_dates: line.start_date = False - elif line.end_date and line.start_date and line.start_date > self.end_date: + elif line.end_date and line.start_date and line.start_date > line.end_date: line.start_date = line.end_date @api.depends("start_date", "product_id") @@ -181,5 +181,5 @@ def _compute_end_date(self): line.end_date = order.default_end_date elif line.end_date and not line.product_id.must_have_dates: line.end_date = False - elif line.end_date and line.start_date and line.start_date > self.end_date: + elif line.end_date and line.start_date and line.start_date > line.end_date: line.end_date = line.start_date