diff --git a/asterisk_click2dial_crm/asterisk_click2dial_crm.py b/asterisk_click2dial_crm/asterisk_click2dial_crm.py index d77e00f..a4f2755 100644 --- a/asterisk_click2dial_crm/asterisk_click2dial_crm.py +++ b/asterisk_click2dial_crm/asterisk_click2dial_crm.py @@ -50,7 +50,7 @@ class res_partner_address(osv.osv): 'target': 'new', 'context': context, } - if user.propose_creation_crm_phonecall: + if user.context_propose_creation_crm_call: return action_start_wizard else: return True @@ -62,11 +62,14 @@ class res_users(osv.osv): _inherit = "res.users" _columns = { - 'propose_creation_crm_phonecall': fields.boolean('Propose to create a call in CRM after a click2dial'), + # Field name starts with 'context_' to allow modification by the user + # in his preferences, cf server-61/openerp/addons/base/res/res_users.py + # line 377 in "def write" of "class users" + 'context_propose_creation_crm_call': fields.boolean('Propose to create a call in CRM after a click2dial'), } _defaults = { - 'propose_creation_crm_phonecall': True, + 'context_propose_creation_crm_call': True, } res_users() diff --git a/asterisk_click2dial_crm/i18n/asterisk_click2dial_crm.pot b/asterisk_click2dial_crm/i18n/asterisk_click2dial_crm.pot index 5f33124..1eb5973 100644 --- a/asterisk_click2dial_crm/i18n/asterisk_click2dial_crm.pot +++ b/asterisk_click2dial_crm/i18n/asterisk_click2dial_crm.pot @@ -52,7 +52,7 @@ msgid "wizard.create.crm.phonecall" msgstr "" #. module: asterisk_click2dial_crm -#: field:res.users,propose_creation_crm_phonecall:0 +#: field:res.users,context_propose_creation_crm_call:0 msgid "Propose to create a call in CRM after a click2dial" msgstr "" diff --git a/asterisk_click2dial_crm/i18n/fr.po b/asterisk_click2dial_crm/i18n/fr.po index bc2d165..e6444fc 100644 --- a/asterisk_click2dial_crm/i18n/fr.po +++ b/asterisk_click2dial_crm/i18n/fr.po @@ -52,7 +52,7 @@ msgid "wizard.create.crm.phonecall" msgstr "wizard.create.crm.phonecall" #. module: asterisk_click2dial_crm -#: field:res.users,propose_creation_crm_phonecall:0 +#: field:res.users,context_propose_creation_crm_call:0 msgid "Propose to create a call in CRM after a click2dial" msgstr "Propose de créer un appel dans la CRM après un click2dial" diff --git a/asterisk_click2dial_crm/res_users_view.xml b/asterisk_click2dial_crm/res_users_view.xml index 1beff6a..d7b0f7c 100644 --- a/asterisk_click2dial_crm/res_users_view.xml +++ b/asterisk_click2dial_crm/res_users_view.xml @@ -15,7 +15,24 @@ - + + + + + + + asterisk.crm.preferences.option.view + res.users + + + + + + + +