-
-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] mail_template_multi_company: Migration to 18.0
- Loading branch information
1 parent
ba0a8c3
commit d5bd8f3
Showing
5 changed files
with
6 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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
from . import models | ||
|
||
|
||
def post_init_hook(cr, registry): | ||
def post_init_hook(env): | ||
"""We should not set the company by default on all existing mail templates | ||
when installing this module. Because many standard template need not be | ||
specialized by company. | ||
OTOH, when this module is installed it makes sense that new templates | ||
being created by users have a company set by default.""" | ||
cr.execute("UPDATE mail_template SET company_id=null") | ||
env.cr.execute("UPDATE mail_template SET company_id=null") |
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
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
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