Add methods to format number and symbol on Lang
and add format number with symbol on Report issue10730 review371831002
This commit is contained in:
+3
-5
@@ -549,11 +549,9 @@ class SaleOpportunityLine(sequence_ordered(), ModelSQL, ModelView):
|
||||
pool = Pool()
|
||||
Lang = pool.get('ir.lang')
|
||||
lang = Lang.get()
|
||||
return (lang.format(
|
||||
'%.*f', (self.unit.digits, self.quantity or 0))
|
||||
+ '%s %s @ %s' % (
|
||||
self.unit.symbol, self.product.rec_name,
|
||||
self.opportunity.rec_name))
|
||||
return (lang.format_number_symbol(
|
||||
self.quantity or 0, self.unit, digits=self.unit.digits)
|
||||
+ ' %s @ %s' % (self.product.rec_name, self.opportunity.rec_name))
|
||||
|
||||
@classmethod
|
||||
def search_rec_name(cls, name, clause):
|
||||
|
||||
Reference in New Issue
Block a user