From 95d1133be1710dee7a526c5c98f4f318a3e7c24d Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Wed, 25 Sep 2024 16:25:30 +0700 Subject: ubah noreply to sales --- indoteknik_custom/views/res_users.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/views/res_users.xml b/indoteknik_custom/views/res_users.xml index 39b9d43e..41c74d72 100644 --- a/indoteknik_custom/views/res_users.xml +++ b/indoteknik_custom/views/res_users.xml @@ -5,7 +5,7 @@ Aktivasi Akun - Indoteknik.com "Indoteknik.com" <noreply@indoteknik.com> - noreply@indoteknik.com + sales@indoteknik.com ${object.login | safe} @@ -65,7 +65,7 @@ Email Pendaftaran Bisnis dalam Proses Review "Indoteknik.com" <noreply@indoteknik.com> - noreply@indoteknik.com + sales@indoteknik.com ${object.login | safe}
@@ -125,7 +125,7 @@ Email Pendaftaran Bisnis Berhasil "Indoteknik.com" <noreply@indoteknik.com> - noreply@indoteknik.com + sales@indoteknik.com ${object.login | safe}
@@ -186,7 +186,7 @@ Email Pendaftaran Bisnis Tidak Berhasil "Indoteknik.com" <noreply@indoteknik.com> - noreply@indoteknik.com + sales@indoteknik.com ${object.login | safe}
-- cgit v1.2.3 From 7909b937bf9484b38f16be1f4be955094e0c25ab Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Sat, 28 Sep 2024 10:55:56 +0700 Subject: aupdate company request --- indoteknik_custom/models/user_company_request.py | 19 ++++++++++++++++++- indoteknik_custom/views/user_company_request.xml | 10 +++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/user_company_request.py b/indoteknik_custom/models/user_company_request.py index d540b0f6..706bb245 100644 --- a/indoteknik_custom/models/user_company_request.py +++ b/indoteknik_custom/models/user_company_request.py @@ -1,4 +1,4 @@ -from odoo import models, fields +from odoo import models, fields, api from odoo.exceptions import UserError from odoo.http import request @@ -13,6 +13,18 @@ class UserCompanyRequest(models.Model): ('approved', 'Approve'), ('rejected', 'Reject'), ], string='Approval') + internal_input = fields.Char(string='Internal Input') + company_type = fields.Char(string='Company Type', compute='_compute_company_type') + + @api.depends('user_company_id.customer_type') + def _compute_company_type(self): + for record in self: + if record.user_company_id.customer_type == 'nonpkp': + record.company_type = 'Non PKP' + elif record.user_company_id.customer_type == 'pkp': + record.company_type = 'PKP' + else: + record.company_type = 'company type belum di set' def write(self, vals): user = self.get_user_by_email(self.user_id.email) @@ -21,6 +33,11 @@ class UserCompanyRequest(models.Model): if self.is_approve and is_approve: raise UserError('Tidak dapat mengubah approval yang sudah diisi') + if self.internal_input: + if self.user_company_id.nama_wajib_pajak == self.user_company_id.name: + self.user_company_id.nama_wajib_pajak = self.internal_input + self.user_company_id.name = self.internal_input + if not self.is_approve and is_approve: if is_approve == 'approved': self.user_id.parent_id = self.user_company_id.id diff --git a/indoteknik_custom/views/user_company_request.xml b/indoteknik_custom/views/user_company_request.xml index c9edd3f8..ad121a89 100644 --- a/indoteknik_custom/views/user_company_request.xml +++ b/indoteknik_custom/views/user_company_request.xml @@ -8,12 +8,14 @@ - + + @@ -30,12 +32,14 @@ - + + -- cgit v1.2.3 From 600d990fd866d8b729267c10f7e73a78d8b60f2d Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Sat, 28 Sep 2024 11:23:40 +0700 Subject: add internal user di user comany request --- indoteknik_custom/models/user_company_request.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/user_company_request.py b/indoteknik_custom/models/user_company_request.py index 706bb245..f86f3872 100644 --- a/indoteknik_custom/models/user_company_request.py +++ b/indoteknik_custom/models/user_company_request.py @@ -30,13 +30,14 @@ class UserCompanyRequest(models.Model): user = self.get_user_by_email(self.user_id.email) user.parent_name = self.user_input is_approve = vals.get('is_approve') + is_internal_input = vals.get('internal_input') if self.is_approve and is_approve: raise UserError('Tidak dapat mengubah approval yang sudah diisi') - if self.internal_input: + if is_internal_input: if self.user_company_id.nama_wajib_pajak == self.user_company_id.name: - self.user_company_id.nama_wajib_pajak = self.internal_input - self.user_company_id.name = self.internal_input + self.user_company_id.nama_wajib_pajak = is_internal_input + self.user_company_id.name = is_internal_input if not self.is_approve and is_approve: if is_approve == 'approved': -- cgit v1.2.3 From 795af0a07c28d5d407070734ef94b4838d05f793 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Wed, 2 Oct 2024 11:48:15 +0700 Subject: update switch account --- indoteknik_custom/models/res_users.py | 5 +++ indoteknik_custom/views/res_users.xml | 61 +++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/res_users.py b/indoteknik_custom/models/res_users.py index 5e16aad1..16f94b37 100755 --- a/indoteknik_custom/models/res_users.py +++ b/indoteknik_custom/models/res_users.py @@ -41,6 +41,11 @@ class ResUsers(models.Model): for user in self: template.send_mail(user.id, force_send=True) + def send_company_switch_approve_mail(self): + template = self.env.ref('indoteknik_custom.mail_template_res_user_company_switch_approve') + for user in self: + template.send_mail(user.id, force_send=True) + def send_company_request_reject_mail(self): template = self.env.ref('indoteknik_custom.mail_template_res_user_company_request_reject') for user in self: diff --git a/indoteknik_custom/views/res_users.xml b/indoteknik_custom/views/res_users.xml index 41c74d72..b93ae012 100644 --- a/indoteknik_custom/views/res_users.xml +++ b/indoteknik_custom/views/res_users.xml @@ -181,6 +181,67 @@
+ + Users: Switch Account Success + + Email Switch Account Berhasil + "Indoteknik.com" <noreply@indoteknik.com> + sales@indoteknik.com + ${object.login | safe} + + + +
+ + + + + + + + + + + + +
+ + + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + + +
Yth. ${object.parent_name},
Selamat! Perpindahan akun bisnis Anda menjadi PKP di indoteknik.com telah berhasil kini anda dapat menikmati berbagai kemudahan dalam berbelanja, antara lain:
Fitur Faktur Pajak & Invoice: Dengan mudah download faktur pajak & Invoice Anda secara digital.
Pembayaran Lengkap: Pilih metode pembayaran yang sesuai dengan kebutuhan Anda, baik transfer bank, VA, kartu kredit, atau pembayaran tempo.
Pelacakan Pengiriman: Lacak status pengiriman pesanan Anda secara real-time.
Untuk memulai transaksi, silakan login Kembali menggunakan akun Anda di Indoteknik.com
Kami sangat senang dapat melayani Anda. Jika ada pertanyaan atau membutuhkan bantuan, jangan ragu untuk menghubungi tim layanan Customer kami di Whatsapp 0817-1718-1922 atau sales@indoteknik.com
Hormat kami,
Indoteknik.com
+
+
+
+
+
+
Users: Company Request Reject -- cgit v1.2.3 From 56f2deda9cdf2a51d5a53aade7758a0ac9313e05 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Fri, 25 Oct 2024 15:50:41 +0700 Subject: update send email template --- indoteknik_custom/models/res_users.py | 5 +++ indoteknik_custom/views/res_users.xml | 60 +++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/res_users.py b/indoteknik_custom/models/res_users.py index 16f94b37..fce48b30 100755 --- a/indoteknik_custom/models/res_users.py +++ b/indoteknik_custom/models/res_users.py @@ -36,6 +36,11 @@ class ResUsers(models.Model): for user in self: template.send_mail(user.id, force_send=True) + def send_company_request_mail_switch(self): + template = self.env.ref('indoteknik_custom.mail_template_res_user_company_request_switch') + for user in self: + template.send_mail(user.id, force_send=True) + def send_company_request_approve_mail(self): template = self.env.ref('indoteknik_custom.mail_template_res_user_company_request_approve') for user in self: diff --git a/indoteknik_custom/views/res_users.xml b/indoteknik_custom/views/res_users.xml index b93ae012..bb643701 100644 --- a/indoteknik_custom/views/res_users.xml +++ b/indoteknik_custom/views/res_users.xml @@ -120,6 +120,66 @@ + + Users: Company Request + + Email Pendaftaran Bisnis dalam Proses Review + "Indoteknik.com" <noreply@indoteknik.com> + sales@indoteknik.com + ${object.login | safe} + + + +
+ + + + + + + + + + + + +
+ + + + + + + + +
+ +
+
+
+
+ + + + + + + + + + + + + + +
Halo ${object.name},
Terima kasih atas kepercayaan Anda dengan mendaftarkan bisnis Anda di Indoteknik.com. Permohonan Anda saat ini sedang dalam proses review oleh tim kami.
Saat ini, kami sedang melakukan pengecekan akhir pada data yang Anda berikan. Proses ini biasanya memakan waktu sekitar 2 x 24 jam.
Setelah proses review selesai, kami akan segera menginformasikan status akun bisnis Anda melalui email.
Jika ada pertanyaan lebih lanjut, jangan ragu untuk menghubungi kami di sales@indoteknik.com atau hubungi whatsapp kami di 0817-1718-1922
Terima kasih atas perhatiannya.
Hormat kami,
Indoteknik.com
+
+
+
+
+
+
Users: Company Request Approve -- cgit v1.2.3 From ae9fee48e26e0448e0a57d0fe6fe82fffe4b003b Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Thu, 28 Nov 2024 11:21:16 +0700 Subject: update switch account --- indoteknik_custom/views/res_users.xml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/views/res_users.xml b/indoteknik_custom/views/res_users.xml index bb643701..fd5642a1 100644 --- a/indoteknik_custom/views/res_users.xml +++ b/indoteknik_custom/views/res_users.xml @@ -275,17 +275,14 @@ - + - - - - - - + + + - - + + + + + + + + + + + + + + + + + + + +
Yth. ${object.parent_name},
Hai ${object.parent_name},
Selamat! Perpindahan akun bisnis Anda menjadi PKP di indoteknik.com telah berhasil kini anda dapat menikmati berbagai kemudahan dalam berbelanja, antara lain:
Fitur Faktur Pajak & Invoice: Dengan mudah download faktur pajak & Invoice Anda secara digital.
Pembayaran Lengkap: Pilih metode pembayaran yang sesuai dengan kebutuhan Anda, baik transfer bank, VA, kartu kredit, atau pembayaran tempo.
Pelacakan Pengiriman: Lacak status pengiriman pesanan Anda secara real-time.
Untuk memulai transaksi, silakan login Kembali menggunakan akun Anda di Indoteknik.com
Kami sangat senang dapat melayani Anda. Jika ada pertanyaan atau membutuhkan bantuan, jangan ragu untuk menghubungi tim layanan Customer kami di Whatsapp 0817-1718-1922 atau sales@indoteknik.com
Selamat! Akun bisnis Anda di indoteknik.com sekarang sudah resmi menjadi PKP dari yang sebelumnya Non-PKP.
Jangan lupa untuk mengecek kembali semua data perusahaan kamu, ya. Pastikan NPWP dan informasi Perusahaan lainnya sudah kamu isi dengan benar.
Kamu juga dapat mengubah informasi perusahaan dengan mengunjungi profil atau klik disini
Hormat kami,
Indoteknik.com
Industrial Supply & Solutions
Tim Indoteknik.com

