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
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
Daftar| Post Terkait | Replies | Tampilan | Aktivitas | |
|---|---|---|---|---|
|
1
Jan 22
|
4051 | |||
|
0
Jun 21
|
4689 | |||
|
3
Feb 24
|
7296 | |||
|
2 sequence combing for multiple company
Diselesaikan
|
2
Okt 23
|
4998 | ||
|
1
Apr 23
|
5894 |
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!