Browse Source
[mail_multi_website] Fix reinstallion bug by add IF NOT EXISTS
pull/339/head
Sengrith
4 years ago
committed by
Denis Mudarisov
No known key found for this signature in database
GPG Key ID: B9AD74DAFB7B53DA
1 changed files with
1 additions and
1 deletions
-
mail_multi_website/__init__.py
|
|
@ -10,7 +10,7 @@ def post_init_hook(cr, registry): |
|
|
|
|
|
|
|
env = api.Environment(cr, SUPERUSER_ID, {}) |
|
|
|
|
|
|
|
env.cr.execute("ALTER TABLE res_users ADD COLUMN email_multi_website VARCHAR") |
|
|
|
env.cr.execute("ALTER TABLE res_users ADD COLUMN IF NOT EXISTS email_multi_website VARCHAR") |
|
|
|
|
|
|
|
# fill new email column with values from partner |
|
|
|
for user in env["res.users"].with_context(active_test=False).search([]): |
|
|
|