Browse Source

[FIX] Tree view: display links on phone numbers

pull/155/head
Oury Baldé 7 years ago
parent
commit
5c2b7b82ea
  1. 5
      base_phone/static/src/js/phone_widget.js

5
base_phone/static/src/js/phone_widget.js

@ -130,7 +130,10 @@ openerp.base_phone = function (instance) {
if (value && this.widget === 'phone') { if (value && this.widget === 'phone') {
readable_space = formatInternational('', value); readable_space = formatInternational('', value);
readable_no_break_space = readable_space.replace(/\s/g, ' '); readable_no_break_space = readable_space.replace(/\s/g, ' ');
return readable_no_break_space;
return _.template("<a href='tel:<%-href%>'><%-text%></a>")({
href: readable_no_break_space,
text: readable_no_break_space
});
} }
return res; return res;
}; };

Loading…
Cancel
Save