İçereği Atla
Odoo Menü
  • Portal
  • Ücretsiz deneyin
  • Uygulamalar
    Finans
    • Muhasebe
    • Faturalama
    • Masraf Yönetimi
    • Elektronik Çizelge (BI)
    • Belgeler
    • İmza
    Satış
    • Müşteri İlişkileri Yönetimi (CRM)
    • Satış
    • Satış Noktası Mağaza
    • Satış Noktası Restoran
    • Abonelikler
    • Kiralama
    Web Sitesi
    • Web Sitesi Oluşturucu
    • eTicaret
    • Blog
    • Forum
    • Canlı Sohbet
    • eÖğrenme
    Tedarik Zinciri
    • Envanter
    • Üretim
    • Ürün Yaşam Döngüsü Yönetimi
    • Satın Alma
    • Bakım
    • Kalite
    İnsan Kaynakları
    • Çalışanlar
    • İşe Alım
    • İzin
    • Değerlendirme
    • Referans
    • Filo Yönetimi
    Pazarlama
    • Sosyal Medyada Pazarlama
    • E-posta ile Pazarlama
    • SMS ile Pazarlama
    • Etkinlikler
    • Pazarlama Otomasyonu
    • Anket
    Hizmetler
    • Proje Yönetimi
    • Çalışma Çizelgeleri
    • Saha Hizmeti
    • Yardım Masası
    • Planlama
    • Randevular
    Verimlilik
    • Sohbet
    • Onay
    • Nesnelerin İnterneti
    • VoIP
    • Bilgi Bankası
    • WhatsApp
    Üçüncü taraf uygulamalar Odoo Stüdyo Odoo Bulut Platformu
  • Sektörler
    Perakende satış
    • Kitapçı
    • Giyim Mağazası
    • Mobilya Mağazası
    • Gıda Marketi
    • Hırdavat Dükkanı
    • Oyuncak Dükkanı
    Gıda ve Konaklama
    • Bar ve Pub
    • Restoran
    • Fast Food Restoranı
    • Konuk Evi
    • İçecek Distribütörü
    • Otel
    Gayrimenkul
    • Emlak Acentesi
    • Mimarlık Firması
    • İnşaat
    • Emlak Yönetimi
    • Bahçe Tasarımı
    • Mülk Sahipleri Derneği
    Uzmanlık
    • Muhasebe Firması
    • Odoo Partner
    • Pazarlama Ajansı
    • Hukuk Firması
    • Yetenek Kazanımı
    • Denetim ve Belgelendirme
    Üretim
    • Tekstil
    • Metal
    • Mobilyalar
    • Gıda
    • Bira fabrikası
    • Kurumsal Hediye
    Sağlık ve Spor
    • Spor Kulübü
    • Optik Mağazası
    • Fitness Merkezi
    • Sağlıklı Yaşam Merkezi
    • Eczane
    • Kuaför Salonu
    Ticaret
    • Tamirci
    • BT Donanım & Destek
    • Güneş Enerjisi Sistemleri
    • Ayakkabı İmalatçısı
    • Temizlik Hizmetleri
    • HVAC Hizmetleri
    Diğerleri
    • Kar Amacı Gütmeyen Kuruluş
    • Çevre Ajansı
    • Reklam Panosu Kiralama
    • Fotoğrafçılık
    • Bisiklet Kiralama
    • Yazılım Bayisi
    Tüm Sektörlere Göz Atın
  • Topluluk
    Öğrenim
    • Eğitim Araçları
    • Dokümantasyon
    • Sertifikasyonlar
    • Eğitim Etkinlikleri
    • Blog
    • Podcast
    Eğitim ve Gelişim
    • Eğitim Programı
    • Scale Up! İşletme Oyunu
    • Odoo'yu Ziyaret Edin
    Yazılım
    • İndirin
    • Sürümleri Kıyaslayın
    • Sürümler
    İş Birliği
    • Github
    • Forum
    • Etkinlikler
    • Çeviriler
    • Partner Olun
    • Partnerler için Hizmetler
    • Muhasebe Firmanızı Kaydettirin
    Hizmetler
    • Partner Bulun
    • Muhasebeci Bulun
    • Bir danışmanla görüşün
    • Kurulum Hizmetleri
    • Müşteri Referansları
    • Destek
    • Sürüm Yükseltme
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Demo randevusu alın
  • Fiyatlandırma
  • Yardım

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • Müşteri İlişkileri Yönetimi
  • e-Commerce
  • Muhasebe
  • Envanter
  • PoS
  • Proje Yönetimi
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiketler (View all)
odoo accounting v14 pos v15
About this forum
Yardım

How to Add Amount in Words / Text to Printed Invoice?

Abone Ol

Get notified when there's activity on this post

