diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-05-10 21:51:50 +0700 |
| commit | 3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch) | |
| tree | a44932296ef4a9b71d5f010906253d8c53727726 /addons/microsoft_calendar/__init__.py | |
| parent | 0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff) | |
initial commit 2
Diffstat (limited to 'addons/microsoft_calendar/__init__.py')
| -rw-r--r-- | addons/microsoft_calendar/__init__.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/addons/microsoft_calendar/__init__.py b/addons/microsoft_calendar/__init__.py new file mode 100644 index 00000000..ef909eb6 --- /dev/null +++ b/addons/microsoft_calendar/__init__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from . import controllers +from . import models +from . import utils +from . import wizard + +from odoo import api, SUPERUSER_ID +import uuid + + +def init_initiating_microsoft_uuid(cr, registry): + """ Sets the company name as the default value for the initiating + party name on all existing companies once the module is installed. """ + env = api.Environment(cr, SUPERUSER_ID, {}) + config_parameter = env['ir.config_parameter'].sudo() + microsoft_guid = config_parameter.get_param('microsoft_calendar.microsoft_guid', False) + if not microsoft_guid: + config_parameter.set_param('microsoft_calendar.microsoft_guid', str(uuid.uuid4())) |
