From f3a707231475dbc28083b6e54cea55d36be7ca6b Mon Sep 17 00:00:00 2001 From: Marc Durepos Date: Tue, 17 Dec 2024 16:06:03 -0500 Subject: [PATCH] price_update_notifications: add mail.activity.mixin to notices --- price_update_notifications/__manifest__.py | 2 +- .../models/price_notice_mailing.py | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/price_update_notifications/__manifest__.py b/price_update_notifications/__manifest__.py index 84b7f04..0ed3c23 100644 --- a/price_update_notifications/__manifest__.py +++ b/price_update_notifications/__manifest__.py @@ -19,7 +19,7 @@ # { "name": "Price Update Notifications", - "version": "17.0.1.0.0", + "version": "17.0.1.0.1", "summary": "Send a price update notification to clients", "category": "Sale", "author": "Bemade Inc.", diff --git a/price_update_notifications/models/price_notice_mailing.py b/price_update_notifications/models/price_notice_mailing.py index 92fcee2..c5a2905 100644 --- a/price_update_notifications/models/price_notice_mailing.py +++ b/price_update_notifications/models/price_notice_mailing.py @@ -6,7 +6,7 @@ from datetime import timedelta class PriceNoticeMailing(models.Model): _name = "price.notice.mailing" _description = "Price Notice Mailing" - _inherit = ["mail.thread"] + _inherit = ["mail.thread", "mail.activity.mixin"] partner_id = fields.Many2one("res.partner", required=True, readonly=True) email = fields.Char(readonly=True) @@ -85,11 +85,13 @@ class PriceNoticeMailing(models.Model): ), ] if self.product_template_ids: - so_domain = [( - "order_line.product_template_id", - "in", - self.product_template_ids.ids, - )] + so_domain + so_domain = [ + ( + "order_line.product_template_id", + "in", + self.product_template_ids.ids, + ) + ] + so_domain sale_ids = self.env["sale.order"].search(so_domain) # Retrieve purchased products and limit to the selected product