Bu soru işaretlendi
pdfinvoicereportprints
7 Cevaplar
33601 Görünümler
Avatar
Budi Hartono

 I am a beginner in programming both python and Odoo. I need a amount to text function that will display amount total in text in the printed invoice. I tried to follow this QWeb report tutorial: https://www.youtube.com/watch?v=tCAUm3MWYzk

Somehow I could create a module that modify the printed pdf. But I really don't have idea on how to put amount in text in the invoice PDF. I have searched the Odoo forum, only to find these guidances that failed to make me understand since I'm a noob:

https://www.odoo.com/forum/help-1/question/detailed-procedure-to-do-the-number-to-text-conversion-10504

https://www.odoo.com/forum/help-1/question/conversion-of-amount-to-text-in-openerp-43765

Here is the file content that modify the original report_invoice.xml. How to call the amount_to_text function in this report_invoice.xml below with the amount_to_text function that already exists in odoo/openerp/tools/amount_to_text.py?

addons/amount_text/views/report_invoice.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <template id="report_invoice_document_inherit" inherit_id="account.report_invoice_document">
            <xpath expr="//div[@class='page']/div[@class='row mt32 mb32']" position="replace">

<div class="row mt32 mb32">32 mb32']" position="replace">
                <div class="row mt32 mb32">
                  <div class="col-xs-2" t-if="o.name">
                      <strong>Keterangan:</strong>
                      <p t-field="o.name"/>
                  </div>
                  <div class="col-xs-2" t-if="o.date_invoice">
                      <strong>Tanggal Invoice:</strong>
                      <p t-field="o.date_invoice"/>
                  </div>
                  <div class="col-xs-2" t-if="o.origin">
                      <strong>Asal:</strong>
                      <p t-field="o.origin"/>
                  </div>
                  <div class="col-xs-2" t-if="o.partner_id.ref">
                      <strong>Kode Customer:</strong>
                      <p t-field="o.partner_id.ref"/>
                  </div>
                  <div class="col-xs-2" t-if="o.reference">
                      <strong>Referensi:</strong>
                      <p t-field="o.reference"/>
                  </div>
              </div>
            </xpath>
            <xpath expr="//table[@class='table table-condensed']" position="after">
            <p>
                <strong>Amount in Text:</strong>                
                <!-- <span t-esc="openerp.tools.amount_to_text(o.amount_total, 'usd')"/> -->
            </p>
            </xpath>
        </template>
    </data>
</openerp>

3
Avatar
Vazgeç
Herry prasetyo

  Pravitha thank you very much 

Susana Castillo

Thanks for sharing. 

Avatar
Zbik
En İyi Yanıt

You inherit class account_invoice() like this:

class account_invoice(models.Model):
    _inherit = "account.invoice"
   @api.multi
   def amount_to_text(self, amount, currency='Euro'):
       return amount_to_text(amount, currency)

call in xml

<span t-esc="o.amount_to_text(o.amount_total, 'Euro')"/> 


5
Avatar
Vazgeç
Avatar
Pravitha
En İyi Yanıt

 https://github.com/Pravithavarghese1/purchase_amount_to_text

inherit account_invoice():

from odoo.tools import amount_to_text_en

class AccountInvoice(models.Model):
_inherit = "account.invoice"
_description = "Invoice"

    @api.multi
def amount_to_text(self, amount, currency):
    convert_amount_in_words = amount_to_text_en.amount_to_text(amount, lang='en', currency='')
        convert_amount_in_words = convert_amount_in_words.replace(' and Zero Cent', ' Only ')  
        return convert_amount_in_words


In xml:

<span t-esc="o.amount_to_text(o.amount_total, o.currency_id)"/>
2
Avatar
Vazgeç
Avatar
Arafat Ali
En İyi Yanıt

For Odoo 10, you can get this free here: https://www.maxibi.com/prints-amount-text-english-using-odoo-free-module/

0
Avatar
Vazgeç
Wimpy

website maintenance, can you provide new link?

Avatar
bunny
En İyi Yanıt
<span t-esc="o.amount_to_text(o.amount_total, 'INR')"/> 
0
Avatar
Vazgeç
Avatar
B.hind
En İyi Yanıt

hi ,

when i try this code , it isn't working , i have this error

i dont  know how to solve it

File "/opt/odoo/addons/recu_facture/facture.py", line 23, in amount_to_text
    return amount_to_text(amount,currency)
QWebException: ""global name 'amount_to_text' is not defined" while evaluating
"o.amount_to_text(o.amount_total,'Euro')"" while evaluating
"translate_doc(doc_id, doc_model, 'partner_id.lang','recu_facture.recufacture_document')"
0
Avatar
Vazgeç
Pravitha

import amount_to_text from tools.

"from odoo.tools import amount_to_text"

Avatar
le_dilem
En İyi Yanıt

Hi,

https://github.com/ledilem/Odoo

