Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] mail_activity_reminder: Migration to 18.0
Browse files Browse the repository at this point in the history
[MIG] remove deprecated method
achulii committed Nov 27, 2024
1 parent 9d14599 commit 671cb68
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mail_activity_reminder/__manifest__.py
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@

{
"name": "Mail Activity Reminder",
"version": "17.0.1.0.0",
"version": "18.0.1.0.0",
"category": "Discuss",
"website": "https://github.com/OCA/mail",
"author": "CorporateHub, Odoo Community Association (OCA)",
2 changes: 0 additions & 2 deletions mail_activity_reminder/data/mail_activity_reminder_cron.xml
Original file line number Diff line number Diff line change
@@ -12,7 +12,5 @@
<field name="interval_number">1</field>
<field name="interval_type">hours</field>
<field name="nextcall">2020-01-01 00:01:00</field>
<field name="numbercall">-1</field>
<field name="doall" eval="True" />
</record>
</odoo>
4 changes: 2 additions & 2 deletions mail_activity_reminder/models/mail_activity.py
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
from dateutil.relativedelta import relativedelta
from pytz import UTC, timezone

from odoo import _, api, fields, models
from odoo import api, fields, models


class MailActivity(models.Model):
@@ -120,7 +120,7 @@ def action_remind(self):
tz = timezone(user.sudo().tz or "UTC")
local_now = utc_now.astimezone(tz)

subject = _("Some activities you are assigned too expire soon.")
subject = self.env._("Some activities you are assigned too expire soon.")

body = self.env["ir.qweb"]._render(
"mail_activity_reminder.message_activity_assigned",
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ def setUpClass(cls):
cls.Company = cls.env["res.company"]
cls.MailActivityType = cls.env["mail.activity.type"]
cls.MailActivity = cls.env["mail.activity"]
cls.company_id = cls.Company._company_default_get()
cls.company_id = cls.Company.env.company
cls.now = datetime(2020, 4, 19, 15, 00)
cls.today = cls.now.date()
cls.model_res_partner = cls.env["ir.model"].search(

0 comments on commit 671cb68

Please sign in to comment.