[FIX] #1065 display_name does not display the address

This commit is contained in:
Christophe Combelles 2014-07-10 14:26:38 +03:00
parent 7b82d79932
commit 0050a3f797
1 changed files with 3 additions and 3 deletions

View File

@ -664,7 +664,7 @@ class DateTimeConverter(osv.AbstractModel):
if options and options.get('hide_seconds'):
pattern = pattern.replace(":ss", "").replace(":s", "")
return babel.dates.format_datetime(value, format=pattern, locale=locale)
class TextConverter(osv.AbstractModel):
@ -779,7 +779,7 @@ class MonetaryConverter(osv.AbstractModel):
lang_code = context.get('lang') or 'en_US'
lang = self.pool['res.lang']
formatted_amount = lang.format(cr, uid, [lang_code],
formatted_amount = lang.format(cr, uid, [lang_code],
fmt, Currency.round(cr, uid, display_currency, from_amount),
grouping=True, monetary=True)
@ -879,7 +879,7 @@ class Contact(orm.AbstractModel):
id = getattr(record, field_name).id
field_browse = self.pool[column._obj].browse(cr, openerp.SUPERUSER_ID, id, context={"show_address": True})
value = field_browse.display_name
value = field_browse.name_get()[0][1]
val = {
'name': value.split("\n")[0],