diff --git a/addons/purchase_stock/models/purchase.py b/addons/purchase_stock/models/purchase.py index 80f9e7d8339..572b5c0a8c2 100644 --- a/addons/purchase_stock/models/purchase.py +++ b/addons/purchase_stock/models/purchase.py @@ -304,7 +304,7 @@ class PurchaseOrderLine(models.Model): # If the quantity is now below the invoiced quantity, create an activity on the vendor bill # inviting the user to create a refund. activity = self.env['mail.activity'].sudo().create({ - 'activity_type_id': self.env.ref('mail.mail_activity_data_todo').id, + 'activity_type_id': self.env.ref('mail.mail_activity_data_warning').id, 'note': _('The quantities on your purchase order indicate less than billed. You should ask for a refund. '), 'res_id': line.invoice_lines[0].invoice_id.id, 'res_model_id': self.env.ref('account.model_account_move').id, diff --git a/addons/stock/models/stock_rule.py b/addons/stock/models/stock_rule.py index 76e0927c738..77893af9a81 100644 --- a/addons/stock/models/stock_rule.py +++ b/addons/stock/models/stock_rule.py @@ -289,9 +289,9 @@ class StockRule(models.Model): existing_activity = self.env['mail.activity'].search([('res_id', '=', product_id.product_tmpl_id.id), ('res_model_id', '=', self.env.ref('product.model_product_template').id), ('note', '=', note)]) if not existing_activity: - # If the user deleted todo activity type. + # If the user deleted warning activity type. try: - activity_type_id = self.env.ref('mail.mail_activity_data_todo').id + activity_type_id = self.env.ref('mail.mail_activity_data_warning').id except: activity_type_id = False self.env['mail.activity'].create({