[MERGE] forward port of branch 7.0 up to 9066da3

This commit is contained in:
Denis Ledoux 2014-10-03 12:13:07 +02:00
commit cd6dba5257
2 changed files with 4 additions and 4 deletions

View File

@ -33,9 +33,9 @@ function openerp_pos_basewidget(instance, module){ //module is instance.point_of
amount = amount.toFixed(decimals);
}
if(this.currency.position === 'after'){
return amount + ' ' + this.currency.symbol;
return amount + ' ' + (this.currency.symbol || '');
}else{
return this.currency.symbol + ' ' + amount;
return (this.currency.symbol || '') + ' ' + amount;
}
}

View File

@ -333,11 +333,11 @@ class ir_translation(osv.osv):
AND name=%s""",
(lang or '', types, tools.ustr(name)))
res = cr.fetchone()
trad = res and tools.ustr(res[0]) or u''
trad = res and res[0] or u''
if source and not trad:
return tools.ustr(source)
# Remove control characters
return filter(lambda c: unicodedata.category(c) != 'Cc', trad)
return filter(lambda c: unicodedata.category(c) != 'Cc', tools.ustr(trad))
def create(self, cr, uid, vals, context=None):
if context is None: