diff --git a/modules/party_relationship/party.py b/modules/party_relationship/party.py index f02d159d40..3e7d67c76e 100644 --- a/modules/party_relationship/party.py +++ b/modules/party_relationship/party.py @@ -78,7 +78,7 @@ class Relation(ModelSQL): pool = Pool() Date = pool.get('ir.date') context = Transaction().context - date = context.get('date', Date.today()) + date = context.get('date') or Date.today() start_date = self.start_date or dt.date.min end_date = self.end_date or dt.date.max return start_date <= date <= end_date @@ -88,7 +88,7 @@ class Relation(ModelSQL): pool = Pool() Date = pool.get('ir.date') context = Transaction().context - date = context.get('date', Date.today()) + date = context.get('date') or Date.today() table, _ = tables[None] _, operator, value = domain