Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Email Marketing
Entity: mailing.mailing
Compute Method: _compute_next_departure
| Inputs | Method | Outputs |
|---|---|---|
|
for mass_mailing in self:
if mass_mailing.schedule_date:
# max in case the user schedules a date in the past
- mass_mailing.next_departure = max(mass_mailing.schedule_date, fields.datetime.now())
+ mass_mailing.next_departure = max(mass_mailing.schedule_date, fields.Datetime.now())
else:
- mass_mailing.next_departure = fields.datetime.now()
+ mass_mailing.next_departure = fields.Datetime.now()
past = self.filtered(
lambda mailing: mailing.state == 'in_queue' and mailing.next_departure < fields.Datetime.now()
)
past.next_departure_is_past = True
(self - past).next_departure_is_past = False
|
|
