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
Create an account today to enjoy exclusive features and engage with our awesome community!
Registrar-se| Related Posts | Respostes | Vistes | Activitat | |
|---|---|---|---|---|
|
1
de gen. 22
|
4081 | |||
|
0
de juny 21
|
4697 | |||
|
3
de febr. 24
|
7325 | |||
|
2
d’oct. 23
|
5045 | |||
|
1
d’abr. 23
|
5905 |
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!