Incorrect amount_to_text_en.py
Bug #522192 reported by
Ivan Gudym
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Confirmed
|
Wishlist
|
OpenERP's Framework R&D |
Bug Description
amount_
To avoid confusion i propose to leave in amount_to_text.py "generic" functions only, and all localisation staff turn into amount_
Modules shouldn't direct use any "amount_to_text_XX" function, instead it should call generic amount_to_text.
Here is incorrect use from /account_
38 def convert(
39 amt_en = amount_
40 return amt_en
Changed in openobject-server: | |
assignee: | nobody → DHS(OpenERP) (dhs-openerp) |
Changed in openobject-server: | |
status: | New → Confirmed |
importance: | Undecided → Wishlist |
Changed in openobject-server: | |
assignee: | DHS(OpenERP) (dhs-openerp) → OpenERP's Framework R&D (openerp-dev-framework) |
To post a comment you must log in.
Usage in localisation module:
from amount_to_text_ua import amount_to_text_ua to_text import add_amount_ to_text_ function
from tools.amount_
add_amount_ to_text_ function( 'uk', amount_to_text_ua)
Using in localized report:
from tools.amount_ to_text import amount_to_text
class account_ invoice( report_ sxw.rml_ parse):
super( account_ invoice, self).__init__(cr, uid, name, context=context)
self.localcont ext.update( {
'convert' : self.convert,
def __init__(self, cr, uid, name, context):
'time': time,
})
def convert( self,amount) : to_text( amount, 'uk')
return amount_