Date: Thu, 28 Nov 2024 15:08:31 +0700 Subject: update email template --- indoteknik_custom/views/res_users.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/views/res_users.xml b/indoteknik_custom/views/res_users.xml index fd5642a1..ece6bc9b 100644 --- a/indoteknik_custom/views/res_users.xml +++ b/indoteknik_custom/views/res_users.xml @@ -244,7 +244,7 @@ Users: Switch Account Success - Email Switch Account Berhasil + Selamat! Bisnis Anda Sudah Naik Kelas Jadi PKP! "Indoteknik.com" <noreply@indoteknik.com> sales@indoteknik.com ${object.login | safe} -- cgit v1.2.3 From af39e11dba2e6f9a57a520003888884c9f0f2571 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Fri, 29 Nov 2024 10:02:48 +0700 Subject: update code switch account --- indoteknik_custom/models/user_company_request.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/user_company_request.py b/indoteknik_custom/models/user_company_request.py index dd9a35c1..4a62400f 100644 --- a/indoteknik_custom/models/user_company_request.py +++ b/indoteknik_custom/models/user_company_request.py @@ -14,7 +14,7 @@ class UserCompanyRequest(models.Model): ('rejected', 'Reject'), ], string='Approval') similar_company_ids = fields.Many2many('res.partner', compute="_compute_similar_companies", string="Similar Companies") - + is_switch_account = fields.Boolean( string='Switch Account', default=False) @api.depends('user_input') def _compute_similar_companies(self): for record in self: @@ -86,7 +86,7 @@ class UserCompanyRequest(models.Model): self.user_id.property_account_receivable_id = self.user_company_id.property_account_receivable_id self.user_id.property_account_payable_id = self.user_company_id.property_account_payable_id self.user_company_id.active = True - user.send_company_request_approve_mail() + user.send_company_switch_approve_mail() if vals.get('is_switch_account') == True else user.send_company_request_approve_mail() else: new_company = self.env['res.partner'].create({ 'name': self.user_input -- cgit v1.2.3 From 8b2897d9c72eb67382221d320d488543aea08323 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Wed, 4 Dec 2024 11:19:39 +0700 Subject: add logo email switch account --- indoteknik_custom/views/res_users.xml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/views/res_users.xml b/indoteknik_custom/views/res_users.xml index ece6bc9b..911225c0 100644 --- a/indoteknik_custom/views/res_users.xml +++ b/indoteknik_custom/views/res_users.xml @@ -44,6 +44,11 @@
Hormat kami,
PT. Indoteknik Dotcom Gemilang
+ Indoteknik +

Hormat kami,
Indoteknik.com
+ Indoteknik +

Hormat kami,
Indoteknik.com
+ Indoteknik +

Hormat kami,
Indoteknik.com
+ Indoteknik +

Industrial Supply & Solutions
Tim Indoteknik.com
+ Indoteknik +

Hormat kami,
Indoteknik.com
+ Indoteknik +

Date: Mon, 13 Jan 2025 15:34:13 +0700 Subject: if unlock PO harus approv finance & if not FAT cannot edit jurnal entris --- indoteknik_custom/models/account_move.py | 5 ++ indoteknik_custom/models/purchase_order.py | 74 ++++++++++++++++++++++++-- indoteknik_custom/security/ir.model.access.csv | 1 + indoteknik_custom/views/purchase_order.xml | 33 +++++++++++- 4 files changed, 109 insertions(+), 4 deletions(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index 725b3c2d..022a7f5f 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -318,6 +318,11 @@ class AccountMove(models.Model): if rec.statement_line_id and not rec.statement_line_id.statement_id.is_edit and rec.statement_line_id.statement_id.state == 'confirm': raise UserError('Bank Statement di Lock, Minta admin reconcile untuk unlock') + def write(self, vals): + if not self.env.user.is_accounting: + raise UserError("Hanya IT FAT yang bisa ubah data") + return super(AccountMove, self).write(vals) + # def write(self, vals): # res = super(AccountMove, self).write(vals) # for rec in self.line_ids: diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 799c4db0..f497dc9b 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -30,6 +30,11 @@ class PurchaseOrder(models.Model): ('pengajuan2', 'Approval Pimpinan'), #akbar - 7 temporary not used ('approved', 'Approved'), ], string='Approval Status', readonly=True, copy=False, index=True, tracking=3) + approval_status_unlock = fields.Selection([ + ('pengajuanFinance', 'Pengajuan Finance'), + ('approvedFinance', 'Approved Finance'), + ('approved', 'Approved'), + ], string='Approval Status Unlock', readonly=True, copy=False, index=True, tracking=3) delivery_amount = fields.Float('Delivery Amount', compute='compute_delivery_amount') delivery_amt = fields.Float('Delivery Amt') total_margin = fields.Float( @@ -75,6 +80,7 @@ class PurchaseOrder(models.Model): exclude_incoming = fields.Boolean(string='Exclude Incoming', default=False, help='Centang jika tidak mau masuk perhitungan Incoming Qty') not_update_purchasepricelist = fields.Boolean(string='Not Update Purchase Pricelist?') + reason_unlock = fields.Char(string='Alasan unlock', tracking=3) # total_cost_service = fields.Float(string='Total Cost Service') # total_delivery_amt = fields.Float(string='Total Delivery Amt') @@ -779,8 +785,12 @@ class PurchaseOrder(models.Model): def po_approve(self): greater_than_plafon, message = self._get_msg_plafon_qty() different_vendor_message = self.check_different_vendor_so() # Panggil fungsi check_different_vendor_so - - if self.env.user.is_leader or self.env.user.has_group('indoteknik_custom.group_role_merchandiser'): + if self.approval_status_unlock == 'pengajuanFinance': + if self.env.user.is_accounting: + self.approval_status_unlock = 'approvedFinance' + else: + raise UserError("Bisa langsung Confirm, menunggu persetujuan Finance jika ingin unlock PO") + elif self.env.user.is_leader or self.env.user.has_group('indoteknik_custom.group_role_merchandiser'): raise UserError("Bisa langsung Confirm") elif self.total_percent_margin == self.total_so_percent_margin and self.matches_so and not greater_than_plafon and not different_vendor_message: raise UserError("Bisa langsung Confirm") @@ -809,7 +819,17 @@ class PurchaseOrder(models.Model): subtype_id=self.env.ref("mail.mt_note").id ) - + def po_approve_unlock(self): + if self.approval_status_unlock == 'pengajuanFinance': + if self.env.user.is_accounting: + self.approval_status_unlock = 'approvedFinance' + else: + raise UserError("Menunggu persetujuan Finance jika ingin unlock PO") + elif self.approval_status_unlock == 'approvedFinance': + raise UserError("PO bisa langsung di unlock") + else: + raise UserError("Menunggu persetujuan Finance jika ingin unlock PO") + def check_different_vendor_so(self): vendor_po = self.partner_id.id message = '' @@ -953,3 +973,51 @@ class PurchaseOrder(models.Model): if line.product_id.type == 'product': sum_price_total += line.price_total order.amount_total_without_service = sum_price_total + + def button_unlock(self): + for order in self: + # Check if any order line has received_qty not equal to 0 + if self.env.user.is_accounting: + order.state = 'purchase' + order.approval_status_unlock = 'approved' + break + for line in order.order_line: + if line.qty_received > 0: + if order.approval_status_unlock == 'approvedFinance': + order.approval_status_unlock = 'approved' + order.state = 'purchase' + break + if order.approval_status_unlock == 'pengajuanFinance': + raise UserError(_( + "Menunggu Approve Dari Finance." + )) + else: + return { + 'type': 'ir.actions.act_window', + 'name': _('Untuk mengubah PO butuh approve dari Finance. Berikan alasan anda unlock PO!'), + 'res_model': 'purchase.order.unlock.wizard', + 'view_mode': 'form', + 'target': 'new', + 'context': { + 'default_purchase_order_id': order.id + } + } + + return super(PurchaseOrder, self).button_unlock() + + +class PurchaseOrderUnlockWizard(models.TransientModel): + _name = 'purchase.order.unlock.wizard' + _description = 'Wizard untuk memberikan alasan unlock PO' + + purchase_order_id = fields.Many2one('purchase.order', string='Purchase Order', required=True) + alasan = fields.Text(string='Alasan', required=True) + + def confirm_reject(self): + order = self.purchase_order_id + if order: + order.write({'reason_unlock': self.alasan}) + order.approval_status_unlock = 'pengajuanFinance' + return {'type': 'ir.actions.act_window_close'} + + diff --git a/indoteknik_custom/security/ir.model.access.csv b/indoteknik_custom/security/ir.model.access.csv index 6093636c..2b6d4420 100755 --- a/indoteknik_custom/security/ir.model.access.csv +++ b/indoteknik_custom/security/ir.model.access.csv @@ -150,3 +150,4 @@ access_va_multi_approve,access.va.multi.approve,model_va_multi_approve,,1,1,1,1 access_va_multi_reject,access.va.multi.reject,model_va_multi_reject,,1,1,1,1 access_stock_immediate_transfer,access.stock.immediate.transfer,model_stock_immediate_transfer,,1,1,1,1 access_coretax_faktur,access.coretax.faktur,model_coretax_faktur,,1,1,1,1 +access_purchase_order_unlock_wizard,access.purchase.order.unlock.wizard,model_purchase_order_unlock_wizard,,1,1,1,1 diff --git a/indoteknik_custom/views/purchase_order.xml b/indoteknik_custom/views/purchase_order.xml index d22c3b5c..fa11c373 100755 --- a/indoteknik_custom/views/purchase_order.xml +++ b/indoteknik_custom/views/purchase_order.xml @@ -20,6 +20,11 @@ type="object" attrs="{'invisible': [('approval_status', '=', 'approved')]}" /> + @@ -43,6 +48,9 @@ + + + @@ -137,7 +145,30 @@ - + + + purchase.order.unlock.wizard.form + purchase.order.unlock.wizard + +
+ + + +
+
+
+
+
+ + + Reject Reason + purchase.order.unlock.wizard + form + new + +
-- cgit v1.2.3 From ecc4356b7ac5ae14d4e86039589716fa76161230 Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Mon, 13 Jan 2025 15:59:21 +0700 Subject: ubah code --- indoteknik_custom/models/account_move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index 58f142dc..e681d96e 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -320,7 +320,7 @@ class AccountMove(models.Model): def write(self, vals): if not self.env.user.is_accounting: - raise UserError("Hanya IT FAT yang bisa ubah data") + raise UserError("Hanya Finence yang bisa ubah data") return super(AccountMove, self).write(vals) # def write(self, vals): -- cgit v1.2.3 From a5522dfd19488f2b76ad40d3ba9750852f92da73 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Wed, 15 Jan 2025 09:25:26 +0700 Subject: fix bug --- indoteknik_custom/models/account_move.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index e681d96e..2810c594 100644 --- a/indoteknik_custom/models/account_move.py +++ b/indoteknik_custom/models/account_move.py @@ -253,6 +253,11 @@ class AccountMove(models.Model): line.date_maturity = entry.date return res + def button_draft(self): + res = super(AccountMove, self).button_draft() + if not self.env.user.is_accounting: + raise UserError("Hanya Finence yang bisa ubah data") + return res def _compute_invoice_day_to_due(self): for invoice in self: @@ -318,11 +323,6 @@ class AccountMove(models.Model): if rec.statement_line_id and not rec.statement_line_id.statement_id.is_edit and rec.statement_line_id.statement_id.state == 'confirm': raise UserError('Bank Statement di Lock, Minta admin reconcile untuk unlock') - def write(self, vals): - if not self.env.user.is_accounting: - raise UserError("Hanya Finence yang bisa ubah data") - return super(AccountMove, self).write(vals) - # def write(self, vals): # res = super(AccountMove, self).write(vals) # for rec in self.line_ids: -- cgit v1.2.3 From e62ffd2f80bb216edcf92140f70ea0d5fee232bc Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Wed, 15 Jan 2025 09:36:31 +0700 Subject: hide menu tempo di menu utama --- indoteknik_custom/views/user_pengajuan_tempo.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/views/user_pengajuan_tempo.xml b/indoteknik_custom/views/user_pengajuan_tempo.xml index f9e747b3..33ad91cf 100644 --- a/indoteknik_custom/views/user_pengajuan_tempo.xml +++ b/indoteknik_custom/views/user_pengajuan_tempo.xml @@ -339,6 +339,6 @@ - - + + -- cgit v1.2.3 From 86661812c0c27c35f1df908a919d03d62f32cc3b Mon Sep 17 00:00:00 2001 From: it-fixcomart Date: Wed, 15 Jan 2025 10:54:48 +0700 Subject: ubah invisible ask aproval --- indoteknik_custom/views/sale_order.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indoteknik_custom') diff --git a/indoteknik_custom/views/sale_order.xml b/indoteknik_custom/views/sale_order.xml index 3539dbf3..008a04ed 100755 --- a/indoteknik_custom/views/sale_order.xml +++ b/indoteknik_custom/views/sale_order.xml @@ -14,7 +14,7 @@