From a027082cf170447884b3286a86ff186d8a669a51 Mon Sep 17 00:00:00 2001 From: Xavier Codinas Date: Mon, 24 Oct 2016 09:56:07 +0200 Subject: [PATCH] Add fax and phone URL issue3428 review29661002 --- contact_mechanism.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contact_mechanism.py b/contact_mechanism.py index 3e525e147e..fe33cd0579 100644 --- a/contact_mechanism.py +++ b/contact_mechanism.py @@ -71,7 +71,7 @@ class ContactMechanism(sequence_ordered(), ModelSQL, ModelView): 'get_value', setter='set_value') url = fields.Function(fields.Char('URL', states={ 'invisible': (~Eval('type').in_(['email', 'website', 'skype', - 'sip']) + 'sip', 'fax', 'phone']) | ~Eval('url')), }, depends=['type']), 'get_url') @@ -119,6 +119,10 @@ class ContactMechanism(sequence_ordered(), ModelSQL, ModelView): return 'callto:%s' % value elif self.type == 'sip': return 'sip:%s' % value + elif self.type == 'phone': + return 'tel:%s' % value + elif self.type == 'fax': + return 'fax:%s' % value return None @classmethod