summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indoteknik_custom/models/account_move.py12
-rw-r--r--indoteknik_custom/models/solr/apache_solr_queue.py2
-rw-r--r--indoteknik_custom/views/account_move.xml6
3 files changed, 19 insertions, 1 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py
index 18025b32..c3cd7ef9 100644
--- a/indoteknik_custom/models/account_move.py
+++ b/indoteknik_custom/models/account_move.py
@@ -2,6 +2,10 @@ from odoo import models, api, fields
from odoo.exceptions import AccessError, UserError, ValidationError
from datetime import timedelta, date
import logging
+import base64
+import PyPDF2
+import os
+import re
_logger = logging.getLogger(__name__)
@@ -23,6 +27,14 @@ class AccountMove(models.Model):
cost_centre_id = fields.Many2one('cost.centre', string='Cost Centre')
analytic_account_ids = fields.Many2many('account.analytic.account', string='Analytic Account')
due_line = fields.One2many('due.extension.line', 'invoice_id', compute='_compute_due_line', string='Due Extension Lines')
+ no_faktur_pajak = fields.Char(string='No Faktur Pajak')
+
+ @api.onchange('efaktur_id')
+ def change_efaktur_id(self):
+ for invoice in self:
+ if not invoice.efaktur_id:
+ return
+ invoice.no_faktur_pajak = invoice.efaktur_id.name
def _compute_due_line(self):
for invoice in self:
diff --git a/indoteknik_custom/models/solr/apache_solr_queue.py b/indoteknik_custom/models/solr/apache_solr_queue.py
index f66d356d..8dd7c273 100644
--- a/indoteknik_custom/models/solr/apache_solr_queue.py
+++ b/indoteknik_custom/models/solr/apache_solr_queue.py
@@ -8,7 +8,7 @@ _logger = logging.getLogger(__name__)
class ApacheSolrQueue(models.Model):
_name = 'apache.solr.queue'
- display_name = fields.Char('Display Name', compute="_compute_display_name", store=True)
+ display_name = fields.Char('Display Name', compute="_compute_display_name")
res_model = fields.Char('Resource Model')
res_id = fields.Integer('Resource ID')
function_name = fields.Char('Function Name')
diff --git a/indoteknik_custom/views/account_move.xml b/indoteknik_custom/views/account_move.xml
index 11558bf4..c45dab25 100644
--- a/indoteknik_custom/views/account_move.xml
+++ b/indoteknik_custom/views/account_move.xml
@@ -13,6 +13,12 @@
<field name="invoice_date" position="after">
<field name="payment_schedule" attrs="{'invisible': [('move_type', '!=', 'in_invoice')]}"/>
</field>
+ <field name="efaktur_document" position="before">
+ <field name="no_faktur_pajak" readonly="1"/>
+ </field>
+ <field name="efaktur_document" position="attributes">
+ <attribute name="widget">pdf_viewer</attribute>
+ </field>
<field name="invoice_user_id" position="after">
<field name="date_kirim_tukar_faktur"/>
<field name="shipper_faktur_id"/>