diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2022-08-10 17:27:33 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2022-08-10 17:27:33 +0700 |
| commit | 9cf24c42f596578a80df7e796b7d0a90a2ec798a (patch) | |
| tree | 4678298e0b3be949ef9d5ff511aeaf0421aa055b | |
| parent | e2c103c0db0a6768234edcee2ab43fd0f21fa462 (diff) | |
fix display name without internal reference
| -rw-r--r-- | vit_efaktur/wizard/pk.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vit_efaktur/wizard/pk.py b/vit_efaktur/wizard/pk.py index 6e3e824..e906346 100644 --- a/vit_efaktur/wizard/pk.py +++ b/vit_efaktur/wizard/pk.py @@ -343,11 +343,16 @@ class efaktur_pk_wizard(models.TransientModel): dpp = round(line['price_subtotal']) ppn = round(line['price_total']-line['price_subtotal']) dpp_satuan = round(dpp/jumlah_barang) + product_name = product_id.display_name + first_index = product_name.find("[") + second_index = product_name.find("]")+1 + str_will_replace = product_name[first_index:second_index] + display_name = product_name.replace(str_will_replace,"").strip() data = { 'FK': 'OF', 'KD_JENIS_TRANSAKSI': product_id.default_code or '', - 'FG_PENGGANTI': product_id.name or '', + 'FG_PENGGANTI': display_name or '', 'NOMOR_FAKTUR': dpp_satuan, 'MASA_PAJAK': jumlah_barang, 'TAHUN_PAJAK': harga_total, |
