From 4449718edd7136a9efec1bd03ab74d81ea9bfa0c Mon Sep 17 00:00:00 2001 From: Sengrith Date: Sat, 19 Dec 2020 15:12:58 +0700 Subject: [PATCH 1/2] [mail_multi_website] Fix reinstallion bug by add IF NOT EXISTS --- mail_multi_website/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mail_multi_website/__init__.py b/mail_multi_website/__init__.py index df93f13..853a0ee 100644 --- a/mail_multi_website/__init__.py +++ b/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([]): From c11da959b56efd568259be2739aa79f5c9eb3d61 Mon Sep 17 00:00:00 2001 From: Denis Mudarisov Date: Tue, 4 May 2021 21:04:31 +0500 Subject: [PATCH 2/2] :book: change version according to the update and cleanup --- mail_multi_website/__init__.py | 4 +++- mail_multi_website/__manifest__.py | 13 +------------ mail_multi_website/doc/changelog.rst | 5 +++++ 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/mail_multi_website/__init__.py b/mail_multi_website/__init__.py index 853a0ee..9e1e509 100644 --- a/mail_multi_website/__init__.py +++ b/mail_multi_website/__init__.py @@ -10,7 +10,9 @@ def post_init_hook(cr, registry): env = api.Environment(cr, SUPERUSER_ID, {}) - env.cr.execute("ALTER TABLE res_users ADD COLUMN IF NOT EXISTS 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([]): diff --git a/mail_multi_website/__manifest__.py b/mail_multi_website/__manifest__.py index 58dc602..6f09890 100644 --- a/mail_multi_website/__manifest__.py +++ b/mail_multi_website/__manifest__.py @@ -4,9 +4,8 @@ "name": """Multi-Brand Mailing""", "summary": """Use single Backend to manage several Websites""", "category": "Discuss", - # "live_test_url": "http://apps.it-projects.info/shop/product/website-multi-company?version=11.0", "images": ["images/main.jpg"], - "version": "11.0.1.0.0", + "version": "11.0.1.0.1", "application": False, "author": "IT-Projects LLC, Ivan Yelizariev", "support": "apps@itpp.dev", @@ -25,14 +24,4 @@ "uninstall_hook": "uninstall_hook", "auto_install": False, "installable": True, - # "demo_title": "Email Addresses per Website", - # "demo_addons": [ - # ], - # "demo_addons_hidden": [ - # ], - # "demo_url": "DEMO-URL", - # "demo_summary": "Use single Backend to manage several Websites", - # "demo_images": [ - # "images/MAIN_IMAGE", - # ] } diff --git a/mail_multi_website/doc/changelog.rst b/mail_multi_website/doc/changelog.rst index 5583eb3..d154cfe 100644 --- a/mail_multi_website/doc/changelog.rst +++ b/mail_multi_website/doc/changelog.rst @@ -1,3 +1,8 @@ +`1.0.1` +------- + +**Fix:** bug after reinstallation + `1.0.0` -------