[FIX]: Mail Issue.
This commit is contained in:
parent
83b3dd675f
commit
2614448dd5
@ -65,14 +65,16 @@ class MailMail(models.Model):
|
|||||||
scheduled_date = fields.Char('Scheduled Send Date',
|
scheduled_date = fields.Char('Scheduled Send Date',
|
||||||
help="If set, the queue manager will send the email after the date. If not set, the email will be send as soon as possible.")
|
help="If set, the queue manager will send the email after the date. If not set, the email will be send as soon as possible.")
|
||||||
|
|
||||||
|
@api.multi
|
||||||
@api.depends('keep_days')
|
@api.depends('keep_days')
|
||||||
def _compute_delete_on_date(self):
|
def _compute_delete_on_date(self):
|
||||||
mail_date = fields.Datetime.from_string(self.date)
|
for obj in self:
|
||||||
if self.keep_days > 0:
|
mail_date = fields.Datetime.from_string(obj.date)
|
||||||
delete_on = mail_date + datetime.timedelta(days=self.keep_days)
|
if obj.keep_days > 0:
|
||||||
self.delete_date = delete_on
|
delete_on = mail_date + datetime.timedelta(days=obj.keep_days)
|
||||||
else:
|
obj.delete_date = delete_on
|
||||||
self.delete_date = mail_date.date()
|
else:
|
||||||
|
obj.delete_date = mail_date.date()
|
||||||
|
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
|
Loading…
Reference in New Issue
Block a user