19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:32:28 +01:00
parent 20ddc1b4a3
commit c0efcc53f5
1162 changed files with 125577 additions and 105287 deletions

View file

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import reset_account

View file

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
@ -6,7 +5,7 @@ from odoo import fields, models
from odoo.addons.microsoft_calendar.models.microsoft_sync import microsoft_calendar_token
class ResetMicrosoftAccount(models.TransientModel):
class MicrosoftCalendarAccountReset(models.TransientModel):
_name = 'microsoft.calendar.account.reset'
_description = 'Microsoft Calendar Account Reset'
@ -35,7 +34,7 @@ class ResetMicrosoftAccount(models.TransientModel):
if self.delete_policy in ('delete_microsoft', 'delete_both'):
for event in non_recurring_events:
event._microsoft_delete(event._get_organizer(), event.ms_organizer_event_id, timeout=3)
event._microsoft_delete(event._get_organizer(), event.microsoft_id, timeout=3)
if self.sync_policy == 'all':
events.with_context(dont_notify=True).update({
@ -50,6 +49,7 @@ class ResetMicrosoftAccount(models.TransientModel):
# We commit to make sure the _microsoft_delete are called when we still have a token on the user.
self.env.cr.commit()
self.user_id._set_microsoft_auth_tokens(False, False, 0)
self.user_id.write({
self.user_id.res_users_settings_id.write({
'microsoft_calendar_sync_token': False,
'microsoft_last_sync_date': False
})

View file

@ -13,7 +13,7 @@
<footer>
<button name="reset_account" string="Confirm" type="object" class="btn-primary" data-hotkey="q"/>
<button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="z" />
<button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="x" />
</footer>
</form>
</field>
@ -21,7 +21,6 @@
<record id="microsoft_calendar_reset_account_action" model="ir.actions.act_window">
<field name="name"></field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">microsoft.calendar.account.reset</field>
<field name="view_mode">form</field>
<field name="target">new</field>