[FIX] calendar: r_date must be defined before use

commit b4ec51021b forgot about the case where no domain was supplied
or when the conditions on it were not fulfilled.

before this commit, a traceback was thrown and no event was shown

After this commit, no errors and all the relevant events are shown

opw 782985
This commit is contained in:
Lucas Perais (lpe)
2017-11-20 09:16:16 +01:00
parent 8d5c4cb30d
commit bab597bb47
+1
View File
@@ -1197,6 +1197,7 @@ class calendar_event(osv.Model):
# check if there are one False
pile = []
ok = True
r_date = None
for arg in domain:
if str(arg[0]) in ('start', 'stop', 'final_date'):
if str(arg[0]) == 'start':