This commit is contained in:
gsinghpal
2026-02-23 00:32:20 -05:00
parent d6bac8e623
commit e8e554de95
549 changed files with 1330 additions and 124935 deletions

View File

@@ -467,6 +467,40 @@ class RcConfig(models.Model):
'info',
)
def action_import_historical_faxes(self):
"""Trigger historical fax import in the background via cron."""
self.ensure_one()
self._ensure_token()
cron = self.env.ref(
'fusion_ringcentral.cron_rc_historical_fax_import',
raise_if_not_found=False,
)
if cron:
cron.sudo().write({
'active': True,
'nextcall': fields.Datetime.now(),
})
else:
self.env['ir.cron'].sudo().create({
'name': 'RingCentral: Historical Fax Import',
'cron_name': 'RingCentral: Historical Fax Import',
'model_id': self.env['ir.model']._get('fusion.fax').id,
'state': 'code',
'code': 'model._run_historical_fax_import()',
'interval_number': 9999,
'interval_type': 'days',
'nextcall': fields.Datetime.now(),
'active': True,
})
return self._notify(
'Fax Import Started',
'Historical fax import (12 months) is running in the background. '
'Check Fusion Connect > Faxes in a few minutes.',
'info',
)
def action_backfill_voicemail_media(self):
"""Re-download audio and transcriptions for voicemails missing them."""
self.ensure_one()