Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
4 Odpowiedzi
1296 Widoki

Hello.
we need to make (generate) an invoice, the par of most importance is a total price written in words, in our case Latvian language.
can someone help us to do it step by step?
or navigate us to a source code 

we have found a video on YouTube where is an explanation how to code a new (custom) report on Python

but we can`t figure out how to get there 

Awatar
Odrzuć

How to get where? Do you realize you are too ambiguous and general?

Najlepsza odpowiedź

Hi,
Seems you are looking to create report or modify the existing report. Just confirm the same, you will create a new one or just add amount in words to existing report.

If the second one is fine for you, ie, showing the amount in words in the existing report:


* Navigate to accounting settings
* Enable "Total amount of invoice in letters"
* Print the report




Once you enabled this option, invoice report will come with amount in words in it.

Thanks

Awatar
Odrzuć
Najlepsza odpowiedź

Hey! Adding a total price in words in Latvian can kinda be tricky but you can definitely do it with odoo. If you know a bit of Python and Odoo's framework, you're close to solving it.


First, create a custom module if you haven't done that yet. You'll be dealing with a report template, usually in QWeb for Odoo reports. The tough part? Converting numbers to words in Latvian. Write a Python function to tackle this, or if you're lucky, find an existing library that supports it.


Once you got your function sorted, tweak your QWeb template to use it and display the total in words. You might need to dive into Odoo’s docs and forums for tips on report customization. Peek at Python string manipulation guides too. And hey, don't worry if it gets overwhelming; Odoo’s logic can be weird. Believe me, I had to tweak this once, too.


you got this! Keep in mind this system is all about showing numbers in an understandable way to all users involved, aligning with business logic. Good luck!

Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

To print the total amount of the invoice in words , you can enable the options from
Accounting ->configuration->settings->customer invoices -> total amount in words



Hope it helps

Awatar
Odrzuć
Autor Najlepsza odpowiedź

in this link someone is coding in Python  https://www.youtube.com/watch?v=SkKAXURqNfQ&list=PLqRRLx0cl0hqclwqsT4cm8vkIU4NAj3uA 

my question is how to get to this source code, to create a custom invoice, what ambiguous in it ?

Awatar
Odrzuć
Autor

some how i do not have this option