Hi!
I inherited an invoice report, and now I want to display the total amount in words!
What method should I use and how do to use it in odoo v14 c ?
Thanks for your help!
Hi!
I inherited an invoice report, and now I want to display the total amount in words!
What method should I use and how do to use it in odoo v14 c ?
Thanks for your help!
https://www.odoo.com/forum/help-1/display-of-the-amount-in-letters-on-the-quotation-and-the-invoice-odoo-14-191622#answer-191626 Check this post for your reference
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيل| المنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
|---|---|---|---|---|
|
1
يناير 22
|
4128 | |||
|
0
يونيو 21
|
4766 | |||
|
3
فبراير 24
|
7383 | |||
|
2
أكتوبر 23
|
5105 | |||
|
1
أبريل 23
|
5934 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
Check this free module too: https://apps.odoo.com/apps/modules/14.0/jt_amount_in_words/
Thank you for sharing this, it's exactly what I needed!
@Niyas Raphy
I have used this code for my invoice report, and it worked:
from odoo import fields, models
class InvoiceOrder(models.Model):
_inherit = 'account.move'
# @api.multi
def _compute_amount_in_word(self):
for rec in self:
rec.num_word = str(rec.currency_id.amount_to_text(rec.amount_total))
num_word = fields.Char(string="Amount In Words:", compute='_compute_amount_in_word')
Now I want to do a unit test for this function, and still don't know how to do it!