summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-01-03 14:43:27 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-01-03 14:43:27 +0700
commit992f530f9da44716361b27e62458c82a8aca78e1 (patch)
tree1a9bb06e48a628fae5a38418dbe6bc0250304ce5
parent2a3adac9333c2bd5cb9f0dca3ba080cd3e6dfce8 (diff)
push
-rw-r--r--indoteknik_custom/models/coretax_fatur.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/indoteknik_custom/models/coretax_fatur.py b/indoteknik_custom/models/coretax_fatur.py
index a0820fee..426fb737 100644
--- a/indoteknik_custom/models/coretax_fatur.py
+++ b/indoteknik_custom/models/coretax_fatur.py
@@ -16,17 +16,17 @@ class CoretaxFaktur(models.Model):
'xmlns:xsi': "http://www.w3.org/2001/XMLSchema-instance",
'xsi:noNamespaceSchemaLocation': "TaxInvoice.xsd"
})
- ET.SubElement(root, 'TIN').text = 'xxxxxxxxxxxxxxxx'
+ ET.SubElement(root, 'TIN').text = '74.226.022.7-086.000'
# Tambahkan elemen ListOfTaxInvoice
list_of_tax_invoice = ET.SubElement(root, 'ListOfTaxInvoice')
# Dapatkan data faktur
inv_obj = self.env['account.move']
- invoices = inv_obj.search([('is_efaktur_exported','!=',True),
+ invoices = inv_obj.search([('is_efaktur_exported','=',True),
('state','=','posted'),
('efaktur_id','!=', False),
- ('move_type','=','out_invoice')])
+ ('move_type','=','out_invoice')], limit = 5)
for invoice in invoices:
tax_invoice = ET.SubElement(list_of_tax_invoice, 'TaxInvoice')
@@ -39,7 +39,7 @@ class CoretaxFaktur(models.Model):
ET.SubElement(tax_invoice, 'RefDesc')
ET.SubElement(tax_invoice, 'FacilityStamp')
ET.SubElement(tax_invoice, 'SellerIDTKU').text = '0000000000000000000000'
- ET.SubElement(tax_invoice, 'BuyerTin').text = 'xxxxxxxxxxxxxxxx'
+ ET.SubElement(tax_invoice, 'BuyerTin').text = invoice.partner_id.npwp or ''
ET.SubElement(tax_invoice, 'BuyerDocument').text = 'TIN'
ET.SubElement(tax_invoice, 'BuyerCountry').text = 'IND'
ET.SubElement(tax_invoice, 'BuyerEmail').text = invoice.partner_id.email or ''
@@ -50,9 +50,9 @@ class CoretaxFaktur(models.Model):
for line in invoice.invoice_line_ids:
good_service = ET.SubElement(list_of_good_service, 'GoodService')
ET.SubElement(good_service, 'Opt').text = 'A'
- ET.SubElement(good_service, 'Code').text = '000000'
+ ET.SubElement(good_service, 'Code').text = line.product_id.default_code
ET.SubElement(good_service, 'Name').text = line.name
- ET.SubElement(good_service, 'Unit').text = 'UM.0001'
+ ET.SubElement(good_service, 'Unit').text = 'UM.0018'
ET.SubElement(good_service, 'Price').text = str(line.price_unit)
ET.SubElement(good_service, 'Qty').text = str(line.quantity)
ET.SubElement(good_service, 'TotalDiscount').text = '100000'