Odoo Help

Welcome!

This community 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.

0

Error amount total to words

By
B.hind
on 9/21/16, 8:26 AM 94 views

hi everyone,

i have problem in conversion amount total to words  in the invoice , 'amount_text' is the field that contain the value of conversion but it didn't get the amount total taxed , i will show u the code :

.py

amount_text=fields.Char('Total')
    @api.multi    def convert_to_text(self, amount,currency='Dirhams'):
           amount_fr = convertion.trad(amount,currency).upper()       

            return {'value': {'amount_text': amount_fr  }}

.xml

<xpath expr="//field[@name='amount_total']" position="replace">                         

<field name="amount_total" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary' options="{'currency_field': 'currency_id'}"  on_change="convert_to_text(amount_total)"/>
         </xpath>           

<field name="comment" position="before">               

<field name="amount_text"/>          

  </field>


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/21/16, 8:26 AM
Seen: 94 times
Last updated: 9/21/16, 3:23 PM