Do not use empty contextual date to calculate active of party relation
Closes #13733
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user