summaryrefslogtreecommitdiff
path: root/vit_efaktur
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 17:14:58 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 17:14:58 +0700
commit1ca3b3df3421961caec3b747a364071c80f5c7da (patch)
tree6778a1f0f3f9b4c6e26d6d87ccde16e24da6c9d6 /vit_efaktur
parentb57188be371d36d96caac4b8d65a40745c0e972c (diff)
initial commit
Diffstat (limited to 'vit_efaktur')
-rw-r--r--vit_efaktur/__init__.py2
-rw-r--r--vit_efaktur/__manifest__.py85
-rw-r--r--vit_efaktur/__openerp__.py68
-rw-r--r--vit_efaktur/data/context_menu.xml22
-rw-r--r--vit_efaktur/data/cron.xml19
-rw-r--r--vit_efaktur/data/ir_sequence.xml147
-rw-r--r--vit_efaktur/data/parameters.xml24
-rw-r--r--vit_efaktur/model/__init__.py4
-rw-r--r--vit_efaktur/model/efaktur.py22
-rw-r--r--vit_efaktur/model/invoice.py50
-rw-r--r--vit_efaktur/model/partner.py53
-rw-r--r--vit_efaktur/model/product.py9
-rw-r--r--vit_efaktur/report/invoice.xml20
-rw-r--r--vit_efaktur/security/ir.model.access.csv9
-rw-r--r--vit_efaktur/static/description/icon.pngbin0 -> 11996 bytes
-rw-r--r--vit_efaktur/static/description/images/auto.pngbin0 -> 164062 bytes
-rw-r--r--vit_efaktur/static/description/images/efaktur.pngbin0 -> 11996 bytes
-rw-r--r--vit_efaktur/static/description/images/export-barang.pngbin0 -> 101229 bytes
-rw-r--r--vit_efaktur/static/description/images/export-fpk.pngbin0 -> 95315 bytes
-rw-r--r--vit_efaktur/static/description/images/export-partner.pngbin0 -> 131684 bytes
-rw-r--r--vit_efaktur/static/description/images/input-nsfp.pngbin0 -> 36016 bytes
-rw-r--r--vit_efaktur/static/description/images/intro.pngbin0 -> 108800 bytes
-rw-r--r--vit_efaktur/static/description/images/main_screenshot.jpgbin0 -> 22422 bytes
-rw-r--r--vit_efaktur/static/description/images/main_screenshot.pngbin0 -> 171441 bytes
-rw-r--r--vit_efaktur/static/description/index.html137
-rw-r--r--vit_efaktur/static/fpk.csv163
-rw-r--r--vit_efaktur/static/fpm.csv2
-rw-r--r--vit_efaktur/static/partner.csv0
-rw-r--r--vit_efaktur/static/pk.csv6
-rw-r--r--vit_efaktur/static/product.csv0
-rw-r--r--vit_efaktur/static/src/img/export.pngbin0 -> 1758 bytes
-rw-r--r--vit_efaktur/static/src/img/icontax.pngbin0 -> 15586 bytes
-rw-r--r--vit_efaktur/static/src/img/newtaxicon.jpgbin0 -> 34442 bytes
-rw-r--r--vit_efaktur/view/efaktur.xml160
-rw-r--r--vit_efaktur/view/invoice.xml45
-rw-r--r--vit_efaktur/view/invoice_supplier.xml45
-rw-r--r--vit_efaktur/view/partner.xml42
-rw-r--r--vit_efaktur/view/product.xml29
-rw-r--r--vit_efaktur/wizard/__init__.py7
-rw-r--r--vit_efaktur/wizard/assign.py35
-rw-r--r--vit_efaktur/wizard/assign.xml31
-rw-r--r--vit_efaktur/wizard/auto.py52
-rw-r--r--vit_efaktur/wizard/auto.xml42
-rw-r--r--vit_efaktur/wizard/generate.py28
-rw-r--r--vit_efaktur/wizard/generate.xml36
-rw-r--r--vit_efaktur/wizard/partner.py96
-rw-r--r--vit_efaktur/wizard/partner.xml54
-rw-r--r--vit_efaktur/wizard/pk.py340
-rw-r--r--vit_efaktur/wizard/pk.xml58
-rw-r--r--vit_efaktur/wizard/pm.py115
-rw-r--r--vit_efaktur/wizard/pm.xml51
-rw-r--r--vit_efaktur/wizard/product.py72
-rw-r--r--vit_efaktur/wizard/product.xml56
53 files changed, 2236 insertions, 0 deletions
diff --git a/vit_efaktur/__init__.py b/vit_efaktur/__init__.py
new file mode 100644
index 0000000..3143231
--- /dev/null
+++ b/vit_efaktur/__init__.py
@@ -0,0 +1,2 @@
+from . import model
+from . import wizard \ No newline at end of file
diff --git a/vit_efaktur/__manifest__.py b/vit_efaktur/__manifest__.py
new file mode 100644
index 0000000..c10eaa9
--- /dev/null
+++ b/vit_efaktur/__manifest__.py
@@ -0,0 +1,85 @@
+{
+ "name": "E-Faktur Management for Indonesia Tax",
+ "version": "1.11",
+ "depends": [
+ "account",
+ "stock",
+ "vit_kelurahan",
+ ],
+ 'images': ['static/description/images/main_screenshot.png'],
+ "author": "vitraining.com",
+ "website": "www.vitraining.com",
+ 'category': 'Accounting',
+ 'price':'30',
+ 'currency': 'USD',
+ "category": "Accounting",
+ "summary": "Manage, Export and Import, Tag Invoice with E-Faktur, the online tax management system for Indonesian companies",
+ "description": """\
+
+
+Version 1.11
+* bug fixed Export Product CSV
+* bug fixed Export Partner CSV
+* bug fixed Export FP. Masukan CSV
+
+Version 1.10
+* bug fixed invoice_date
+* bug fixed on download CSV
+
+
+Version 1.9
+* menu position
+* bug fixes invoice view
+
+Version 1.8
+* inv.invoice_date.month
+
+Version 1.7
+* Bugs fix on combined efaktur total DPP, referene invoice
+* Save file to binary field, not file on static folder
+
+Version 1.6
+* Bugs fix on combined efaktur total DPP
+
+Version 1.5
+* Bugs fix on combined efaktur
+
+Version 1.4
+* Multi invoice single efaktur
+
+Version 1.3
+* Encode utf8
+
+Version 1.2
+* Kawasan berikat
+
+Version 1.0
+* Pengelolaan eFaktur Pajak Indonesia
+* created menu:
+* created object
+* created views
+* logic:
+
+""",
+ "data": [
+ "security/ir.model.access.csv",
+ "wizard/generate.xml",
+ "wizard/product.xml",
+ "wizard/partner.xml",
+ "wizard/pk.xml",
+ "wizard/auto.xml",
+ "wizard/pm.xml",
+ "wizard/assign.xml",
+ "view/product.xml",
+ "view/efaktur.xml",
+ "view/partner.xml",
+ "view/invoice.xml",
+ "view/invoice_supplier.xml",
+ "report/invoice.xml",
+
+
+ ],
+ "application": True,
+ "installable": True,
+ "auto_install": False,
+} \ No newline at end of file
diff --git a/vit_efaktur/__openerp__.py b/vit_efaktur/__openerp__.py
new file mode 100644
index 0000000..6b5c81f
--- /dev/null
+++ b/vit_efaktur/__openerp__.py
@@ -0,0 +1,68 @@
+{
+ "name": "E-Faktur Management for Indonesia Tax",
+ "version": "1.7",
+ "depends": [
+ "account",
+ "stock",
+ "vit_kelurahan",
+ ],
+ 'images': ['static/description/images/main_screenshot.png'],
+ "author": "vitraining.com",
+ "website": "www.vitraining.com",
+ 'category': 'Accounting',
+ 'price':'30',
+ 'currency': 'USD',
+ "category": "Accounting",
+ "summary": "Manage, Export and Import, Tag Invoice with E-Faktur, the online tax management system for Indonesian companies",
+ "description": """\
+
+Version 1.7
+* Bugs fix on combined efaktur total DPP, referene invoice
+* Save file to binary field, not file on static folder
+
+Version 1.6
+* Bugs fix on combined efaktur total DPP
+
+Version 1.5
+* Bugs fix on combined efaktur
+
+Version 1.4
+* Multi invoice single efaktur
+
+Version 1.3
+* Encode utf8
+
+Version 1.2
+* Kawasan berikat
+
+Version 1.0
+* Pengelolaan eFaktur Pajak Indonesia
+* created menu:
+* created object
+* created views
+* logic:
+
+""",
+ "data": [
+ "security/ir.model.access.csv",
+ "wizard/generate.xml",
+ "wizard/product.xml",
+ "wizard/partner.xml",
+ "wizard/pk.xml",
+ "wizard/auto.xml",
+ "wizard/pm.xml",
+ "wizard/assign.xml",
+
+ "view/product.xml",
+ "view/efaktur.xml",
+ "view/partner.xml",
+ "view/invoice.xml",
+ "view/invoice_supplier.xml",
+ "report/invoice.xml",
+
+
+ ],
+ "application": True,
+ "installable": True,
+ "auto_install": False,
+} \ No newline at end of file
diff --git a/vit_efaktur/data/context_menu.xml b/vit_efaktur/data/context_menu.xml
new file mode 100644
index 0000000..1769d04
--- /dev/null
+++ b/vit_efaktur/data/context_menu.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<odoo>
+ <data>
+
+ <!-- context menu More.. di tree PO -->
+ <record id="action_assign_efaktur" model="ir.actions.server">
+ <field name="name">Assign E-Faktur</field>
+ <field name="condition">True</field>
+ <field name="model_id" ref="model_account_invoice"/>
+ <field name="state">code</field>
+ <field name="code">action = pool.get('account.move').action_assign_efaktur(cr, uid, context)</field>
+ </record>
+
+ <record id="ir_assign_efaktur_wizard" model="ir.values">
+ <field eval="'client_action_multi'" name="key2"/>
+ <field eval="'account.move'" name="model"/>
+ <field name="name"></field>
+ <field eval="'ir.actions.server,%d'%action_assign_efaktur" name="value"/>
+ </record>
+
+ </data>
+</odoo>
diff --git a/vit_efaktur/data/cron.xml b/vit_efaktur/data/cron.xml
new file mode 100644
index 0000000..443ba22
--- /dev/null
+++ b/vit_efaktur/data/cron.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<odoo>
+ <data>
+ <!-- scheduler : process import -->
+ <record forcecreate="True" model="ir.cron" id="process_import_invoice">
+ <field name="name">Read ca_pembayaran tabel from MySQL SPC and create payment voucher for the related invoice</field>
+ <field name="active">True</field>
+ <field name="user_id" ref="base.user_root"/>
+ <field name="interval_number">50</field>
+ <field name="interval_type">minutes</field>
+ <field name="numbercall">-1</field>
+ <field name="doall" eval="False"/>
+ <field name="model" eval="'account.voucher'"/>
+ <field name="function" eval="'cron_process_import'"/>
+ <field name="args" eval="'()'"/>
+ </record>
+
+ </data>
+</odoo> \ No newline at end of file
diff --git a/vit_efaktur/data/ir_sequence.xml b/vit_efaktur/data/ir_sequence.xml
new file mode 100644
index 0000000..1149ae4
--- /dev/null
+++ b/vit_efaktur/data/ir_sequence.xml
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<odoo>
+ <data>
+ <!-- UP -->
+ <record id="seq_type_sup" model="ir.sequence.type">
+ <field name="name">Surat UP Type</field>
+ <field name="code">anggaran.sup</field>
+ </record>
+
+ <record id="seq_sup" model="ir.sequence">
+ <field name="name">Surat UP</field>
+ <field name="code">anggaran.sup</field>
+ <field name="prefix">UP/%(year)s/%(month)s/</field>
+ <field name="padding">3</field>
+ <field name="next_number_actual">1</field>
+ <field name="number_increment">1</field>
+ <field name="implementation">standard</field>
+ </record>
+
+ <!-- SPP -->
+ <record id="seq_type_spp" model="ir.sequence.type">
+ <field name="name">Surat SPP Type</field>
+ <field name="code">anggaran.spp</field>
+ </record>
+
+ <record id="seq_spp" model="ir.sequence">
+ <field name="name">Surat SPP</field>
+ <field name="code">anggaran.spp</field>
+ <field name="prefix">SPP/%(year)s/%(month)s/</field>
+ <field name="padding">3</field>
+ <field name="next_number_actual">1</field>
+ <field name="number_increment">1</field>
+ <field name="implementation">standard</field>
+ </record>
+
+ <!-- SPM -->
+ <record id="seq_type_spm" model="ir.sequence.type">
+ <field name="name">Surat SPM Type</field>
+ <field name="code">anggaran.spm</field>
+ </record>
+
+ <record id="seq_spm" model="ir.sequence">
+ <field name="name">Surat SPM</field>
+ <field name="code">anggaran.spm</field>
+ <field name="prefix">SPM/%(year)s/%(month)s/</field>
+ <field name="padding">3</field>
+ <field name="next_number_actual">1</field>
+ <field name="number_increment">1</field>
+ <field name="implementation">standard</field>
+ </record>
+
+ <!-- SPTB -->
+ <record id="seq_type_sptb" model="ir.sequence.type">
+ <field name="name">Surat SPTB Type</field>
+ <field name="code">anggaran.sptb</field>
+ </record>
+
+ <record id="seq_sptb" model="ir.sequence">
+ <field name="name">Surat SPTB</field>
+ <field name="code">anggaran.sptb</field>
+ <field name="prefix">SPTB/%(year)s/%(month)s/</field>
+ <field name="padding">3</field>
+ <field name="next_number_actual">1</field>
+ <field name="number_increment">1</field>
+ <field name="implementation">standard</field>
+ </record>
+
+ <!-- Kas -->
+ <record id="seq_type_kas_in" model="ir.sequence.type">
+ <field name="name">Bukti Kas Masuk Type</field>
+ <field name="code">anggaran.kas.in</field>
+ </record>
+
+ <record id="seq_kas_in" model="ir.sequence">
+ <field name="name">Bukti Kas Masuk</field>
+ <field name="code">anggaran.kas.in</field>
+ <field name="prefix">KM/%(year)s/%(month)s/</field>
+ <field name="padding">3</field>
+ <field name="next_number_actual">1</field>
+ <field name="number_increment">1</field>
+ <field name="implementation">standard</field>
+ </record>
+
+ <record id="seq_type_kas_out" model="ir.sequence.type">
+ <field name="name">Bukti Kas Keluar Type</field>
+ <field name="code">anggaran.kas.out</field>
+ </record>
+
+ <record id="seq_kas_out" model="ir.sequence">
+ <field name="name">Bukti Kas Keluar</field>
+ <field name="code">anggaran.kas.out</field>
+ <field name="prefix">KK/%(year)s/%(month)s/</field>
+ <field name="padding">3</field>
+ <field name="next_number_actual">1</field>
+ <field name="number_increment">1</field>
+ <field name="implementation">standard</field>
+ </record>
+
+ <!-- Biaya -->
+ <record id="seq_type_biaya" model="ir.sequence.type">
+ <field name="name">Biaya Type</field>
+ <field name="code">anggaran.biaya</field>
+ </record>
+
+ <record id="seq_biaya" model="ir.sequence">
+ <field name="name">Biaya</field>
+ <field name="code">anggaran.biaya</field>
+ <field name="prefix">BI/%(year)s/%(month)s/</field>
+ <field name="padding">3</field>
+ <field name="next_number_actual">1</field>
+ <field name="number_increment">1</field>
+ <field name="implementation">standard</field>
+ </record>
+
+ <!-- Cashflow -->
+ <record id="seq_type_cashflow" model="ir.sequence.type">
+ <field name="name">Cashflow Type</field>
+ <field name="code">anggaran.cashflow</field>
+ </record>
+
+ <record id="seq_cashflow" model="ir.sequence">
+ <field name="name">Cashflow</field>
+ <field name="code">anggaran.cashflow</field>
+ <field name="prefix">CF/%(year)s/%(month)s/</field>
+ <field name="padding">3</field>
+ <field name="next_number_actual">1</field>
+ <field name="number_increment">1</field>
+ <field name="implementation">standard</field>
+ </record>
+
+ <!-- Investasi -->
+ <record id="seq_type_investasi" model="ir.sequence.type">
+ <field name="name">Investasi Type</field>
+ <field name="code">anggaran.investasi</field>
+ </record>
+
+ <record id="seq_investasi" model="ir.sequence">
+ <field name="name">Investasi</field>
+ <field name="code">anggaran.investasi</field>
+ <field name="prefix">INV/%(year)s/%(month)s/</field>
+ <field name="padding">3</field>
+ <field name="next_number_actual">1</field>
+ <field name="number_increment">1</field>
+ <field name="implementation">standard</field>
+ </record>
+ </data>
+</odoo> \ No newline at end of file
diff --git a/vit_efaktur/data/parameters.xml b/vit_efaktur/data/parameters.xml
new file mode 100644
index 0000000..8807305
--- /dev/null
+++ b/vit_efaktur/data/parameters.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<odoo>
+ <data>
+
+ <record model="ir.config_parameter" id="spc_hostname">
+ <field name="key">spc.hostname</field>
+ <field name="value">127.0.0.1</field>
+ </record>
+ <record model="ir.config_parameter" id="spc_dbname">
+ <field name="key">spc.dbname</field>
+ <field name="value">spc</field>
+ </record>
+
+ <record model="ir.config_parameter" id="spc_username">
+ <field name="key">spc.username</field>
+ <field name="value">root</field>
+ </record>
+
+ <record model="ir.config_parameter" id="spc_password">
+ <field name="key">spc.password</field>
+ <field name="value">1234</field>
+ </record>
+ </data>
+</odoo>
diff --git a/vit_efaktur/model/__init__.py b/vit_efaktur/model/__init__.py
new file mode 100644
index 0000000..c20b76c
--- /dev/null
+++ b/vit_efaktur/model/__init__.py
@@ -0,0 +1,4 @@
+from . import efaktur
+from . import product
+from . import invoice
+from . import partner
diff --git a/vit_efaktur/model/efaktur.py b/vit_efaktur/model/efaktur.py
new file mode 100644
index 0000000..64cf430
--- /dev/null
+++ b/vit_efaktur/model/efaktur.py
@@ -0,0 +1,22 @@
+from odoo import api, fields, models, _
+
+class efaktur(models.Model):
+ _name = 'vit.efaktur'
+
+ name = fields.Char("eFaktur Number", required=True)
+ year = fields.Integer(string="Year", required=True, )
+
+ invoice_ids = fields.One2many(comodel_name="account.move",
+ inverse_name="efaktur_id",
+ string="Invoices", required=False, )
+
+ @api.depends('invoice_ids')
+ def _used(self):
+ for efaktur in self:
+ if efaktur.invoice_ids:
+ efaktur.is_used = True
+ else:
+ efaktur.is_used = False
+
+
+ is_used = fields.Boolean(string="Is Used", compute="_used", store=True)
diff --git a/vit_efaktur/model/invoice.py b/vit_efaktur/model/invoice.py
new file mode 100644
index 0000000..0c17058
--- /dev/null
+++ b/vit_efaktur/model/invoice.py
@@ -0,0 +1,50 @@
+from odoo import api, fields, models, _
+
+class AccountMove(models.Model):
+ _name = 'account.move'
+ _inherit = 'account.move'
+
+ efaktur_id = fields.Many2one(comodel_name="vit.efaktur", string="Faktur Pajak", required=False, )
+ is_efaktur_exported = fields.Boolean(string="Is eFaktur Exported", )
+ date_efaktur_exported = fields.Datetime(string="eFaktur Exported Date", required=False, )
+
+ # masa_pajak = fields.Char(string="Masa Pajak", required=False, compute="_masa_pajak" )
+ # tahun_pajak = fields.Char(string="Tahun Pajak", required=False, compute="_tahun_pajak")
+
+ masa_pajak = fields.Char(string="Masa Pajak", required=False)
+ tahun_pajak = fields.Char(string="Tahun Pajak", required=False)
+
+ efaktur_masukan = fields.Char(string="Nomor Seri Faktur Pajak", required=False, )
+ is_berikat = fields.Boolean(string="Kawasan Berikat?", related="partner_id.is_berikat" )
+ prefix_berikat = fields.Char(string="Prefix NSFP", compute="_get_prefix_berikat" )
+
+ @api.depends("is_berikat")
+ def _get_prefix_berikat(self):
+ for rec in self:
+ if rec.is_berikat:
+ rec.prefix_berikat = '070'
+ else:
+ rec.prefix_berikat = ''
+
+ # @api.depends("invoice_date")
+ # def _masa_pajak(self):
+ # for inv in self:
+ # if inv.invoice_date:
+ # d = inv.invoice_date.month
+ # # d = inv.invoice_date.split("-")
+ # inv.masa_pajak = str(d)
+
+ # @api.depends("invoice_date")
+ # def _tahun_pajak(self):
+ # for inv in self:
+ # if inv.invoice_date:
+ # d = inv.invoice_date.year
+ # # d = inv.invoice_date.split("-")
+ # inv.tahun_pajak = str(d)
+
+ # @api.multi
+ def action_invoice_open(self):
+ res = super(invoice, self).action_invoice_open()
+ if self:
+ self.is_efaktur_exported=False
+ return res
diff --git a/vit_efaktur/model/partner.py b/vit_efaktur/model/partner.py
new file mode 100644
index 0000000..fec0729
--- /dev/null
+++ b/vit_efaktur/model/partner.py
@@ -0,0 +1,53 @@
+from odoo import api, fields, models, _
+
+class partner(models.Model):
+ _name = 'res.partner'
+ _inherit = 'res.partner'
+
+ is_efaktur_exported = fields.Boolean(string="Is eFaktur Exported", )
+ date_efaktur_exported = fields.Datetime(string="eFaktur Exported Date", required=False, )
+
+ npwp = fields.Char(string="NPWP", required=False)
+ blok = fields.Char(string="Blok", required=False)
+ nomor = fields.Char(string="Nomor", required=False)
+ rt = fields.Char(string="RT", required=False)
+ rw = fields.Char(string="RW", required=False)
+
+ nama_wajib_pajak = fields.Char(string="Nama Wajib Pajak")
+ is_berikat = fields.Boolean(string="Kawasan Berikat?", )
+
+
+ @api.depends("street","street2","city","state_id", "country_id","blok","nomor","rt","rw","kelurahan_id","kecamatan_id")
+ def _alamat_lengkap(self):
+ for partner in self:
+ lengkap = partner.street or ""
+ lengkap += " " + (partner.street2 or '')
+
+ if partner.blok:
+ lengkap += " Blok: " + partner.blok + ", "
+ if partner.nomor:
+ lengkap += " Nomor: " + partner.nomor + ", "
+
+ if partner.rt:
+ lengkap += " RT: " + partner.rt
+ if partner.rw:
+ lengkap += " RW: " + partner.rw
+
+ if partner.kelurahan_id:
+ lengkap += " Kel: " + partner.kelurahan_id.name + ","
+
+ if partner.kecamatan_id:
+ lengkap += " Kec: " + partner.kecamatan_id.name
+
+ if partner.kota_id:
+ lengkap += """
+ """ + partner.kota_id.name + ","
+
+ if partner.state_id:
+ lengkap += " " + partner.state_id.name
+
+ partner.alamat_lengkap = lengkap.upper()
+
+ alamat_lengkap = fields.Char(string="Alamat Lengkap", required=False, compute="_alamat_lengkap")
+ alamat_lengkap_text = fields.Text(string="Alamat Lengkap", required=False)
+
diff --git a/vit_efaktur/model/product.py b/vit_efaktur/model/product.py
new file mode 100644
index 0000000..5413b09
--- /dev/null
+++ b/vit_efaktur/model/product.py
@@ -0,0 +1,9 @@
+from odoo import api, fields, models, _
+
+class product(models.Model):
+ _name = 'product.template'
+ _inherit = 'product.template'
+
+ is_efaktur_exported = fields.Boolean(string="Is eFaktur Exported", )
+ date_efaktur_exported = fields.Datetime(string="eFaktur Exported Date", required=False, )
+
diff --git a/vit_efaktur/report/invoice.xml b/vit_efaktur/report/invoice.xml
new file mode 100644
index 0000000..963e414
--- /dev/null
+++ b/vit_efaktur/report/invoice.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+
+ <template id="vit_inv_efaktur" inherit_id="account.report_invoice_document">
+
+ <xpath expr="//table" position="before">
+ <div class="row mt32 mb32">
+ <div name="nomor_efaktur" class="col-xs-5" t-if="o.efaktur_id">
+ <strong>NSFP:</strong>
+ <span t-raw="o.prefix_berikat"/> <span t-raw="o.efaktur_id.name"/>
+ </div>
+ </div>
+
+ </xpath>
+
+ </template>
+
+ </data>
+</odoo> \ No newline at end of file
diff --git a/vit_efaktur/security/ir.model.access.csv b/vit_efaktur/security/ir.model.access.csv
new file mode 100644
index 0000000..88a3fb0
--- /dev/null
+++ b/vit_efaktur/security/ir.model.access.csv
@@ -0,0 +1,9 @@
+"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
+access_vit_efaktur,access_vit_efaktur,model_vit_efaktur,,1,0,0,0
+access_vit_efaktur_admin,access_vit_efaktur_admin,model_vit_efaktur,account.group_account_manager,1,1,1,1
+access_vit_assign_wizard_accounting,access_vit_assign_wizard_accounting,model_vit_assign_wizard,account.group_account_manager,1,1,1,1
+access_vit_efaktur_auto_accounting,access_vit_efaktur_auto_accounting,model_vit_efaktur_auto,account.group_account_manager,1,1,1,1
+access_vit_generate_efaktur_accounting,access_vit_generate_efaktur_accounting,model_vit_generate_efaktur,account.group_account_manager,1,1,1,1
+access_vit_efaktur_pk_accounting,access_vit_efaktur_pk_accounting,model_vit_efaktur_pk,account.group_account_manager,1,1,1,1
+access_vit_efaktur_pm_accounting,access_vit_efaktur_pm_accounting,model_vit_efaktur_pm,account.group_account_manager,1,1,1,1
+access_vit_efaktur_product_accounting,access_vit_efaktur_product_accounting,model_vit_efaktur_product,account.group_account_manager,1,1,1,1
diff --git a/vit_efaktur/static/description/icon.png b/vit_efaktur/static/description/icon.png
new file mode 100644
index 0000000..45d065b
--- /dev/null
+++ b/vit_efaktur/static/description/icon.png
Binary files differ
diff --git a/vit_efaktur/static/description/images/auto.png b/vit_efaktur/static/description/images/auto.png
new file mode 100644
index 0000000..ed51063
--- /dev/null
+++ b/vit_efaktur/static/description/images/auto.png
Binary files differ
diff --git a/vit_efaktur/static/description/images/efaktur.png b/vit_efaktur/static/description/images/efaktur.png
new file mode 100644
index 0000000..45d065b
--- /dev/null
+++ b/vit_efaktur/static/description/images/efaktur.png
Binary files differ
diff --git a/vit_efaktur/static/description/images/export-barang.png b/vit_efaktur/static/description/images/export-barang.png
new file mode 100644
index 0000000..6c3f5cc
--- /dev/null
+++ b/vit_efaktur/static/description/images/export-barang.png
Binary files differ
diff --git a/vit_efaktur/static/description/images/export-fpk.png b/vit_efaktur/static/description/images/export-fpk.png
new file mode 100644
index 0000000..0bcd12a
--- /dev/null
+++ b/vit_efaktur/static/description/images/export-fpk.png
Binary files differ
diff --git a/vit_efaktur/static/description/images/export-partner.png b/vit_efaktur/static/description/images/export-partner.png
new file mode 100644
index 0000000..801ec0e
--- /dev/null
+++ b/vit_efaktur/static/description/images/export-partner.png
Binary files differ
diff --git a/vit_efaktur/static/description/images/input-nsfp.png b/vit_efaktur/static/description/images/input-nsfp.png
new file mode 100644
index 0000000..c2a745d
--- /dev/null
+++ b/vit_efaktur/static/description/images/input-nsfp.png
Binary files differ
diff --git a/vit_efaktur/static/description/images/intro.png b/vit_efaktur/static/description/images/intro.png
new file mode 100644
index 0000000..7162992
--- /dev/null
+++ b/vit_efaktur/static/description/images/intro.png
Binary files differ
diff --git a/vit_efaktur/static/description/images/main_screenshot.jpg b/vit_efaktur/static/description/images/main_screenshot.jpg
new file mode 100644
index 0000000..c98d5f3
--- /dev/null
+++ b/vit_efaktur/static/description/images/main_screenshot.jpg
Binary files differ
diff --git a/vit_efaktur/static/description/images/main_screenshot.png b/vit_efaktur/static/description/images/main_screenshot.png
new file mode 100644
index 0000000..a0677c7
--- /dev/null
+++ b/vit_efaktur/static/description/images/main_screenshot.png
Binary files differ
diff --git a/vit_efaktur/static/description/index.html b/vit_efaktur/static/description/index.html
new file mode 100644
index 0000000..6ce1b3e
--- /dev/null
+++ b/vit_efaktur/static/description/index.html
@@ -0,0 +1,137 @@
+
+<section class="oe_container">
+ <div class="oe_row oe_spaced">
+ <h2 class="oe_slogan" style="color:#875A7B;">Introduction</h2>
+
+ <h3 class="oe_slogan" style="width:80%">
+ Module ini gunanya untuk mengeset Invoice dengan Nomor Seri Faktur Pajak
+ untuk keperluan Export ke Aplikasi E-Faktur DJP
+ sehingga tidak perlu input ulang untuk mengeluarkan E-Faktur.
+ </h3>
+
+ <div class="oe_picture" style="margin:8px; text-align:center">
+ <a target="_new" href="https://www.youtube.com/playlist?list=PLNl8QwXqW_ltDtmwTbhl7HYbAALnjX2-I">
+ <img src="images/intro.png"/>
+ </a>
+ </div>
+
+ <div class="oe_span10 text-justify">
+ <p class="oe_mb32" style="margin:8px;">
+ Addons ini bisa anda peroleh secara gratis jika mengikuti Training Odoo
+ di <a href="http://vitraining.com">vitraining.com</a>
+ maupun di Google Play.
+ </p>
+ </div>
+ </div>
+</section>
+
+<section class="oe_container oe_dark">
+ <div class="oe_row oe_spaced">
+ <h2 class="oe_slogan" style="color:#875A7B;">Input Nomor Seri Faktur Pajak</h2>
+ <!--h3 class="oe_slogan">Run your MLM business with specific Business Plan</h3-->
+
+ <div class="oe_span4 text-justify">
+ <p class="oe_mb32" style="margin:8px;">
+ Langkah pertama dalam menggunakan addons E-Faktur adalah memasukkan data Nomor Seri Faktur Pajak yang sudah kita dapatkan dari Kantor Pajak terdekat
+ dan yang selama ini digunakan untuk menerbitkan Faktur Pajak di aplikasi E-Faktur.
+ </p>
+ </div>
+ <div class="oe_span8">
+ <img class="oe_demo oe_picture oe_screenshot" style="margin:0px" src="images/input-nsfp.png"/>
+ </div>
+ </div>
+</section>
+
+<section class="oe_container">
+ <div class="oe_row oe_spaced">
+ <h2 class="oe_slogan" style="color:#875A7B;">Export Barang/Jasa</h2>
+
+ <div class="oe_span4 text-justify">
+ <p class="oe_mb32" style="margin:8px;">
+ Sebelum bisa meng-export data faktur pajak, kita perlu export dulu data master barang yang diperlukan pada aplikasi E-Faktur.
+ </p>
+ <p class="oe_mb32" style="margin:8px;">
+ Addons E-Faktur sudah menyediakan fasilitas export data produk ke file CSV yang formatnya sudah sesuai dengan yang diminta aplikasi E-Faktur.
+ </p>
+ </div>
+ <div class="oe_span8">
+ <img class="oe_demo oe_picture oe_screenshot" style="margin:0px" src="images/export-barang.png"/>
+ </div>
+
+ </div>
+
+</section>
+
+<section class="oe_container oe_dark">
+ <div class="oe_row oe_spaced">
+ <h2 class="oe_slogan" style="color:#875A7B;">Export Lawan Transaksi</h2>
+ <div class="oe_span4 text-justify">
+ <p class="oe_mb32" style="margin:8px;">
+ Berikutnya, sebelum bisa meng-export data faktur pajak, kita perlu export dulu data master
+ Partner yang diperlukan pada aplikasi E-Faktur.
+ </p>
+ <p class="oe_mb32" style="margin:8px;">
+ Addons E-Faktur sudah menyediakan fasilitas export data partner ke file CSV yang
+ formatnya sudah sesuai dengan yang diminta aplikasi E-Faktur.
+ </p>
+ </div>
+ <div class="oe_span8">
+ <img class="oe_demo oe_picture oe_screenshot" style="margin:0px" src="images/export-partner.png"/>
+ </div>
+
+
+ </div>
+</section>
+
+<section class="oe_container">
+ <div class="oe_row oe_spaced">
+ <h2 class="oe_slogan" style="color:#875A7B;">Export Faktur Pajak Keluaran</h2>
+ <div class="oe_span4">
+ <p class="oe_mb32" style="margin:8px;">
+ Setelah semua invoice di-link dengan Nomor Seri Faktur Pajak, maka dapat diexport
+ untuk diimport ke Aplikasi E-Faktur sebagai Faktur Pajak Keluaran.
+ </p>
+ </div>
+ <div class="oe_span8">
+ <img class="oe_demo oe_picture oe_screenshot" style="margin:0px" src="images/export-fpk.png"/>
+ </div>
+
+ </div>
+</section>
+
+<section class="oe_container oe_dark">
+ <div class="oe_row oe_spaced">
+ <h2 class="oe_slogan" style="color:#875A7B;">Auto Numbering</h2>
+ <div class="oe_span4">
+ <p class="oe_mb32" style="margin:8px;">
+ Untuk perusahaan yang invoice-nya udah mencapai ratusan atau bahkan ribuan per hari,
+ adalah tidak mungkin lagi mengeset nomor faktur untuk setiap invoice satu per satu.
+ </p>
+ <p class="oe_mb32" style="margin:8px;">
+ Oleh karena itu, perlu dibuatkan fasilitas tersendiri untuk bisa secara otomatis mengeset invoice dengan nomor faktur.
+ </p>
+ </div>
+ <div class="oe_span8">
+ <img class="oe_demo oe_picture oe_screenshot" style="margin:0px" src="images/auto.png"/>
+ </div>
+
+
+ </div>
+</section>
+
+<section class="oe_container">
+ <div class="oe_row oe_spaced">
+
+ <h2 class="oe_slogan" style="width:70%;color:#875A7B;">Contact and Support</h2>
+ <h3 class="oe_span10 oe_slogan">
+ Contact Us: info[at]vitraining.com<br/>
+ Facebook : <a href="https://www.facebook.com/trainingOdoo/">www.facebook.com/trainingOdoo</a><br/>
+ YouTube: <a href="https://www.youtube.com/channel/UCfLiSpb5nKcurnRIZse8zgA">www.youtube.com/channel/UCfLiSpb5nKcurnRIZse8zgA</a><br/>
+ Web: <a href="http://shop.vitraining.com">shop.vitraining.com</a>
+ </h3>
+
+ </div>
+</section>
+
+<section class="oe_container oe_separator">
+</section> \ No newline at end of file
diff --git a/vit_efaktur/static/fpk.csv b/vit_efaktur/static/fpk.csv
new file mode 100644
index 0000000..97f6c94
--- /dev/null
+++ b/vit_efaktur/static/fpk.csv
@@ -0,0 +1,163 @@
+FK,KD_JENIS_TRANSAKSI,FG_PENGGANTI,NOMOR_FAKTUR,MASA_PAJAK,TAHUN_PAJAK,TANGGAL_FAKTUR,NPWP,NAMA,ALAMAT_LENGKAP,JUMLAH_DPP,JUMLAH_PPN,JUMLAH_PPNBM,ID_KETERANGAN_TAMBAHAN,FG_UANG_MUKA,UANG_MUKA_DPP,UANG_MUKA_PPN,UANG_MUKA_PPNBM,REFERENSI
+LT,NPWP,NAMA,JALAN,BLOK,NOMOR,RT,RW,KECAMATAN,KELURAHAN,KABUPATEN,PROPINSI,KODE_POS,NOMOR_TELEPON,,,,,
+OF,KODE_OBJEK,NAMA,HARGA_SATUAN,JUMLAH_BARANG,HARGA_TOTAL,DISKON,DPP,PPN,TARIF_PPNBM,PPNBM,,,,,,,,
+FK,01,0,0061802514215,11,2018,30/11/2018,010619963092000,PT. SUZUKI INDOMOBIL MOTOR,JL. RAYA BEKASI KM.19 RT.009 RW.001 RAWA TERATE CAKUNG JAKARTA TIMUR DKI JAKARTA ,287583763,28758376,0,,0,0,0,0,"INV/2018/2216,INV/2018/2103,INV/2018/2238,INV/2018/2093,INV/2018/1946,INV/2018/1947,INV/2018/1921,INV/2018/1918"
+FAPR,PT Caturindo Agungjaya Rubber,"JL. RUMAH SAKIT NO. 82 - 88 UJUNGBERUNG, PAKEMITAN, CINAMBO JAWA BARAT",,,,,,,,,,,,,,,,
+OF,SIM012,09321-10023#CUSHION FRONT HOOD LOCK,823.0,1080.0,888840.0,0,888840.0,88884.0,0,0,,,,,,,,
+OF,ISI026,72231-77501#FLAP FRONT MUD,9999.0,60.0,599940.0,0,599940.0,59994.0,0,0,,,,,,,,
+OF,ISI027,72232-77572#FLAP REAR MUD,10597.0,280.0,2967160.0,0,2967160.0,296716.0,0,0,,,,,,,,
+OF,ISI028,17871-73R00#HOSE HTR INLET,12009.0,300.0,3602700.0,0,3602700.0,360270.0,0,0,,,,,,,,
+OF,ISI028,17871-73R00#HOSE HTR INLET,11297.0,220.0,2485340.0,0,2485340.0,248534.0,0,0,,,,,,,,
+OF,ISI029,17872-73R0#HOSE HTR OUTLET,11543.0,220.0,2539460.0,0,2539460.0,253946.0,0,0,,,,,,,,
+OF,ISI017,SIM.35153-65J00#GROMMET REAR COMB LAMP,662.0,480.0,317760.0,0,317760.0,31776.0,0,0,,,,,,,,
+OF,SIM020,89445-60G10-00#PROTECTOR TANK FLANGE,1402.0,576.0,807552.0,0,807552.0,80755.20000000001,0,0,,,,,,,,
+OF,ISI014,37275-67L00#CAP CGLTR HOLE,700.0,192.0,134400.0,0,134400.0,13440.0,0,0,,,,,,,,
+OF,ISI030,09321-07003#CUSHION FRONT HOOD,2928.0,468.0,1370304.0,0,1370304.0,137030.4,0,0,,,,,,,,
+OF,ISI031,09321-07003#CUSHION FRONT HOOD (copy),5054.0,468.0,2365272.0,0,2365272.0,236527.2,0,0,,,,,,,,
+OF,SIM032,13881-85R00#BOOT AIR CLEANER,11644.0,48.0,558912.0,0,558912.0,55891.200000000004,0,0,,,,,,,,
+OF,ISI016,SIM.34955-70K00-000#BUSH EPI BRKT,484.0,360.0,174240.0,0,174240.0,17424.0,0,0,,,,,,,,
+OF,ISI020,SIM.75561-67L00-000#PAD SPARE TIRE,3533.0,324.0,1144692.0,0,1144692.0,114469.20000000001,0,0,,,,,,,,
+OF,ISI,09250-30010-000#CAP REAR FLOOR DRAIN,601.0,864.0,519264.0,0,519264.0,51926.4,0,0,,,,,,,,
+OF,SIM006,09320-06006#CUSHION SPARE TIRE STOPPER,869.0,1056.0,917664.0,0,917664.0,91766.40000000001,0,0,,,,,,,,
+OF,ISI006,18571-65H20-00#CAP CANISTER IR,2051.0,504.0,1033704.0,0,1033704.0,103370.40000000001,0,0,,,,,,,,
+OF,SIM004,28393-61J00#GROMMET T/M GEAR CONTROL,1518.0,240.0,364320.0,0,364320.0,36432.0,0,0,,,,,,,,
+OF,ISI026,72231-77501#FLAP FRONT MUD,6113.0,1536.0,9389568.0,0,9389568.0,938956.8,0,0,,,,,,,,
+OF,ISI027,72232-77572#FLAP REAR MUD,5614.0,24.0,134736.0,0,134736.0,13473.6,0,0,,,,,,,,
+OF,ISI002,ISI.72831-77500#PAD DECK MOUNTING,1261.0,816.0,1028976.0,0,1028976.0,102897.6,0,0,,,,,,,,
+OF,ISI003,ISI.73461-54G00#CUSHION GLOVE BOX LD SIDE,534.0,384.0,205056.0,0,205056.0,20505.600000000002,0,0,,,,,,,,
+OF,ISI007,85299-67L20#CUSHION FR CUSH,1441.0,60.0,86460.0,0,86460.0,8646.0,0,0,,,,,,,,
+OF,SIM008,35153-65J00#GROMMET REAR COMB LAMP,662.0,720.0,476640.0,0,476640.0,47664.0,0,0,,,,,,,,
+OF,SIM028,18571-65H20#CAP CANISTER IR,2051.0,216.0,443016.0,0,443016.0,44301.600000000006,0,0,,,,,,,,
+OF,SIM016,72831-77500#PAD DECK MOUNTING,1261.0,48.0,60528.0,0,60528.0,6052.8,0,0,,,,,,,,
+OF,SIM025,34955-70K00#BUSH EPI BRKT,484.0,96.0,46464.0,0,46464.0,4646.400000000001,0,0,,,,,,,,
+OF,SIM027,75561-67L00#PAD SPARE TIRE,3533.0,96.0,339168.0,0,339168.0,33916.8,0,0,,,,,,,,
+OF,SIM005,73461-54G00#CUSHION GLOVE BOX LD SIDE,534.0,192.0,102528.0,0,102528.0,10252.800000000001,0,0,,,,,,,,
+OF,ISI004,ISI.77192-50E00#CUSHION TRUNK LID FRONT,344.0,96.0,33024.0,0,33024.0,3302.4,0,0,,,,,,,,
+OF,ISI013,ISI.81892-77700#RUBBER STOPPER,4620.0,4356.0,20124720.0,0,20124720.0,2012472.0,0,0,,,,,,,,
+OF,ISI002,ISI.72831-77500#PAD DECK MOUNTING,1261.0,1344.0,1694784.0,0,1694784.0,169478.40000000002,0,0,,,,,,,,
+OF,ISI004,ISI.77192-50E00#CUSHION TRUNK LID FRONT,344.0,192.0,66048.0,0,66048.0,6604.8,0,0,,,,,,,,
+OF,ISI006,18571-65H20-00#CAP CANISTER IR,2051.0,1476.0,3027276.0,0,3027276.0,302727.60000000003,0,0,,,,,,,,
+OF,ISI016,SIM.34955-70K00-000#BUSH EPI BRKT,484.0,648.0,313632.0,0,313632.0,31363.2,0,0,,,,,,,,
+OF,ISI,09250-30010-000#CAP REAR FLOOR DRAIN,601.0,1632.0,980832.0,0,980832.0,98083.20000000001,0,0,,,,,,,,
+OF,SIM006,09320-06006#CUSHION SPARE TIRE STOPPER,869.0,2016.0,1751904.0,0,1751904.0,175190.40000000002,0,0,,,,,,,,
+OF,SIM004,28393-61J00#GROMMET T/M GEAR CONTROL,1518.0,576.0,874368.0,0,874368.0,87436.8,0,0,,,,,,,,
+OF,ISI026,72231-77501#FLAP FRONT MUD,6113.0,3072.0,18779136.0,0,18779136.0,1877913.6,0,0,,,,,,,,
+OF,ISI027,72232-77572#FLAP REAR MUD,5614.0,36.0,202104.0,0,202104.0,20210.4,0,0,,,,,,,,
+OF,SIM016,72831-77500#PAD DECK MOUNTING,1261.0,336.0,423696.0,0,423696.0,42369.600000000006,0,0,,,,,,,,
+OF,SIM005,73461-54G00#CUSHION GLOVE BOX LD SIDE,534.0,192.0,102528.0,0,102528.0,10252.800000000001,0,0,,,,,,,,
+OF,ISI014,37275-67L00#CAP CGLTR HOLE,700.0,192.0,134400.0,0,134400.0,13440.0,0,0,,,,,,,,
+OF,ISI020,SIM.75561-67L00-000#PAD SPARE TIRE,3533.0,648.0,2289384.0,0,2289384.0,228938.40000000002,0,0,,,,,,,,
+OF,SIM032,13881-85R00#BOOT AIR CLEANER,11644.0,120.0,1397280.0,0,1397280.0,139728.0,0,0,,,,,,,,
+OF,ISI003,ISI.73461-54G00#CUSHION GLOVE BOX LD SIDE,534.0,768.0,410112.0,0,410112.0,41011.200000000004,0,0,,,,,,,,
+OF,SIM012,09321-10023#CUSHION FRONT HOOD LOCK,823.0,960.0,790080.0,0,790080.0,79008.0,0,0,,,,,,,,
+OF,ISI007,85299-67L20#CUSHION FR CUSH,1441.0,768.0,1106688.0,0,1106688.0,110668.8,0,0,,,,,,,,
+OF,ISI,11191-73R00-000#HOSE BREATHER,2928.0,156.0,456768.0,0,456768.0,45676.8,0,0,,,,,,,,
+OF,ISI,11193-73R00-000#HOSE PCV,5054.0,208.0,1051232.0,0,1051232.0,105123.20000000001,0,0,,,,,,,,
+OF,ISI,"17852-73R00#HOSE, RDTR INLET",10597.0,160.0,1695520.0,0,1695520.0,169552.0,0,0,,,,,,,,
+OF,ISI,"17854-73R00#HOSE, RDTR OUTLET",12009.0,120.0,1441080.0,0,1441080.0,144108.0,0,0,,,,,,,,
+OF,ISI,"17871-73R00#HOSE, HTR INLET",11297.0,140.0,1581580.0,0,1581580.0,158158.0,0,0,,,,,,,,
+OF,ISI,"17872-73R00#HOSE, HTR OUTLET",11543.0,140.0,1616020.0,0,1616020.0,161602.0,0,0,,,,,,,,
+OF,ISI017,SIM.35153-65J00#GROMMET REAR COMB LAMP,662.0,480.0,317760.0,0,317760.0,31776.0,0,0,,,,,,,,
+OF,ISI025,SIM.89445-60G10#PROTECTOR TANK FLANGE,1402.0,624.0,874848.0,0,874848.0,87484.8,0,0,,,,,,,,
+OF,SIM014,09250-30003#PLUG INSPECTION TIMING,1051.0,1008.0,1059408.0,0,1059408.0,105940.8,0,0,,,,,,,,
+OF,SIM025,34955-70K00#BUSH EPI BRKT,484.0,144.0,69696.0,0,69696.0,6969.6,0,0,,,,,,,,
+OF,SIM027,75561-67L00#PAD SPARE TIRE,3533.0,144.0,508752.0,0,508752.0,50875.200000000004,0,0,,,,,,,,
+OF,ISI027,72232-77572#FLAP REAR MUD,10597.0,160.0,1695520.0,0,1695520.0,169552.0,0,0,,,,,,,,
+OF,ISI028,17871-73R00#HOSE HTR INLET,12009.0,180.0,2161620.0,0,2161620.0,216162.0,0,0,,,,,,,,
+OF,ISI028,17871-73R00#HOSE HTR INLET,11297.0,160.0,1807520.0,0,1807520.0,180752.0,0,0,,,,,,,,
+OF,ISI029,17872-73R0#HOSE HTR OUTLET,11543.0,160.0,1846880.0,0,1846880.0,184688.0,0,0,,,,,,,,
+OF,ISI,"23881-73R00-000#HOSE, CLUTCH RESERVOIL LH",2602.0,140.0,364280.0,0,364280.0,36428.0,0,0,,,,,,,,
+OF,SIM008,35153-65J00#GROMMET REAR COMB LAMP,662.0,720.0,476640.0,0,476640.0,47664.0,0,0,,,,,,,,
+OF,ISI,"17873-52S00-000#HOSE, BYPASS",3001.0,34.0,102034.0,0,102034.0,10203.400000000001,0,0,,,,,,,,
+OF,ISI014,37275-67L00#CAP CGLTR HOLE,720.0,8.0,5760.0,0,5760.0,576.0,0,0,,,,,,,,
+OF,ISI028,17871-73R00#HOSE HTR INLET,13519.0,20.0,270380.0,0,270380.0,27038.0,0,0,,,,,,,,
+OF,SIM022,28135-85501A#BOOT GR SHIF CONT LEVER,17000.0,15.0,255000.0,0,255000.0,25500.0,0,0,,,,,,,,
+OF,ISI017,SIM.35153-65J00#GROMMET REAR COMB LAMP,1335.0,25.0,33375.0,0,33375.0,3337.5,0,0,,,,,,,,
+OF,ISI,09250-30010-000#CAP REAR FLOOR DRAIN,601.0,768.0,461568.0,0,461568.0,46156.8,0,0,,,,,,,,
+OF,SIM006,09320-06006#CUSHION SPARE TIRE STOPPER,869.0,960.0,834240.0,0,834240.0,83424.0,0,0,,,,,,,,
+OF,ISI006,18571-65H20-00#CAP CANISTER IR,2051.0,684.0,1402884.0,0,1402884.0,140288.4,0,0,,,,,,,,
+OF,SIM004,28393-61J00#GROMMET T/M GEAR CONTROL,1518.0,240.0,364320.0,0,364320.0,36432.0,0,0,,,,,,,,
+OF,ISI026,72231-77501#FLAP FRONT MUD,6113.0,1440.0,8802720.0,0,8802720.0,880272.0,0,0,,,,,,,,
+OF,ISI002,ISI.72831-77500#PAD DECK MOUNTING,1261.0,432.0,544752.0,0,544752.0,54475.200000000004,0,0,,,,,,,,
+OF,ISI003,ISI.73461-54G00#CUSHION GLOVE BOX LD SIDE,534.0,192.0,102528.0,0,102528.0,10252.800000000001,0,0,,,,,,,,
+OF,ISI016,SIM.34955-70K00-000#BUSH EPI BRKT,484.0,180.0,87120.0,0,87120.0,8712.0,0,0,,,,,,,,
+OF,ISI020,SIM.75561-67L00-000#PAD SPARE TIRE,3533.0,180.0,635940.0,0,635940.0,63594.0,0,0,,,,,,,,
+OF,SIM032,13881-85R00#BOOT AIR CLEANER,11644.0,48.0,558912.0,0,558912.0,55891.200000000004,0,0,,,,,,,,
+OF,SIM025,34955-70K00#BUSH EPI BRKT,484.0,144.0,69696.0,0,69696.0,6969.6,0,0,,,,,,,,
+OF,SIM027,75561-67L00#PAD SPARE TIRE,3533.0,144.0,508752.0,0,508752.0,50875.200000000004,0,0,,,,,,,,
+OF,ISI007,85299-67L20#CUSHION FR CUSH,1441.0,384.0,553344.0,0,553344.0,55334.4,0,0,,,,,,,,
+OF,SIM012,09321-10023#CUSHION FRONT HOOD LOCK,823.0,240.0,197520.0,0,197520.0,19752.0,0,0,,,,,,,,
+OF,ISI027,72232-77572#FLAP REAR MUD,5614.0,12.0,67368.0,0,67368.0,6736.8,0,0,,,,,,,,
+OF,SIM016,72831-77500#PAD DECK MOUNTING,1261.0,336.0,423696.0,0,423696.0,42369.600000000006,0,0,,,,,,,,
+OF,SIM005,73461-54G00#CUSHION GLOVE BOX LD SIDE,534.0,384.0,205056.0,0,205056.0,20505.600000000002,0,0,,,,,,,,
+OF,SIM014,09250-30003#PLUG INSPECTION TIMING,1051.0,1688.0,1774088.0,0,1774088.0,177408.80000000002,0,0,,,,,,,,
+OF,SIM036,18571-85R00#CAP PURGE UNION,772.0,96.0,74112.0,0,74112.0,7411.200000000001,0,0,,,,,,,,
+OF,ISI013,ISI.81892-77700#RUBBER STOPPER,4620.0,3084.0,14248080.0,0,14248080.0,1424808.0,0,0,,,,,,,,
+OF,SIM032,13881-85R00#BOOT AIR CLEANER,11644.0,240.0,2794560.0,0,2794560.0,279456.0,0,0,,,,,,,,
+OF,ISI016,SIM.34955-70K00-000#BUSH EPI BRKT,484.0,1068.0,516912.0,0,516912.0,51691.200000000004,0,0,,,,,,,,
+OF,ISI020,SIM.75561-67L00-000#PAD SPARE TIRE,3533.0,1176.0,4154808.0,0,4154808.0,415480.80000000005,0,0,,,,,,,,
+OF,ISI002,ISI.72831-77500#PAD DECK MOUNTING,1261.0,3600.0,4539600.0,0,4539600.0,453960.0,0,0,,,,,,,,
+OF,ISI,09250-30010-000#CAP REAR FLOOR DRAIN,601.0,4320.0,2596320.0,0,2596320.0,259632.0,0,0,,,,,,,,
+OF,SIM006,09320-06006#CUSHION SPARE TIRE STOPPER,869.0,5280.0,4588320.0,0,4588320.0,458832.0,0,0,,,,,,,,
+OF,ISI006,18571-65H20-00#CAP CANISTER IR,2051.0,3744.0,7678944.0,0,7678944.0,767894.4,0,0,,,,,,,,
+OF,SIM004,28393-61J00#GROMMET T/M GEAR CONTROL,1518.0,1440.0,2185920.0,0,2185920.0,218592.0,0,0,,,,,,,,
+OF,ISI026,72231-77501#FLAP FRONT MUD,6113.0,8064.0,49295232.0,0,49295232.0,4929523.2,0,0,,,,,,,,
+OF,ISI027,72232-77572#FLAP REAR MUD,5614.0,96.0,538944.0,0,538944.0,53894.4,0,0,,,,,,,,
+OF,ISI003,ISI.73461-54G00#CUSHION GLOVE BOX LD SIDE,534.0,2496.0,1332864.0,0,1332864.0,133286.4,0,0,,,,,,,,
+OF,SIM036,18571-85R00#CAP PURGE UNION,772.0,264.0,203808.0,0,203808.0,20380.800000000003,0,0,,,,,,,,
+OF,SIM014,09250-30003#PLUG INSPECTION TIMING,1051.0,3104.0,3262304.0,0,3262304.0,326230.4,0,0,,,,,,,,
+OF,SIM012,09321-10023#CUSHION FRONT HOOD LOCK,823.0,2664.0,2192472.0,0,2192472.0,219247.2,0,0,,,,,,,,
+OF,ISI,"17852-73R00#HOSE, RDTR INLET",10597.0,160.0,1695520.0,0,1695520.0,169552.0,0,0,,,,,,,,
+OF,ISI,"17854-73R00#HOSE, RDTR OUTLET",12009.0,150.0,1801350.0,0,1801350.0,180135.0,0,0,,,,,,,,
+OF,ISI,"17871-73R00#HOSE, HTR INLET",11297.0,160.0,1807520.0,0,1807520.0,180752.0,0,0,,,,,,,,
+OF,ISI,"17872-73R00#HOSE, HTR OUTLET",11543.0,160.0,1846880.0,0,1846880.0,184688.0,0,0,,,,,,,,
+OF,ISI,"23881-73R00-000#HOSE, CLUTCH RESERVOIL LH",2602.0,280.0,728560.0,0,728560.0,72856.0,0,0,,,,,,,,
+OF,ISI017,SIM.35153-65J00#GROMMET REAR COMB LAMP,662.0,2928.0,1938336.0,0,1938336.0,193833.6,0,0,,,,,,,,
+OF,ISI014,37275-67L00#CAP CGLTR HOLE,700.0,492.0,344400.0,0,344400.0,34440.0,0,0,,,,,,,,
+OF,ISI025,SIM.89445-60G10#PROTECTOR TANK FLANGE,1402.0,840.0,1177680.0,0,1177680.0,117768.0,0,0,,,,,,,,
+OF,ISI,11191-73R00-000#HOSE BREATHER,2928.0,156.0,456768.0,0,456768.0,45676.8,0,0,,,,,,,,
+OF,ISI,11193-73R00-000#HOSE PCV,5054.0,156.0,788424.0,0,788424.0,78842.40000000001,0,0,,,,,,,,
+OF,ISI027,72232-77572#FLAP REAR MUD,10597.0,452.0,4789844.0,0,4789844.0,478984.4,0,0,,,,,,,,
+OF,ISI028,17871-73R00#HOSE HTR INLET,12009.0,462.0,5548158.0,0,5548158.0,554815.8,0,0,,,,,,,,
+OF,ISI028,17871-73R00#HOSE HTR INLET,11297.0,452.0,5106244.0,0,5106244.0,510624.4,0,0,,,,,,,,
+OF,ISI029,17872-73R0#HOSE HTR OUTLET,11543.0,452.0,5217436.0,0,5217436.0,521743.60000000003,0,0,,,,,,,,
+OF,SIM020,89445-60G10-00#PROTECTOR TANK FLANGE,1402.0,336.0,471072.0,0,471072.0,47107.200000000004,0,0,,,,,,,,
+OF,ISI030,09321-07003#CUSHION FRONT HOOD,2928.0,312.0,913536.0,0,913536.0,91353.6,0,0,,,,,,,,
+OF,ISI031,09321-07003#CUSHION FRONT HOOD (copy),5054.0,364.0,1839656.0,0,1839656.0,183965.6,0,0,,,,,,,,
+OF,SIM025,34955-70K00#BUSH EPI BRKT,484.0,468.0,226512.0,0,226512.0,22651.2,0,0,,,,,,,,
+OF,SIM027,75561-67L00#PAD SPARE TIRE,3533.0,360.0,1271880.0,0,1271880.0,127188.0,0,0,,,,,,,,
+OF,SIM005,73461-54G00#CUSHION GLOVE BOX LD SIDE,534.0,384.0,205056.0,0,205056.0,20505.600000000002,0,0,,,,,,,,
+OF,SIM015,77192-50E00#CUSHION TRUNK LID FRONT,344.0,96.0,33024.0,0,33024.0,3302.4,0,0,,,,,,,,
+OF,SIM016,72831-77500#PAD DECK MOUNTING,1261.0,720.0,907920.0,0,907920.0,90792.0,0,0,,,,,,,,
+OF,ISI007,85299-67L20#CUSHION FR CUSH,1441.0,1212.0,1746492.0,0,1746492.0,174649.2,0,0,,,,,,,,
+OF,ISI004,ISI.77192-50E00#CUSHION TRUNK LID FRONT,344.0,288.0,99072.0,0,99072.0,9907.2,0,0,,,,,,,,
+OF,ISI016,SIM.34955-70K00-000#BUSH EPI BRKT,484.0,48.0,23232.0,0,23232.0,2323.2000000000003,0,0,,,,,,,,
+OF,ISI020,SIM.75561-67L00-000#PAD SPARE TIRE,3533.0,48.0,169584.0,0,169584.0,16958.4,0,0,,,,,,,,
+OF,ISI007,85299-67L20#CUSHION FR CUSH,1441.0,384.0,553344.0,0,553344.0,55334.4,0,0,,,,,,,,
+OF,ISI,09250-30010-000#CAP REAR FLOOR DRAIN,601.0,288.0,173088.0,0,173088.0,17308.8,0,0,,,,,,,,
+OF,SIM006,09320-06006#CUSHION SPARE TIRE STOPPER,869.0,384.0,333696.0,0,333696.0,33369.6,0,0,,,,,,,,
+OF,SIM012,09321-10023#CUSHION FRONT HOOD LOCK,823.0,240.0,197520.0,0,197520.0,19752.0,0,0,,,,,,,,
+OF,ISI006,18571-65H20-00#CAP CANISTER IR,2051.0,288.0,590688.0,0,590688.0,59068.8,0,0,,,,,,,,
+OF,SIM004,28393-61J00#GROMMET T/M GEAR CONTROL,1518.0,96.0,145728.0,0,145728.0,14572.800000000001,0,0,,,,,,,,
+OF,ISI026,72231-77501#FLAP FRONT MUD,6113.0,576.0,3521088.0,0,3521088.0,352108.80000000005,0,0,,,,,,,,
+OF,ISI027,72232-77572#FLAP REAR MUD,5614.0,12.0,67368.0,0,67368.0,6736.8,0,0,,,,,,,,
+OF,ISI002,ISI.72831-77500#PAD DECK MOUNTING,1261.0,336.0,423696.0,0,423696.0,42369.600000000006,0,0,,,,,,,,
+OF,ISI003,ISI.73461-54G00#CUSHION GLOVE BOX LD SIDE,534.0,192.0,102528.0,0,102528.0,10252.800000000001,0,0,,,,,,,,
+OF,ISI016,SIM.34955-70K00-000#BUSH EPI BRKT,484.0,180.0,87120.0,0,87120.0,8712.0,0,0,,,,,,,,
+OF,ISI020,SIM.75561-67L00-000#PAD SPARE TIRE,3533.0,180.0,635940.0,0,635940.0,63594.0,0,0,,,,,,,,
+OF,SIM015,77192-50E00#CUSHION TRUNK LID FRONT,344.0,96.0,33024.0,0,33024.0,3302.4,0,0,,,,,,,,
+OF,SIM032,13881-85R00#BOOT AIR CLEANER,11644.0,24.0,279456.0,0,279456.0,27945.600000000002,0,0,,,,,,,,
+OF,SIM036,18571-85R00#CAP PURGE UNION,772.0,98.0,75656.0,0,75656.0,7565.6,0,0,,,,,,,,
+OF,SIM014,09250-30003#PLUG INSPECTION TIMING,1051.0,1356.0,1425156.0,0,1425156.0,142515.6,0,0,,,,,,,,
+OF,ISI,"17873-52S00-000#HOSE, BYPASS",3001.0,8.0,24008.0,0,24008.0,2400.8,0,0,,,,,,,,
+OF,SIM012,09321-10023#CUSHION FRONT HOOD LOCK,823.0,240.0,197520.0,0,197520.0,19752.0,0,0,,,,,,,,
+OF,ISI,"17087-73R00-000#HOSE SET,HEATER CIRCULATION",9999.0,20.0,199980.0,0,199980.0,19998.0,0,0,,,,,,,,
+OF,ISI,"17852-73R00#HOSE, RDTR INLET",10597.0,160.0,1695520.0,0,1695520.0,169552.0,0,0,,,,,,,,
+OF,ISI,"17854-73R00#HOSE, RDTR OUTLET",12009.0,150.0,1801350.0,0,1801350.0,180135.0,0,0,,,,,,,,
+OF,ISI,"17871-73R00#HOSE, HTR INLET",11297.0,140.0,1581580.0,0,1581580.0,158158.0,0,0,,,,,,,,
+OF,ISI,"17872-73R00#HOSE, HTR OUTLET",11543.0,140.0,1616020.0,0,1616020.0,161602.0,0,0,,,,,,,,
+OF,ISI017,SIM.35153-65J00#GROMMET REAR COMB LAMP,662.0,720.0,476640.0,0,476640.0,47664.0,0,0,,,,,,,,
+OF,ISI014,37275-67L00#CAP CGLTR HOLE,700.0,192.0,134400.0,0,134400.0,13440.0,0,0,,,,,,,,
+OF,ISI025,SIM.89445-60G10#PROTECTOR TANK FLANGE,1402.0,336.0,471072.0,0,471072.0,47107.200000000004,0,0,,,,,,,,
+OF,ISI,11191-73R00-000#HOSE BREATHER,2928.0,312.0,913536.0,0,913536.0,91353.6,0,0,,,,,,,,
+OF,ISI,11193-73R00-000#HOSE PCV,5054.0,312.0,1576848.0,0,1576848.0,157684.80000000002,0,0,,,,,,,,
diff --git a/vit_efaktur/static/fpm.csv b/vit_efaktur/static/fpm.csv
new file mode 100644
index 0000000..24b5d84
--- /dev/null
+++ b/vit_efaktur/static/fpm.csv
@@ -0,0 +1,2 @@
+FM,KD_JENIS_TRANSAKSI,FG_PENGGANTI,NOMOR_FAKTUR,MASA_PAJAK,TAHUN_PAJAK,TANGGAL_FAKTUR,NPWP,NAMA,ALAMAT_LENGKAP,JUMLAH_DPP,JUMLAH_PPN,JUMLAH_PPNBM,IS_CREDITABLE
+FM,01,0,0011400000032,08,2017,10/08/2017,030531305064000,FAUZIAH,JUANDA ,75000000,7500000,0,1
diff --git a/vit_efaktur/static/partner.csv b/vit_efaktur/static/partner.csv
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/vit_efaktur/static/partner.csv
diff --git a/vit_efaktur/static/pk.csv b/vit_efaktur/static/pk.csv
new file mode 100644
index 0000000..d4b564f
--- /dev/null
+++ b/vit_efaktur/static/pk.csv
@@ -0,0 +1,6 @@
+FK,KD_JENIS_TRANSAKSI,FG_PENGGANTI,NOMOR_FAKTUR,MASA_PAJAK,TAHUN_PAJAK,TANGGAL_FAKTUR,NPWP,NAMA,ALAMAT_LENGKAP,JUMLAH_DPP,JUMLAH_PPN,JUMLAH_PPNBM,ID_KETERANGAN_TAMBAHAN,FG_UANG_MUKA,UANG_MUKA_DPP,UANG_MUKA_PPN,UANG_MUKA_PPNBM,REFERENSI
+LT,NPWP,NAMA,JALAN,BLOK,NOMOR,RT,RW,KECAMATAN,KELURAHAN,KABUPATEN,PROPINSI,KODE_POS,NOMOR_TELEPON,,,,,
+OF,KODE_OBJEK,NAMA,HARGA_SATUAN,JUMLAH_BARANG,HARGA_TOTAL,DISKON,DPP,PPN,TARIF_PPNBM,PPNBM,,,,,,,,
+FK,01,0,0171734018730,07,2017,25/07/2017,803610096011000,BERDIKARI. UD,Sudirman Blok: 2 Nomor: 2 RT: 22 RW: 22 Kel: CIGONDEWAH KALER Kec: BANDUNG KULON Kota/Kab: KOTA BANDUNG Bandung JAWA BARAT,120000000,12000000,0,,0,0,0,0,INV/2017/0026
+FAPR,My Company, Blok: Nomor: RT: RW: Kel: Kec: Kota/Kab: ,,,,,,,,,,,,,,,,
+OF,,Jasa,120000000.0,1.0,120000000.0,0,120000000.0,12000000.0,0,0,,,,,,,,
diff --git a/vit_efaktur/static/product.csv b/vit_efaktur/static/product.csv
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/vit_efaktur/static/product.csv
diff --git a/vit_efaktur/static/src/img/export.png b/vit_efaktur/static/src/img/export.png
new file mode 100644
index 0000000..e2f87a9
--- /dev/null
+++ b/vit_efaktur/static/src/img/export.png
Binary files differ
diff --git a/vit_efaktur/static/src/img/icontax.png b/vit_efaktur/static/src/img/icontax.png
new file mode 100644
index 0000000..626cdab
--- /dev/null
+++ b/vit_efaktur/static/src/img/icontax.png
Binary files differ
diff --git a/vit_efaktur/static/src/img/newtaxicon.jpg b/vit_efaktur/static/src/img/newtaxicon.jpg
new file mode 100644
index 0000000..d920ba4
--- /dev/null
+++ b/vit_efaktur/static/src/img/newtaxicon.jpg
Binary files differ
diff --git a/vit_efaktur/view/efaktur.xml b/vit_efaktur/view/efaktur.xml
new file mode 100644
index 0000000..e09fafc
--- /dev/null
+++ b/vit_efaktur/view/efaktur.xml
@@ -0,0 +1,160 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+
+ <record id="view_vit_efaktur_tree" model="ir.ui.view">
+ <field name="name">vit.efaktur.tree</field>
+ <field name="model">vit.efaktur</field>
+ <field name="type">tree</field>
+ <field name="priority" eval="8"/>
+ <field name="arch" type="xml">
+ <tree string="E-Faktur">
+ <field name="year"/>
+ <field name="name"/>
+ <field name="is_used"/>
+ </tree>
+ </field>
+ </record>
+
+ <record id="view_vit_efaktur_form" model="ir.ui.view">
+ <field name="name">vit.efaktur.form</field>
+ <field name="model">vit.efaktur</field>
+ <field name="type">form</field>
+ <field name="priority" eval="8"/>
+ <field name="arch" type="xml">
+ <form string="E-Faktur">
+ <sheet>
+ <group colspan="4">
+ <group>
+ <field name="year"/>
+ <field name="name" placeholder="xxx.xx.xxxxxxxx"/>
+ </group>
+ <group>
+ <field name="is_used"/>
+ </group>
+ </group>
+
+ <notebook colspan="4">
+ <page string="Invoices">
+ <field name="invoice_ids">
+ <tree string="Invoices">
+ <!-- <field name="number"/> -->
+ <field name="name"/>
+ <field name="partner_id"/>
+ <field name="invoice_date"/>
+ <field name="amount_untaxed"/>
+ <field name="amount_tax"/>
+ <field name="amount_total"/>
+ <field name="state"/>
+ </tree>
+ </field>
+ </page>
+ </notebook>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="view_vit_efaktur_search" model="ir.ui.view">
+ <field name="name">vit.efaktur.search</field>
+ <field name="model">vit.efaktur</field>
+ <field name="type">search</field>
+ <field name="priority" eval="8"/>
+ <field name="arch" type="xml">
+ <search string="E-Faktur">
+ <field name="name" select="True"/>
+ <field name="year" select="True"/>
+ <group expand="0" string="Group By">
+ <filter string="Year" icon="terp-camera_test" name="year" context="{'group_by':'year'}"/>
+ <filter string="Is Used" icon="terp-camera_test" name="is_used" context="{'group_by':'is_used'}"/>
+ </group>
+
+ </search>
+ </field>
+ </record>
+
+ <record model="ir.actions.act_window" id="act_open_vit_efaktur_view">
+ <field name="name">Nomor E-Faktur</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">vit.efaktur</field>
+ <field name="view_mode">tree,form</field>
+ </record>
+
+ <record model="ir.actions.act_window.view" id="act_open_vit_efaktur_view_form">
+ <field name="act_window_id" ref="act_open_vit_efaktur_view"/>
+ <field name="sequence" eval="20"/>
+ <field name="view_mode">form</field>
+ <field name="view_id" ref="view_vit_efaktur_form"/>
+ </record>
+
+ <record model="ir.actions.act_window.view" id="act_open_vit_efaktur_view_tree">
+ <field name="act_window_id" ref="act_open_vit_efaktur_view"/>
+ <field name="sequence" eval="10"/>
+ <field name="view_mode">tree</field>
+ <field name="view_id" ref="view_vit_efaktur_tree"/>
+ </record>
+
+ <menuitem id="menu_vit_efaktur"
+ sequence="10"
+ name="E-Faktur"
+ web_icon="vit_efaktur,static/src/img/newtaxicon.jpg"
+ />
+
+ <menuitem id="menu_vit_efaktur_nomor"
+ parent="menu_vit_efaktur"
+ sequence="20"
+ name="Nomor Seri Faktur Pajak"
+ action="act_open_vit_efaktur_view"/>
+
+ <menuitem id="menu_vit_efaktur_wizard"
+ parent="menu_vit_efaktur"
+ sequence="30"
+ name="Generate Nomor Seri Faktur Pajak"
+ action="act_open_vit_efaktur_wizard"/>
+
+ <menuitem id="menu_vit_efaktur_export_product"
+ parent="menu_vit_efaktur"
+ sequence="40"
+ name="Export Products"
+ action="act_open_vit_efaktur_product_wizard"/>
+
+ <menuitem id="menu_vit_efaktur_export_partner"
+ parent="menu_vit_efaktur"
+ sequence="50"
+ name="Export Partner"
+ action="act_open_vit_efaktur_partner_wizard"/>
+
+ <menuitem id="menu_vit_efaktur_keluaran"
+ parent="menu_vit_efaktur"
+ sequence="60"
+ name="Faktur Pajak Keluaran"
+ />
+
+ <menuitem id="menu_vit_efaktur_export_pk"
+ parent="menu_vit_efaktur_keluaran"
+ sequence="60"
+ name="Export FP. Keluaran"
+ action="act_open_vit_efaktur_pk_wizard"/>
+
+ <menuitem id="menu_vit_efaktur_auto"
+ parent="menu_vit_efaktur_keluaran"
+ sequence="70"
+ name="Auto Numbering"
+ action="act_open_vit_efaktur_auto_wizard"/>
+
+
+
+
+ <menuitem id="menu_vit_efaktur_masukan"
+ parent="menu_vit_efaktur"
+ sequence="70"
+ name="Faktur Pajak Masukan"
+ />
+
+ <menuitem id="menu_vit_efaktur_export_pm"
+ parent="menu_vit_efaktur_masukan"
+ sequence="60"
+ name="Export FP. Masukan"
+ action="act_open_vit_efaktur_pm_wizard"/>
+ </data>
+</odoo> \ No newline at end of file
diff --git a/vit_efaktur/view/invoice.xml b/vit_efaktur/view/invoice.xml
new file mode 100644
index 0000000..9dabd9b
--- /dev/null
+++ b/vit_efaktur/view/invoice.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+
+ <record id="invoice_efaktur" model="ir.ui.view">
+ <field name="name">account_invoice_efaktur</field>
+ <field name="model">account.move</field>
+ <field name="inherit_id" ref="account.view_move_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="//field[@name='partner_id']" position="after">
+ <field name="efaktur_id" domain="[('is_used','=',False)]"/>
+ <field name="is_berikat" readonly="1" invisible="1"/>
+ <field name="prefix_berikat" invisible="1"/>
+ </xpath>
+ <notebook position="inside">
+ <page string="E-Faktur">
+ <group>
+ <group>
+ <field name="masa_pajak"/>
+ <field name="tahun_pajak"/>
+ </group>
+ <group>
+ <field name="is_efaktur_exported"/>
+ <field name="date_efaktur_exported"/>
+ </group>
+ </group>
+ </page>
+ </notebook>
+ </field>
+ </record>
+
+ <record id="tree_invoice_efaktur" model="ir.ui.view">
+ <field name="name">tree_invoice_efaktur</field>
+ <field name="model">account.move</field>
+ <field name="inherit_id" ref="account.view_out_invoice_tree"/>
+ <field name="arch" type="xml">
+ <field name="invoice_date" position="after">
+ <field name="efaktur_id"/>
+ </field>
+ </field>
+ </record>
+
+ </data>
+</odoo>
+
diff --git a/vit_efaktur/view/invoice_supplier.xml b/vit_efaktur/view/invoice_supplier.xml
new file mode 100644
index 0000000..6dda173
--- /dev/null
+++ b/vit_efaktur/view/invoice_supplier.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+
+<!-- <record id="invoice_supplier_efaktur" model="ir.ui.view">
+ <field name="name">account_invoice_supplier_efaktur</field>
+ <field name="model">account.move</field>
+ <field name="inherit_id" ref="account.vie"/>
+ <field name="arch" type="xml">
+
+ <xpath expr="//field[@name='date_due']" position="after">
+ <field name="efaktur_masukan" placeholder="xxx-xx-xxxxxxxx"/>
+ </xpath>
+
+ <notebook position="inside">
+ <page string="E-Faktur">
+ <group>
+ <group>
+ <field name="masa_pajak"/>
+ <field name="tahun_pajak"/>
+ </group>
+ <group>
+ <field name="is_efaktur_exported"/>
+ <field name="date_efaktur_exported"/>
+ </group>
+ </group>
+ </page>
+ </notebook>
+ </field>
+ </record> -->
+
+ <record id="tree_invoice_supplier_efaktur" model="ir.ui.view">
+ <field name="name">tree_invoice_supplier_efaktur</field>
+ <field name="model">account.move</field>
+ <field name="inherit_id" ref="account.view_in_invoice_tree"/>
+ <field name="arch" type="xml">
+ <field name="invoice_date" position="after">
+ <field name="efaktur_masukan"/>
+ </field>
+ </field>
+ </record>
+
+ </data>
+</odoo>
+
diff --git a/vit_efaktur/view/partner.xml b/vit_efaktur/view/partner.xml
new file mode 100644
index 0000000..bef1384
--- /dev/null
+++ b/vit_efaktur/view/partner.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+ <!-- Inherit Form View to Modify it -->
+ <record id="partner_efaktur" model="ir.ui.view">
+ <field name="name">res.partner_efaktur</field>
+ <field name="model">res.partner</field>
+ <field name="inherit_id" ref="base.view_partner_form"/>
+ <field name="arch" type="xml">
+
+ <notebook position="inside">
+ <page string="E-Faktur">
+ <group>
+ <group>
+ <field name="npwp" placeholder='99.999.999.9-999.999'/>
+ <field name="blok"/>
+ <field name="nomor"/>
+ <field name="rt"/>
+ <field name="rw"/>
+ <!--field name="kota_id" domain="[('state_id','=', state_id)]"/-->
+ <field name="kecamatan_id" domain="[('kota_id','=', kota_id)]"/>
+ <field name="kelurahan_id" domain="[('kecamatan_id','=', kecamatan_id)]"/>
+ <field name="alamat_lengkap" invisible="1"/>
+ <field name="nama_wajib_pajak"/>
+ <field name="alamat_lengkap_text"/>
+ </group>
+ <group>
+ <field name="is_efaktur_exported"/>
+ <field name="date_efaktur_exported"/>
+ <field name="is_berikat"/>
+ </group>
+
+ </group>
+ </page>
+ </notebook>
+ </field>
+ </record>
+
+
+ </data>
+</odoo>
+
diff --git a/vit_efaktur/view/product.xml b/vit_efaktur/view/product.xml
new file mode 100644
index 0000000..e7435a1
--- /dev/null
+++ b/vit_efaktur/view/product.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+ <!-- Inherit Form View to Modify it -->
+ <record id="product_efaktur" model="ir.ui.view">
+ <field name="name">product.template_efaktur</field>
+ <field name="model">product.template</field>
+ <field name="inherit_id" ref="product.product_template_form_view"/>
+ <field name="arch" type="xml">
+
+ <notebook position="inside">
+ <page string="E-Faktur">
+ <group>
+ <group>
+ <field name="is_efaktur_exported"/>
+ </group>
+ <group>
+ <field name="date_efaktur_exported"/>
+ </group>
+ </group>
+ </page>
+ </notebook>
+ </field>
+ </record>
+
+
+ </data>
+</odoo>
+
diff --git a/vit_efaktur/wizard/__init__.py b/vit_efaktur/wizard/__init__.py
new file mode 100644
index 0000000..a3bac3c
--- /dev/null
+++ b/vit_efaktur/wizard/__init__.py
@@ -0,0 +1,7 @@
+from . import generate
+from . import product
+from . import partner
+from . import pk
+from . import auto
+from . import pm
+from . import assign \ No newline at end of file
diff --git a/vit_efaktur/wizard/assign.py b/vit_efaktur/wizard/assign.py
new file mode 100644
index 0000000..1fbd802
--- /dev/null
+++ b/vit_efaktur/wizard/assign.py
@@ -0,0 +1,35 @@
+from odoo import api, fields, models, _
+import time
+from odoo.exceptions import UserError
+import logging
+_logger = logging.getLogger(__name__)
+
+class AssignConfirm(models.TransientModel):
+ _name = 'vit.assign_wizard'
+ _description = 'Assign Confirmation'
+
+
+ def _get_active_invoices(self):
+ if self._context.get('active_model') == 'account.invoice':
+ return self._context.get('active_ids', False)
+ return False
+
+ invoice_ids = fields.Many2many(comodel_name="account.invoice", string="Invoices", required=True,
+ default=_get_active_invoices)
+
+ efaktur_id = fields.Many2one(comodel_name="vit.efaktur", string="Nomor E-Faktur", required=False, )
+
+ """
+ logika:
+ update invoice_ids.efaktur_id dengan yang dipilih
+ :return:
+ """
+
+ # @api.multi
+ def confirm_button(self):
+ self.ensure_one()
+
+ for inv in self.invoice_ids:
+ inv.efaktur_id = self.efaktur_id
+
+ return {'type': 'ir.actions.act_window_close'}
diff --git a/vit_efaktur/wizard/assign.xml b/vit_efaktur/wizard/assign.xml
new file mode 100644
index 0000000..06ec473
--- /dev/null
+++ b/vit_efaktur/wizard/assign.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+
+ <record id="assign_wizard_view" model="ir.ui.view">
+ <field name="name">assign</field>
+ <field name="model">vit.assign_wizard</field>
+ <field name="arch" type="xml">
+ <form string="assign">
+ <group>
+ <field name="efaktur_id" domain="[('is_used','=',False)]"/>
+ <field name="invoice_ids"/>
+ </group>
+ <footer>
+ <button string="Confirm" icon="fa-check-circle" name="confirm_button" type="object" class="btn-primary"/>
+ <button string="Cancel" icon="fa-times" class="btn-default" special="cancel" />
+ </footer>
+ </form>
+ </field>
+ </record>
+
+ <!-- <act_window id="assign_wizard_action"
+ name="Assign E-Faktur"
+ src_model="account.move"
+ res_model="vit.assign_wizard"
+ view_mode="form"
+ key2="client_action_multi" target="new"
+ /> -->
+
+ </data>
+</odoo> \ No newline at end of file
diff --git a/vit_efaktur/wizard/auto.py b/vit_efaktur/wizard/auto.py
new file mode 100644
index 0000000..7c7720b
--- /dev/null
+++ b/vit_efaktur/wizard/auto.py
@@ -0,0 +1,52 @@
+from odoo import api, fields, models, _
+from odoo.exceptions import UserError
+
+class efaktur_wizard(models.TransientModel):
+ _name = 'vit.efaktur_auto'
+
+ start = fields.Date("Invoice Date Start",required=True)
+ end = fields.Date("Invoice Date End",required=True)
+ invoice_ids = fields.Many2many(comodel_name="account.move", string="Invoices", )
+
+ # @api.multi
+ def confirm_button(self):
+
+ invoice_ids = self.invoice_ids
+
+ efaktur_ids = self.env['vit.efaktur'].search([('is_used','=',False)],
+ order="name asc")
+ efaktur_len = len(efaktur_ids)
+
+ i = 0
+ for inv in invoice_ids:
+ if i < efaktur_len:
+ inv.efaktur_id = efaktur_ids[i]
+ else:
+ break
+ i+=1
+
+ self.env.cr.commit()
+ raise UserError("Selesai penomoran E-Faktur %s invoices(s)!" % i)
+
+ # @api.multi
+ def find_invoices(self):
+ start = self.start
+ end = self.end
+
+ inv_obj = self.env['account.move']
+ invoices = inv_obj.search([('invoice_date','>=', start),
+ ('invoice_date','<=', end),
+ ('state','=','open'),
+ ('efaktur_id','=',False),
+ ('type','=','out_invoice')
+ ])
+ i = 0
+ invoice_ids = []
+ for inv in invoices:
+ invoice_ids.append((4,inv.id))
+ i+=1
+
+ self.invoice_ids=invoice_ids
+ self.env.cr.commit()
+ raise UserError("Found %s invoices(s)!" % i)
+
diff --git a/vit_efaktur/wizard/auto.xml b/vit_efaktur/wizard/auto.xml
new file mode 100644
index 0000000..6457326
--- /dev/null
+++ b/vit_efaktur/wizard/auto.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+
+ <record id="act_open_vit_efaktur_auto_wizard" model="ir.actions.act_window">
+ <field name="name">Auto Number eFaktur</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">vit.efaktur_auto</field>
+ <field name="view_mode">form</field>
+ <field name="target">new</field>
+ </record>
+
+ <record id="view_vit_efaktur_auto_form" model="ir.ui.view">
+ <field name="name">vit.efaktur_auto.form</field>
+ <field name="model">vit.efaktur_auto</field>
+ <field name="type">form</field>
+ <field name="priority" eval="8"/>
+ <field name="arch" type="xml">
+ <form string="eFaktur">
+ <group colspan="4">
+ <field name="start" />
+ <field name="end" />
+ </group>
+
+ <notebook colspan="4">
+ <page string="Invoices">
+ <field name="invoice_ids"/>
+ </page>
+ </notebook>
+
+ <footer>
+ <button string="Find Invoices" name="find_invoices" type="object" class="btn-primary"/>
+ <button string="Fill Nomor Seri Faktur Pajak" name="confirm_button" type="object" class="btn-primary"/>
+ <button string="Cancel" class="btn-default" special="cancel" />
+ </footer>
+
+ </form>
+ </field>
+ </record>
+
+ </data>
+</odoo> \ No newline at end of file
diff --git a/vit_efaktur/wizard/generate.py b/vit_efaktur/wizard/generate.py
new file mode 100644
index 0000000..e152899
--- /dev/null
+++ b/vit_efaktur/wizard/generate.py
@@ -0,0 +1,28 @@
+from odoo import api, fields, models, _
+
+class efaktur_wizard(models.TransientModel):
+ _name = 'vit.generate_efaktur'
+
+ start = fields.Char("Start")
+ end = fields.Char("End")
+ year = fields.Integer("Year")
+
+ # @api.multi
+ def confirm_button(self):
+ start = self.start
+ end = self.end
+
+ #017-17-34018714
+ a = start.split("-")
+ b = end.split("-")
+
+ for i in range(int(a[2]), int(b[2])+1):
+ nomor = "%s-%s-%08d" % (a[0],a[1],i)
+ data = {
+ 'year': self.year,
+ 'name': nomor,
+ }
+ self.env['vit.efaktur'].create(data)
+
+ return
+
diff --git a/vit_efaktur/wizard/generate.xml b/vit_efaktur/wizard/generate.xml
new file mode 100644
index 0000000..f904208
--- /dev/null
+++ b/vit_efaktur/wizard/generate.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+
+ <record id="act_open_vit_efaktur_wizard" model="ir.actions.act_window">
+ <field name="name">Generate eFaktur</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">vit.generate_efaktur</field>
+ <field name="view_mode">form</field>
+ <field name="target">new</field>
+ </record>
+
+ <record id="view_vit_generate_efaktur_form" model="ir.ui.view">
+ <field name="name">vit.generate_efaktur.form</field>
+ <field name="model">vit.generate_efaktur</field>
+ <field name="type">form</field>
+ <field name="priority" eval="8"/>
+ <field name="arch" type="xml">
+ <form string="eFaktur">
+ <group colspan="4">
+ <field name="year" placeholder="xxxx"/>
+ <field name="start" placeholder="xxx-xx-xxxxxxxx"/>
+ <field name="end" placeholder="xxx-xx-xxxxxxxx"/>
+ </group>
+
+ <footer>
+ <button string="Confirm" name="confirm_button" type="object" class="btn-primary"/>
+ <button string="Cancel" class="btn-default" special="cancel" />
+ </footer>
+
+ </form>
+ </field>
+ </record>
+
+ </data>
+</odoo> \ No newline at end of file
diff --git a/vit_efaktur/wizard/partner.py b/vit_efaktur/wizard/partner.py
new file mode 100644
index 0000000..fe87361
--- /dev/null
+++ b/vit_efaktur/wizard/partner.py
@@ -0,0 +1,96 @@
+from odoo import api, fields, models, _
+import time
+import csv
+from odoo.modules import get_modules, get_module_path
+from odoo.exceptions import UserError
+import copy
+import logging
+from io import StringIO
+import base64
+
+_logger = logging.getLogger(__name__)
+
+
+class efaktur_partner_wizard(models.TransientModel):
+ _name = 'vit.efaktur_partner'
+
+ export_file = fields.Binary(string="Export File", )
+ export_filename = fields.Char(string="Export File", )
+
+ # @api.multi
+ def confirm_button(self):
+ """
+ export partner yang is_efaktur_exported = False
+ update setelah export
+ :return:
+ """
+ cr = self.env.cr
+
+ headers = [
+ 'LT',
+ 'NPWP',
+ 'NAMA',
+ 'JALAN',
+ 'BLOK',
+ 'NOMOR',
+ 'RT',
+ 'RW',
+ 'KECAMATAN',
+ 'KELURAHAN',
+ 'KABUPATEN',
+ 'PROPINSI',
+ 'KODE_POS',
+ 'NOMOR_TELEPON'
+ ]
+
+ mpath = get_module_path('vit_efaktur')
+ # csvfile = open(mpath + '/static/partner.csv', 'wb')
+
+ csvfile = StringIO()
+ csvwriter = csv.writer(csvfile, delimiter=',')
+ csvwriter.writerow([h.upper() for h in headers])
+
+ partner = self.env['res.partner']
+ partners = partner.search([('is_efaktur_exported','=',False),
+ ('npwp','!=',False)])
+ i=0
+ for part in partners:
+ npwp = part.npwp.replace(".","").replace("-","")
+ data = {
+ 'LT' : 'LT',
+ 'NPWP' : npwp,
+ 'NAMA' : part.name,
+ 'JALAN' : part.street or '',
+ 'BLOK' : part.blok or '',
+ 'NOMOR' : part.nomor or '',
+ 'RT' : part.rt or '',
+ 'RW' : part.rw or '',
+ 'KECAMATAN' : part.kecamatan_id.name or '',
+ 'KELURAHAN' : part.kelurahan_id.name or '',
+ 'KABUPATEN' : part.kecamatan_id.kota_id.name or '',
+ 'PROPINSI' : part.state_id.name or '',
+ 'KODE_POS' : part.zip or '',
+ 'NOMOR_TELEPON': part.phone or ''
+ }
+ csvwriter.writerow([data[v] for v in headers])
+
+ part.is_efaktur_exported=True
+ part.date_efaktur_exported=time.strftime("%Y-%m-%d %H:%M:%S")
+ i+=1
+
+ cr.commit()
+ # csvfile.close()
+
+ # raise UserError("Export %s record(s) Done!" % i)
+
+ self.export_file = base64.b64encode(csvfile.getvalue().encode())
+ self.export_filename = 'Export-%s.csv' % time.strftime("%Y%m%d_%H%M%S")
+ return {
+ 'name': "Export E-Faktur Complete, total %s records" % i,
+ 'type': 'ir.actions.act_window',
+ 'res_model': 'vit.efaktur_partner',
+ 'view_mode': 'form',
+ 'res_id': self.id,
+ 'views': [(False, 'form')],
+ 'target': 'new',
+ }
diff --git a/vit_efaktur/wizard/partner.xml b/vit_efaktur/wizard/partner.xml
new file mode 100644
index 0000000..a39f926
--- /dev/null
+++ b/vit_efaktur/wizard/partner.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+
+ <record id="act_open_vit_efaktur_partner_wizard" model="ir.actions.act_window">
+ <field name="name">Export Lawan Transaksi</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">vit.efaktur_partner</field>
+ <field name="view_mode">form</field>
+ <field name="target">new</field>
+ </record>
+
+ <record id="view_vit_efaktur_partner_form" model="ir.ui.view">
+ <field name="name">view_vit_efaktur_partner_form</field>
+ <field name="model">vit.efaktur_partner</field>
+ <field name="type">form</field>
+ <field name="priority" eval="8"/>
+ <field name="arch" type="xml">
+ <form string="Export Product">
+ <p>
+ Klik tombol Export di bawah untuk mulai export data Lawan Transaksi.
+ Data yang diexport adalah Customer yang memiliki NPWP dan belum diexport ke E-Faktur.
+ </p>
+
+ <p>
+ Setelah proses export Lawan Transaksi selesai dilakukan,
+ download file:
+ </p>
+ <p>
+ <group>
+ <field name="export_file" readonly="1" filename="export_filename"/>
+ <field name="export_filename" invisible="1" />
+ </group>
+ <!-- <a href="/vit_efaktur/static/partner.csv">
+ <img src="/vit_efaktur/static/src/img/export.png"/>
+ <b>partner.csv</b>
+ </a> -->
+
+ </p>
+ <p>
+ Lalu import ke program E-Faktur DJP melalui menu <b>Referensi - Lawan Transaksi - Import</b>
+ </p>
+
+ <footer>
+ <button string="Export" name="confirm_button" type="object" class="btn-primary"/>
+ <button string="Cancel" class="btn-default" special="cancel" />
+ </footer>
+
+ </form>
+ </field>
+ </record>
+
+ </data>
+</odoo> \ No newline at end of file
diff --git a/vit_efaktur/wizard/pk.py b/vit_efaktur/wizard/pk.py
new file mode 100644
index 0000000..3c94622
--- /dev/null
+++ b/vit_efaktur/wizard/pk.py
@@ -0,0 +1,340 @@
+from odoo import api, fields, models, _
+import time
+import csv
+from odoo.modules import get_modules, get_module_path
+from odoo.exceptions import UserError
+import copy
+import logging
+from io import StringIO
+import base64
+
+_logger = logging.getLogger(__name__)
+
+class efaktur_pk_wizard(models.TransientModel):
+ _name = 'vit.efaktur_pk'
+
+ export_file = fields.Binary(string="Export File", )
+ export_filename = fields.Char(string="Export File", )
+
+ # @api.multi
+ def confirm_button(self):
+ """
+ export pk yang is_efaktur_exported = False
+ update setelah export
+ :return:
+ """
+ cr = self.env.cr
+
+ headers = [
+ 'FK',
+ 'KD_JENIS_TRANSAKSI',
+ 'FG_PENGGANTI',
+ 'NOMOR_FAKTUR',
+ 'MASA_PAJAK',
+ 'TAHUN_PAJAK',
+ 'TANGGAL_FAKTUR',
+ 'NPWP',
+ 'NAMA',
+ 'ALAMAT_LENGKAP',
+ 'JUMLAH_DPP',
+ 'JUMLAH_PPN',
+ 'JUMLAH_PPNBM',
+ 'ID_KETERANGAN_TAMBAHAN',
+ 'FG_UANG_MUKA',
+ 'UANG_MUKA_DPP',
+ 'UANG_MUKA_PPN',
+ 'UANG_MUKA_PPNBM',
+ 'REFERENSI'
+ ]
+
+
+ mpath = get_module_path('vit_efaktur')
+
+ # csvfile = open(mpath + '/static/fpk.csv', 'wb')
+ csvfile = StringIO()
+ csvwriter = csv.writer(csvfile, delimiter=',')
+ csvwriter.writerow([h.upper() for h in headers])
+
+ inv_obj = self.env['account.move']
+ invoices = inv_obj.search([('is_efaktur_exported','=',False),
+ ('state','=','open'),
+ ('efaktur_id','!=', False),
+ ('move_type','=','out_invoice')])
+
+ company = self.env.user.company_id.partner_id
+
+ i=0
+ self.baris2(headers, csvwriter)
+ self.baris3(headers, csvwriter)
+
+ combined_invoices = self.gabung_by_efaktur(invoices)
+
+ for invoice in combined_invoices:
+ self.baris4(headers, csvwriter, invoice)
+ self.baris5(headers, csvwriter, company )
+
+ for line in invoice['invoice_line_ids']:
+ self.baris6(headers, csvwriter, line)
+
+ i+=1
+
+ for id in invoices.mapped('id'):
+ invoice = inv_obj.browse(id)
+ invoice.is_efaktur_exported=True
+ invoice.date_efaktur_exported=time.strftime("%Y-%m-%d %H:%M:%S")
+
+ cr.commit()
+ # csvfile.close()
+ # _logger.info(csvfile.getvalue().encode() )
+ self.export_file = base64.b64encode(csvfile.getvalue().encode())
+ self.export_filename = 'Export-%s.csv' % time.strftime("%Y%m%d_%H%M%S")
+ return {
+ 'name': "Export E-Faktur Complete, total %s records" % i,
+ 'type': 'ir.actions.act_window',
+ 'res_model': 'vit.efaktur_pk',
+ 'view_mode': 'form',
+ 'res_id': self.id,
+ 'views': [(False, 'form')],
+ 'target': 'new',
+ }
+ # raise UserError("Export %s record(s) Done!" % i)
+
+ def gabung_by_efaktur(self, invoices):
+ old_efaktur = None
+ inv_obj = self.env['account.move']
+ i=0
+ combines=[]
+ # list of tuples of invoices to be combined by efaktur
+ # [(inv1,inv2,inv5),(inv3,inv4)]
+
+
+ final_invoices = []
+ # list of final combined invoices, totallized
+ # [inv125, inv34]
+
+ for inv in sorted(invoices, key=lambda inv: inv.efaktur_id):
+ if old_efaktur == inv.efaktur_id:
+ combines[i-1].append(inv_obj.search_read([('id','=',inv.id)])[0])
+ else:
+ combines.append([inv_obj.search_read([('id','=',inv.id)])[0]])
+ i += 1
+ old_efaktur = inv.efaktur_id
+
+ # comb = invoices per efaktur yg sama
+ for comb in combines:
+ i=0
+ for inv in comb:
+ if i == 0:
+ i+=1
+ continue
+
+ line_ids = inv['invoice_line_ids']
+ for id in line_ids:
+ comb[0]['invoice_line_ids'].append(id)
+
+ comb[0]['amount_untaxed'] += inv['amount_untaxed']
+ comb[0]['amount_tax'] += inv['amount_tax']
+ comb[0]['amount_total'] += inv['amount_total']
+ comb[0]['number'] += "," + inv['number']
+ i+=1
+
+ comb[0]['invoice_line_ids'] = self.merge_lines(comb[0]['invoice_line_ids'])
+
+ final_invoices.append(comb[0])
+
+ return final_invoices
+
+ def merge_lines(self, lines):
+ old_line = None
+ final_lines = []
+
+ i=0
+ for line in self.env['account.move.line'].search_read([('id','in',lines)]):
+ if old_line and (old_line['product_id'] == line['product_id'] and old_line['price_unit'] == line['price_unit']):
+ old_line['price_unit'] += line['price_unit']
+ old_line['quantity'] += line['quantity']
+ final_lines.append(old_line)
+ else:
+ final_lines.append(line)
+
+ old_line = line
+ i+=1
+
+
+ return final_lines
+
+
+
+ def baris2(self, headers, csvwriter):
+ data = {
+ 'FK': 'LT',
+ 'KD_JENIS_TRANSAKSI': 'NPWP',
+ 'FG_PENGGANTI': 'NAMA',
+ 'NOMOR_FAKTUR': 'JALAN',
+ 'MASA_PAJAK': 'BLOK',
+ 'TAHUN_PAJAK': 'NOMOR',
+ 'TANGGAL_FAKTUR': 'RT',
+ 'NPWP': 'RW',
+ 'NAMA': 'KECAMATAN',
+ 'ALAMAT_LENGKAP': 'KELURAHAN',
+ 'JUMLAH_DPP': 'KABUPATEN',
+ 'JUMLAH_PPN': 'PROPINSI',
+ 'JUMLAH_PPNBM': 'KODE_POS',
+ 'ID_KETERANGAN_TAMBAHAN': 'NOMOR_TELEPON',
+ 'FG_UANG_MUKA': '',
+ 'UANG_MUKA_DPP': '',
+ 'UANG_MUKA_PPN': '',
+ 'UANG_MUKA_PPNBM': '',
+ 'REFERENSI': ''
+ }
+ csvwriter.writerow([data[v] for v in headers])
+
+ def baris3(self, headers, csvwriter):
+ data = {
+ 'FK': 'OF',
+ 'KD_JENIS_TRANSAKSI': 'KODE_OBJEK',
+ 'FG_PENGGANTI': 'NAMA',
+ 'NOMOR_FAKTUR': 'HARGA_SATUAN',
+ 'MASA_PAJAK': 'JUMLAH_BARANG',
+ 'TAHUN_PAJAK': 'HARGA_TOTAL',
+ 'TANGGAL_FAKTUR': 'DISKON',
+ 'NPWP': 'DPP',
+ 'NAMA': 'PPN',
+ 'ALAMAT_LENGKAP': 'TARIF_PPNBM',
+ 'JUMLAH_DPP': 'PPNBM',
+ 'JUMLAH_PPN': '',
+ 'JUMLAH_PPNBM': '',
+ 'ID_KETERANGAN_TAMBAHAN': '',
+ 'FG_UANG_MUKA': '',
+ 'UANG_MUKA_DPP': '',
+ 'UANG_MUKA_PPN': '',
+ 'UANG_MUKA_PPNBM': '',
+ 'REFERENSI': ''
+ }
+ csvwriter.writerow([data[v] for v in headers])
+
+
+ def baris4(self, headers, csvwriter, inv):
+ partner_id = self.env['res.partner'].browse(inv['partner_id'][0])
+ if not partner_id.npwp:
+ raise UserError("Harap masukkan NPWP Customer %s" % inv['partner_id'][1])
+
+ if not inv['efaktur_id'][0]:
+ raise UserError("Harap masukkan Nomor Seri Faktur Pajak Keluaran Invoice Nomor %s" % inv['number'])
+
+ # yyyy-mm-dd to dd/mm/yyyy
+
+ # d = inv['invoice_date'].split("-")
+ # invoice_date = "%s/%s/%s" %(d[2],d[1],d[0])
+ invoice_date = inv['invoice_date'].strftime("%d/%m/%Y")
+ npwp = partner_id.npwp.replace(".","").replace("-","")
+ faktur = inv['efaktur_id'][1].replace(".","").replace("-","")
+
+ print ("Tax ", inv['amount_tax'])
+ print ("DPP ", inv['amount_untaxed'])
+ print ("Tax Round ", round(inv['amount_tax']))
+ print ("DPP Round ", round(inv['amount_untaxed']))
+
+ if inv['is_cancel']:
+ data = {
+ 'FK': 'FK',
+ 'KD_JENIS_TRANSAKSI': '01',
+ 'FG_PENGGANTI': '1',
+ 'NOMOR_FAKTUR': faktur,
+ 'MASA_PAJAK': inv['masa_pajak'] or '',
+ 'TAHUN_PAJAK': inv['tahun_pajak'] or '',
+ 'TANGGAL_FAKTUR': invoice_date,
+ 'NPWP': npwp,
+ 'NAMA': partner_id.name.encode('utf8') or '',
+ 'ALAMAT_LENGKAP': partner_id.alamat_lengkap.encode('utf8') or '',
+ 'JUMLAH_DPP': round(inv['amount_untaxed']) or 0,
+ 'JUMLAH_PPN': round(inv['amount_tax']) or 0,
+ 'JUMLAH_PPNBM': 0,
+ 'ID_KETERANGAN_TAMBAHAN': '',
+ 'FG_UANG_MUKA': 0,
+ 'UANG_MUKA_DPP': 0,
+ 'UANG_MUKA_PPN': 0,
+ 'UANG_MUKA_PPNBM': 0,
+ 'REFERENSI': inv['number'] or ''
+ }
+
+ elif not inv['is_cancel']:
+ data = {
+ 'FK': 'FK',
+ 'KD_JENIS_TRANSAKSI': '01',
+ 'FG_PENGGANTI': '0',
+ 'NOMOR_FAKTUR': faktur,
+ 'MASA_PAJAK': inv['masa_pajak'] or '',
+ 'TAHUN_PAJAK': inv['tahun_pajak'] or '',
+ 'TANGGAL_FAKTUR': invoice_date,
+ 'NPWP': npwp,
+ 'NAMA': partner_id.name.encode('utf8') or '',
+ 'ALAMAT_LENGKAP': partner_id.alamat_lengkap.encode('utf8') or '',
+ 'JUMLAH_DPP': round(inv['amount_untaxed']) or 0,
+ 'JUMLAH_PPN': round(inv['amount_tax']) or 0,
+ 'JUMLAH_PPNBM': 0,
+ 'ID_KETERANGAN_TAMBAHAN': '',
+ 'FG_UANG_MUKA': 0,
+ 'UANG_MUKA_DPP': 0,
+ 'UANG_MUKA_PPN': 0,
+ 'UANG_MUKA_PPNBM': 0,
+ 'REFERENSI': inv['number'] or ''
+ }
+
+ _logger.info(data)
+ csvwriter.writerow([data[v] for v in headers])
+
+ def baris5(self, headers, csvwriter, company):
+ data = {
+ 'FK': 'FAPR',
+ 'KD_JENIS_TRANSAKSI': company.name,
+ 'FG_PENGGANTI': company.alamat_lengkap,
+ 'NOMOR_FAKTUR': '',
+ 'MASA_PAJAK': '',
+ 'TAHUN_PAJAK': '',
+ 'TANGGAL_FAKTUR': '',
+ 'NPWP': '',
+ 'NAMA': '',
+ 'ALAMAT_LENGKAP': '',
+ 'JUMLAH_DPP': '',
+ 'JUMLAH_PPN': '',
+ 'JUMLAH_PPNBM': '',
+ 'ID_KETERANGAN_TAMBAHAN': '',
+ 'FG_UANG_MUKA': '',
+ 'UANG_MUKA_DPP': '',
+ 'UANG_MUKA_PPN': '',
+ 'UANG_MUKA_PPNBM': '',
+ 'REFERENSI': ''
+ }
+ csvwriter.writerow([data[v] for v in headers])
+
+ def baris6(self, headers, csvwriter, line):
+ # harga_total = line['price_unit'] * line['quantity']
+ harga_total = round(line['price_subtotal'])
+ dpp = harga_total
+ ppn = round(dpp * 0.1) #TODO ambil dari Tax many2many
+ product_id = self.env['product.product'].browse(line['product_id'][0])
+
+ data = {
+ 'FK': 'OF',
+ 'KD_JENIS_TRANSAKSI': product_id.default_code or '',
+ 'FG_PENGGANTI': product_id.name or '',
+ 'NOMOR_FAKTUR': line['price_unit'],
+ 'MASA_PAJAK': line['quantity'] ,
+ 'TAHUN_PAJAK': harga_total,
+ 'TANGGAL_FAKTUR': line['discount'] or 0,
+ 'NPWP': dpp,
+ 'NAMA': ppn,
+ 'ALAMAT_LENGKAP': '0',
+ 'JUMLAH_DPP': '0',
+ 'JUMLAH_PPN': '',
+ 'JUMLAH_PPNBM': '',
+ 'ID_KETERANGAN_TAMBAHAN': '',
+ 'FG_UANG_MUKA': '',
+ 'UANG_MUKA_DPP': '',
+ 'UANG_MUKA_PPN': '',
+ 'UANG_MUKA_PPNBM': '',
+ 'REFERENSI': ''
+ }
+ csvwriter.writerow([data[v] for v in headers])
+
diff --git a/vit_efaktur/wizard/pk.xml b/vit_efaktur/wizard/pk.xml
new file mode 100644
index 0000000..8e8e002
--- /dev/null
+++ b/vit_efaktur/wizard/pk.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+
+ <record id="act_open_vit_efaktur_pk_wizard" model="ir.actions.act_window">
+ <field name="name">Export Faktur Pajak Keluaran</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">vit.efaktur_pk</field>
+ <field name="view_mode">form</field>
+ <field name="target">new</field>
+ </record>
+
+ <record id="view_vit_efaktur_pk_form" model="ir.ui.view">
+ <field name="name">view_vit_efaktur_pk_form</field>
+ <field name="model">vit.efaktur_pk</field>
+ <field name="type">form</field>
+ <field name="priority" eval="8"/>
+ <field name="arch" type="xml">
+ <form string="Export Pajak Keluaran">
+
+ <p>
+ Klik tombol Export di bawah untuk mulai export Faktur Pajak Keluaran.
+ Data yang diexport adalah Customer Invoice yang berstatus Open dan belum diexport ke E-Faktur.
+ </p>
+
+
+ <p>
+ Setelah proses export Faktur Pajak Keluaran selesai dilakukan,
+ download file ini:
+ </p>
+ <p>
+ <group>
+ <field name="export_file" readonly="1" filename="export_filename"/>
+ <field name="export_filename" invisible="1" />
+ </group>
+
+ <!--<a href="/vit_efaktur/static/fpk.csv">-->
+ <!--<img src="/vit_efaktur/static/src/img/export.png"/>-->
+ <!--<b>fpk.csv</b>-->
+ <!--</a>-->
+ </p>
+
+
+ <p>
+ Lalu import ke program E-Faktur DJP melalui menu <b>Referensi - Pajak Keluaran - Import</b>
+ </p>
+
+ <footer>
+ <button string="Export" name="confirm_button" type="object" class="btn-primary"/>
+ <button string="Cancel" class="btn-default" special="cancel" />
+ </footer>
+
+ </form>
+ </field>
+ </record>
+
+ </data>
+</odoo> \ No newline at end of file
diff --git a/vit_efaktur/wizard/pm.py b/vit_efaktur/wizard/pm.py
new file mode 100644
index 0000000..608069e
--- /dev/null
+++ b/vit_efaktur/wizard/pm.py
@@ -0,0 +1,115 @@
+from odoo import api, fields, models, _
+import time
+import csv
+from odoo.modules import get_modules, get_module_path
+from odoo.exceptions import UserError
+import copy
+import logging
+from io import StringIO
+import base64
+
+_logger = logging.getLogger(__name__)
+
+class efaktur_pm_wizard(models.TransientModel):
+ _name = 'vit.efaktur_pm'
+
+ export_file = fields.Binary(string="Export File", )
+ export_filename = fields.Char(string="Export File", )
+
+ # @api.multi
+ def confirm_button(self):
+ """
+ export pm yang is_efaktur_exported = False
+ update setelah export
+ :return:
+ """
+ cr = self.env.cr
+
+ headers = [
+ 'FM',
+ 'KD_JENIS_TRANSAKSI',
+ 'FG_PENGGANTI',
+ 'NOMOR_FAKTUR',
+ 'MASA_PAJAK',
+ 'TAHUN_PAJAK',
+ 'TANGGAL_FAKTUR',
+ 'NPWP',
+ 'NAMA',
+ 'ALAMAT_LENGKAP',
+ 'JUMLAH_DPP',
+ 'JUMLAH_PPN',
+ 'JUMLAH_PPNBM',
+ 'IS_CREDITABLE'
+ ]
+
+
+ mpath = get_module_path('vit_efaktur')
+
+ # csvfile = open(mpath + '/static/fpm.csv', 'wb')
+ csvfile = StringIO()
+ csvwriter = csv.writer(csvfile, delimiter=',')
+ csvwriter.writerow([h.upper() for h in headers])
+
+ onv_obj = self.env['account.move']
+ invoices = onv_obj.search([('is_efaktur_exported','=',False),
+ ('state','=','open'),
+ ('efaktur_masukan','!=', ''),
+ ('move_type','=','in_invoice')])
+
+
+ i=0
+ for invoice in invoices:
+ self.baris2(headers, csvwriter, invoice)
+ invoice.is_efaktur_exported=True
+ invoice.date_efaktur_exported=time.strftime("%Y-%m-%d %H:%M:%S")
+ i+=1
+
+ cr.commit()
+ # csvfile.close()
+
+ # raise UserError("Export %s record(s) Done!" % i)
+
+ self.export_file = base64.b64encode(csvfile.getvalue().encode())
+ self.export_filename = 'Export-%s.csv' % time.strftime("%Y%m%d_%H%M%S")
+ return {
+ 'name': "Export E-Faktur Complete, total %s records" % i,
+ 'type': 'ir.actions.act_window',
+ 'res_model': 'vit.efaktur_pm',
+ 'view_mode': 'form',
+ 'res_id': self.id,
+ 'views': [(False, 'form')],
+ 'target': 'new',
+ }
+
+ def baris2(self, headers, csvwriter, inv):
+ if not inv.partner_id.npwp:
+ raise UserError("Harap masukkan NPWP Supplier %s" % inv.partner_id.name)
+
+ if not inv.efaktur_masukan:
+ raise UserError("Harap masukkan Nomor Seri Faktur Pajak Masukan Invoice Nomor %s" % inv.number)
+
+ # yyyy-mm-dd to dd/mm/yyyy
+ # d = inv.invoice_date.split("-")
+ # invoice_date = "%s/%s/%s" %(d[2],d[1],d[0])
+ invoice_date = inv['invoice_date'].strftime("%d/%m/%Y")
+ npwp = inv.partner_id.npwp.replace(".","").replace("-","")
+ faktur = inv.efaktur_masukan.replace(".","").replace("-","")
+
+ data = {
+ 'FM':'FM',
+ 'KD_JENIS_TRANSAKSI':'01',
+ 'FG_PENGGANTI':'0',
+ 'NOMOR_FAKTUR':faktur,
+ 'MASA_PAJAK': inv.masa_pajak or '',
+ 'TAHUN_PAJAK': inv.tahun_pajak or '',
+ 'TANGGAL_FAKTUR': invoice_date,
+ 'NPWP': npwp,
+ 'NAMA': inv.partner_id.name or '',
+ 'ALAMAT_LENGKAP': inv.partner_id.alamat_lengkap or '',
+ 'JUMLAH_DPP': int(inv.amount_untaxed) or 0,
+ 'JUMLAH_PPN': int(inv.amount_tax) or 0,
+ 'JUMLAH_PPNBM': 0,
+ 'IS_CREDITABLE':1
+ }
+ csvwriter.writerow([data[v] for v in headers])
+
diff --git a/vit_efaktur/wizard/pm.xml b/vit_efaktur/wizard/pm.xml
new file mode 100644
index 0000000..d4fafec
--- /dev/null
+++ b/vit_efaktur/wizard/pm.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+
+ <record id="act_open_vit_efaktur_pm_wizard" model="ir.actions.act_window">
+ <field name="name">Export Faktur Pajak Masukan</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">vit.efaktur_pm</field>
+ <field name="view_mode">form</field>
+ <field name="target">new</field>
+ </record>
+
+ <record id="view_vit_efaktur_pm_form" model="ir.ui.view">
+ <field name="name">view_vit_efaktur_pm_form</field>
+ <field name="model">vit.efaktur_pm</field>
+ <field name="type">form</field>
+ <field name="priority" eval="8"/>
+ <field name="arch" type="xml">
+ <form string="Export Pajak Masukan">
+ <p>
+ Klik tombol Export di bawah untuk mulai export Faktur Pajak Masukan.
+ Data yang diexport adalah Invoice Supplier yang berstatus Open dan belum diexport ke E-Faktur.
+ </p>
+ <p>
+ Setelah proses export Faktur Pajak Masukan selesai dilakukan,
+ download file:
+ </p>
+ <p>
+ <group>
+ <field name="export_file" readonly="1" filename="export_filename"/>
+ <field name="export_filename" invisible="1" />
+ </group>
+ <!-- <a href="/vit_efaktur/static/fpm.csv">
+ <img src="/vit_efaktur/static/src/img/export.png"/>
+ <b>fpm.csv</b>
+ </a> -->
+ </p>
+ <p>
+ Lalu import ke program E-Faktur DJP melalui menu <b>Referensi - Pajak Masukan - Import</b>
+ </p>
+ <footer>
+ <button string="Export" name="confirm_button" type="object" class="btn-primary"/>
+ <button string="Cancel" class="btn-default" special="cancel" />
+ </footer>
+
+ </form>
+ </field>
+ </record>
+
+ </data>
+</odoo> \ No newline at end of file
diff --git a/vit_efaktur/wizard/product.py b/vit_efaktur/wizard/product.py
new file mode 100644
index 0000000..5f5b897
--- /dev/null
+++ b/vit_efaktur/wizard/product.py
@@ -0,0 +1,72 @@
+from odoo import api, fields, models, _
+import time
+import csv
+from odoo.modules import get_module_path
+from odoo.exceptions import UserError
+import copy
+import logging
+from io import StringIO
+import base64
+
+class efaktur_product_wizard(models.TransientModel):
+ _name = 'vit.efaktur_product'
+
+ export_file = fields.Binary(string="Export File", )
+ export_filename = fields.Char(string="Export File", )
+
+ # @api.multi
+ def confirm_button(self):
+ """
+ export product yang is_efaktur_exported = False
+ update setelah export
+ :return:
+ """
+ cr = self.env.cr
+
+ headers = [
+ 'OB',
+ 'KODE_OBJEK',
+ 'NAMA',
+ 'HARGA_SATUAN'
+ ]
+
+ mpath = get_module_path('vit_efaktur')
+
+ # csvfile = open(mpath + '/static/product.csv', 'wb')
+ csvfile = StringIO()
+ csvwriter = csv.writer(csvfile, delimiter=',')
+ csvwriter.writerow([h.upper() for h in headers])
+
+ product = self.env['product.template']
+ products = product.search([('is_efaktur_exported','=',False)])
+ i=0
+
+ for prod in products:
+ data = {
+ 'OB' : 'OB',
+ 'KODE_OBJEK': prod.default_code or '',
+ 'NAMA' : prod.name,
+ 'HARGA_SATUAN':prod.list_price
+ }
+ csvwriter.writerow([data[v] for v in headers])
+
+ prod.is_efaktur_exported=True
+ prod.date_efaktur_exported=time.strftime("%Y-%m-%d %H:%M:%S")
+ i+=1
+
+ cr.commit()
+ # csvfile.close()
+
+ # raise UserError("Export %s record(s) Done!" % i)
+
+ self.export_file = base64.b64encode(csvfile.getvalue().encode())
+ self.export_filename = 'Export-%s.csv' % time.strftime("%Y%m%d_%H%M%S")
+ return {
+ 'name': "Export E-Faktur Complete, total %s records" % i,
+ 'type': 'ir.actions.act_window',
+ 'res_model': 'vit.efaktur_product',
+ 'view_mode': 'form',
+ 'res_id': self.id,
+ 'views': [(False, 'form')],
+ 'target': 'new',
+ } \ No newline at end of file
diff --git a/vit_efaktur/wizard/product.xml b/vit_efaktur/wizard/product.xml
new file mode 100644
index 0000000..79f2751
--- /dev/null
+++ b/vit_efaktur/wizard/product.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<odoo>
+ <data>
+
+ <record id="act_open_vit_efaktur_product_wizard" model="ir.actions.act_window">
+ <field name="name">Export Product</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">vit.efaktur_product</field>
+ <field name="view_mode">form</field>
+ <field name="target">new</field>
+ </record>
+
+ <record id="view_vit_efaktur_product_form" model="ir.ui.view">
+ <field name="name">view_vit_efaktur_product_form</field>
+ <field name="model">vit.efaktur_product</field>
+ <field name="type">form</field>
+ <field name="priority" eval="8"/>
+ <field name="arch" type="xml">
+ <form string="Export Product">
+ <p>
+ Klik tombol Export di bawah untuk mulai export data Barang/Jasa.
+ Data yang diexport adalah Product yang belum diexport ke E-Faktur.
+ </p>
+
+ <p>
+ Setelah proses export Barang/Jasa selesai dilakukan,
+ download file:
+ </p>
+ <p>
+ <group>
+ <field name="export_file" readonly="1" filename="export_filename"/>
+ <field name="export_filename" invisible="1" />
+ </group>
+
+ <!-- <a href="/vit_efaktur/static/product.csv">
+ <img src="/vit_efaktur/static/src/img/export.png"/>
+ <b>product.csv</b>
+ </a> -->
+ </p>
+
+
+ <p>
+ Lalu import ke program E-Faktur DJP melalui menu <b>Referensi - Barang/Jasa - Import</b>
+ </p>
+
+ <footer>
+ <button string="Export" name="confirm_button" type="object" class="btn-primary"/>
+ <button string="Cancel" class="btn-default" special="cancel" />
+ </footer>
+
+ </form>
+ </field>
+ </record>
+
+ </data>
+</odoo> \ No newline at end of file