From 4309eefced178e1e0ed9cedb120628fa2a8a9fc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 10 Apr 2024 18:13:54 +0200 Subject: [PATCH] Do not fail to compute record name of opportunity reporting without employee Closes #13114 (grafted from 6cdbfed2effb3f71b3f688564de4471da095546f) --HG-- branch : 7.0 --- modules/sale_opportunity/opportunity_reporting.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/sale_opportunity/opportunity_reporting.py b/modules/sale_opportunity/opportunity_reporting.py index bae04ee906..d30d697a2b 100644 --- a/modules/sale_opportunity/opportunity_reporting.py +++ b/modules/sale_opportunity/opportunity_reporting.py @@ -424,7 +424,8 @@ class EmployeeMixin: opportunity.employee] def get_rec_name(self, name): - return self.employee.rec_name + if self.employee: + return self.employee.rec_name @classmethod def search_rec_name(cls, name, clause):