@ -0,0 +1,3 @@
---Fields in module 'asterisk_click2dial'---
asterisk_click2dial / res.users / asterisk_chan_type (selection): selection_keys is now '['DAHDI', 'H323', 'IAX2', 'MGCP', 'SCCP', 'SIP', 'Skinny', 'Zap', 'mISDN']' ('['DAHDI', 'H323', 'IAX2', 'MGCP', 'PJSIP', 'SCCP', 'SIP', 'Skinny', 'Zap', 'mISDN']')
---XML records in module 'asterisk_click2dial'---
@ -0,0 +1,4 @@
# Done: post-migration. Mapped 'PJSIP' value to 'SIP' value
@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Eficent - Miquel Raich
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade
def map_asterisk_type_pjsip_sip(cr):
openupgrade.map_values(
cr,
openupgrade.get_legacy_name('asterisk_chan_type'),
'asterisk_chan_type',
[('PJSIP', 'SIP')],
table='res_users', write='sql')
@openupgrade.migrate()
def migrate(env, version):
map_asterisk_type_pjsip_sip(env.cr)
@ -0,0 +1,15 @@
# Copyright 2017 Eficent <http://www.eficent.com>
column_copies = {
'res_users': [
('asterisk_chan_type', None, None),
],
}
openupgrade.copy_columns(env.cr, column_copies)