forked from OCA/credit-control
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
overdue_reminder: link mails to res.partner
Advantages: 1) easy access to the history in the chatter of the partner. 2) no problem to access the email by other users (avoid "The requested operation cannot be completed due to security restrictions. Please contact your system administrator.") Migration script provided
- Loading branch information
1 parent
a6f5b04
commit 8d32b29
Showing
3 changed files
with
20 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
account_invoice_overdue_reminder/migrations/10.0.2.0.2/pre-migration.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2020 Akretion France (http://www.akretion.com/) | ||
# @author: Alexis de Lattre <alexis.delattre@akretion.com> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
|
||
def migrate(cr, version): | ||
if not version: | ||
return | ||
|
||
cr.execute(""" | ||
UPDATE mail_message SET | ||
res_id=overdue_reminder_action.commercial_partner_id, | ||
model='res.partner' | ||
FROM overdue_reminder_action, mail_mail | ||
WHERE overdue_reminder_action.mail_id=mail_mail.id | ||
AND mail_mail.mail_message_id = mail_message.id | ||
""") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters