From 3baaebc9598f0c76a8bc0c136f150ffc876c561b Mon Sep 17 00:00:00 2001 From: Kevin Deldycke <kevin@nexedi.com> Date: Tue, 22 Feb 2005 09:41:54 +0000 Subject: [PATCH] Better text rendering git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2515 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/Telephone.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/product/ERP5/Document/Telephone.py b/product/ERP5/Document/Telephone.py index 5dced6da84..65d176be26 100755 --- a/product/ERP5/Document/Telephone.py +++ b/product/ERP5/Document/Telephone.py @@ -132,9 +132,15 @@ Mobile Phone, Fax, Remote Access, etc.).""" """ Returns the telephone number in standard format """ - text = "+%s(0)%s-%s" % (self.telephone_country - , self.telephone_area - , self.telephone_number) + text = '+' + if self.telephone_country != None: + text += self.telephone_country + text += '(0)' + if self.telephone_area != None: + text += self.telephone_area + text += '-' + if self.telephone_number != None: + text += self.telephone_number if text == '+(0)-' : return '' else: -- 2.30.9