Odoo Help

0

How to convert amount in words in canadian format????

By
R.sridevi
on 11/28/13, 6:16 AM 1,205 views

How to convert amount in words in canadian format????

whats the canadian format???

Omal Bastin
on 11/28/13, 6:22 AM

I mean in pricelist when i select amount in CAD....i want the amount in canadian format

R.sridevi
on 11/28/13, 6:28 AM
0

Omal Bastin

--Omal Bastin--
1176
| 6 6 8
Kochi, Kerala, India
--Omal Bastin--

Swiming deep into openERP/ODOO

Omal Bastin
On 11/28/13, 8:00 AM

in your python file import the following line

from openerp.tools import amount_to_text_en

Then create a function convert in your class in the file

def convert(self, amount, cur):
    amt_en = amount_to_text_en.amount_to_text(amount, 'en', cur)
    return amt_en

Here arguents are amount(float), language and currency. If you want to change the format again, then you can use any of the string operations like replace to replace the string we get from the amount_to_text() function

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 11/28/13, 6:16 AM
Seen: 1205 times
Last updated: 3/16/15, 8:10 AM