0
Avatar
Vazgeç
Budi Hartono
Üretici

Thanks, I'll take a look

Avatar
Budi Hartono
Üretici En İyi Yanıt

Hi zbik,

Thanks a lot for your reply.

I did what you told, and I got this error.

QWebException: ""'account.invoice' object has no attribute 'amount_to_text'" while evaluating
"o.amount_to_text(o.amount_total, 'Euro')"" while evaluating
"translate_doc(doc_id, doc_model, 'partner_id.lang', 'account.report_invoice_document')"

FYI, these are the files in my modules:

amount_text folder:

views\report_invoice.xml
__init__.py
__openerp__.py
account_invoice.py
In the account_invoice.py

from openerp.tools import amount_to_text
class account_invoice(models.Model):
    _inherit = "account.invoice"
   @api.multi
   def amount_to_text(self, amount, currency='Euro'):
       return amount_to_text(amount, currency)

__init__.py

import account_invoice

__openerp__.py

{
   "name": "Amount Text",
    "version": "1.0.0",
    "depends": ["base"],
    "author": "Budi Hartono",
    "category": "",
    "description": """
    Amount to text.
    """,
    "website": "http://www.recoremedia.com",
    "depends": ["base"],
    "data": ["views/report_invoice.xml"],
    "installable": True,
    "active": False,
    #    "certificate": "",
}

views\report_invoice.xml
<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <template id="report_invoice_document_inherit" inherit_id="account.report_invoice_document">
            <xpath expr="//div[@class='page']/div[@class='row mt32 mb32']" position="replace">
                <div class="row mt32 mb32">
                  <div class="col-xs-2" t-if="o.name">
                      <strong>Keterangan:</strong>
                      <p t-field="o.name"/>
                  </div>
                  <div class="col-xs-2" t-if="o.date_invoice">
                      <strong>Tanggal Invoice:</strong>
                      <p t-field="o.date_invoice"/>
                  </div>
                  <div class="col-xs-2" t-if="o.origin">
                      <strong>Asal:</strong>
                      <p t-field="o.origin"/>
                  </div>
                  <div class="col-xs-2" t-if="o.partner_id.ref">
                      <strong>Kode Customer:</strong>
                      <p t-field="o.partner_id.ref"/>
                  </div>
                  <div class="col-xs-2" t-if="o.reference">
                      <strong>Referensi:</strong>
                      <p t-field="o.reference"/>
                  </div>
              </div>
            </xpath>
            <xpath expr="//table[@class='table table-condensed']" position="after">
            <p>
                <strong>Amount in Text:</strong>                
                <span t-esc="o.amount_to_text(o.amount_total, 'Euro')"/> 
            </p>
            </xpath>
        </template>
    </data>
</openerp>

0
Avatar
Vazgeç
Zbik

Try it: "depends": ["account", "report"]

Zbik

... in __openerp__.py and ... update your module.

Budi Hartono
Üretici

Hi zbik, Thanks, now it's working. You saved my live :) Anyway, I still have to add some import directives in the account_invoice.py to avoid further error messages: from openerp import api from openerp import models, fields

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Üye Ol
İlgili Gönderiler Cevaplar Görünümler Aktivite
Invoice on basic layout
pdf invoice qweb report
Avatar
0
Nis 24
2578
Can not print/preview account report (invoice) Çözüldü
pdf invoice report v14
Avatar
1
Mar 22
4306
Invoice PDF preview Issue
accounting pdf invoice report Odoo17
Avatar
Avatar
1
Eki 25
2543
PDF Invoice line overflow
pdf invoice
Avatar
Avatar
Avatar
2
Tem 25
1528
Quote PDF Spacing & Layout
pdf invoice
Avatar
Avatar
1
Ağu 25
2076
Topluluk
  • Eğitim Araçları
  • Dokümantasyon
  • Forum
Açık Kaynak
  • İndirin
  • Github
  • Runbot
  • Çeviriler
Hizmetler
  • Odoo.sh Hosting
  • Destek
  • Sürüm Yükseltme
  • Özel Geliştirmeler
  • Eğitim
  • Muhasebeci Bulun
  • Partner Bulun
  • Partner Olun
Hakkında
  • Şirketimiz
  • Pazarlama Gereçleri
  • İletişim
  • Kariyer
  • Etkinlikler
  • Podcast
  • Blog
  • Müşteriler
  • Hukuki • Gizlilik
  • Güvenlik
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo, müşteri ilişkileri yönetimi, eTicaret, muhasebe, envanter, satış noktası, proje yönetimi gibi şirketinizin tüm ihtiyaçlarını karşılayan bir açık kaynak işletme uygulamaları paketidir.

Odoo’nun eşsiz değer önermesi, aynı anda hem kullanımının çok kolay olup hem de tamamen entegre olmasıdır.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now