Skip to content

Commit

Permalink
Names in uppercase are quite ugly, lets make it in title format, corr…
Browse files Browse the repository at this point in the history
…ected version in manifest
  • Loading branch information
dkrimmer84 committed Jan 10, 2020
1 parent 1b38041 commit d2ff084
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions __manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
'maintainer': 'Odoo LoCo',
'website': 'https://github.com/odooloco',
'summary': 'Terceros Colombia: Extendido de Partner / '
'Modulo de Contactos - Odoo 11.0',
'Modulo de Contactos - Odoo 12.0',
'images': ['images/main_screenshot.png'],
'depends': [
'base',
Expand All @@ -51,4 +51,4 @@
'installable': True,
'application': True,
'auto_install': False,
}
}
18 changes: 9 additions & 9 deletions models/l10n_co_res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,16 @@ def _concat_name(self):
for item in nameList:
if item is not '':
formatedList.append(item)
self.name = ' ' .join(formatedList).upper()
self.name = ' ' .join(formatedList).title()
else:
# Some Companies are know for their Brand, which could conflict from the users point of view while
# searching the company (e.j. o2 = brand, Telefonica = Company)
if self.companyBrandName is not False:
delimiter = ', '
company_list = (self.companyBrandName, self.companyName)
self.name = delimiter.join(company_list).upper()
self.name = delimiter.join(company_list).title()
else:
self.name = self.companyName.upper()
self.name = self.companyName.title()

@api.onchange('name')
def onChangeName(self):
Expand Down Expand Up @@ -499,7 +499,7 @@ def onChangeNameUpper(self):
@return: void
"""
if self.x_name1 is not False:
self.x_name1 = self.x_name1.upper()
self.x_name1 = self.x_name1.title()

@api.onchange('x_name2')
def onChangeName2Upper(self):
Expand All @@ -509,7 +509,7 @@ def onChangeName2Upper(self):
@return: void
"""
if self.x_name2 is not False:
self.x_name2 = self.x_name2.upper()
self.x_name2 = self.x_name2.title()

@api.onchange('x_lastname1')
def onChangeLastNameUpper(self):
Expand All @@ -519,7 +519,7 @@ def onChangeLastNameUpper(self):
@return: void
"""
if self.x_lastname1 is not False:
self.x_lastname1 = self.x_lastname1.upper()
self.x_lastname1 = self.x_lastname1.title()


@api.onchange('x_lastname2')
Expand All @@ -530,7 +530,7 @@ def onChangeLastName2Upper(self):
@return: void
"""
if self.x_lastname2 is not False:
self.x_lastname2 = self.x_lastname2.upper()
self.x_lastname2 = self.x_lastname2.title()

@api.onchange('companyName')
def onChangeCompanyNUpper(self):
Expand All @@ -540,7 +540,7 @@ def onChangeCompanyNUpper(self):
@return: void
"""
if self.companyName is not False:
self.companyName = self.companyName.upper()
self.companyName = self.companyName.title()


@api.multi
Expand All @@ -563,4 +563,4 @@ def write(self, values):
return super(PartnerInfoExtended, self).write(values)


PartnerInfoExtended()
PartnerInfoExtended()

0 comments on commit d2ff084

Please sign in to comment.