[FIX] crm: used cr date for date_closed

This is mainly here to avoid future randomness on tests and have a
coherent value with previous commits

Part-of: odoo/odoo#85525
This commit is contained in:
Xavier-Do
2022-04-04 16:48:17 +02:00
parent ee4157a396
commit f50162162c
+1 -1
View File
@@ -89,7 +89,7 @@ class EventRegistration(models.Model):
for registration in self:
if not registration.date_closed:
if registration.state == 'done':
registration.date_closed = fields.Datetime.now()
registration.date_closed = self.env.cr.now()
else:
registration.date_closed = False