summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/account_move.py
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2023-10-03 07:05:14 +0000
committerIT Fixcomart <it@fixcomart.co.id>2023-10-03 07:05:14 +0000
commit19e0be70679ed862453fedeba14fb4cdf02232e9 (patch)
tree69b578c47cc17ae477c58d8bda718d823b998b20 /indoteknik_custom/models/account_move.py
parent78f205302c35cab2512971d64c8152aab2dcfa95 (diff)
parentd238f43442cc27db0d0c05bba99b42b41eaadf54 (diff)
Merged in production (pull request #128)
Production
Diffstat (limited to 'indoteknik_custom/models/account_move.py')
-rw-r--r--indoteknik_custom/models/account_move.py12
1 files changed, 12 insertions, 0 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: