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!
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Jan 22
|
1461 | ||
|
0
Jun 21
|
1674 | ||
|
3
Feb 24
|
3251 | ||
|
2
Oct 23
|
1761 | ||
|
1
Apr 23
|
2375 |
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!