diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-08-04 08:39:32 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-08-04 08:39:32 +0700 |
| commit | c4e1c36e28e4e9585f58e28326d1b0889eb1fa1f (patch) | |
| tree | e4c1c0671437c6ea109ef15d2e15b225db0f619c /indoteknik_custom | |
| parent | b52e037b7331a783056d9776f17253d83b1a52ad (diff) | |
| parent | c8ef030b4c1cb6b8daa14c081f569c71fbbda639 (diff) | |
<hafid> merging odoo-backup
Diffstat (limited to 'indoteknik_custom')
| -rw-r--r-- | indoteknik_custom/models/refund_sale_order.py | 7 | ||||
| -rwxr-xr-x | indoteknik_custom/security/ir.model.access.csv | 4 | ||||
| -rw-r--r-- | indoteknik_custom/views/refund_sale_order.xml | 6 | ||||
| -rw-r--r-- | indoteknik_custom/views/res_partner.xml | 2 |
4 files changed, 13 insertions, 6 deletions
diff --git a/indoteknik_custom/models/refund_sale_order.py b/indoteknik_custom/models/refund_sale_order.py index 80d66d8d..65e93ba4 100644 --- a/indoteknik_custom/models/refund_sale_order.py +++ b/indoteknik_custom/models/refund_sale_order.py @@ -649,6 +649,13 @@ class RefundSaleOrder(models.Model): def action_open_journal_refund(self): self.ensure_one() + + is_fat = self.env.user.has_group('indoteknik_custom.group_role_fat') + allowed_user_ids = [19, 688, 7] + + if not is_fat and self.env.user.id not in allowed_user_ids: + raise UserError(_('Anda tidak memiliki akses untuk membuka Journal Refund.')) + if self.journal_refund_move_id: return { 'name': _('Journal Refund'), diff --git a/indoteknik_custom/security/ir.model.access.csv b/indoteknik_custom/security/ir.model.access.csv index 9b43bf2a..0ac3e86c 100755 --- a/indoteknik_custom/security/ir.model.access.csv +++ b/indoteknik_custom/security/ir.model.access.csv @@ -161,7 +161,6 @@ access_konfirm_koli,access.konfirm.koli,model_konfirm_koli,,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 -access_change_date_planned_wizard,access.change.date.planned.wizard,model_change_date_planned_wizard,,1,1,1,1 access_sales_order_koli,access.sales.order.koli,model_sales_order_koli,,1,1,1,1 access_stock_backorder_confirmation,access.stock.backorder.confirmation,model_stock_backorder_confirmation,,1,1,1,1 access_warning_modal_wizard,access.warning.modal.wizard,model_warning_modal_wizard,,1,1,1,1 @@ -184,7 +183,8 @@ access_production_purchase_match,access.production.purchase.match,model_producti access_image_carousel,access.image.carousel,model_image_carousel,,1,1,1,1 access_v_sale_notin_matchpo,access.v.sale.notin.matchpo,model_v_sale_notin_matchpo,,1,1,1,1 access_approval_payment_term,access.approval.payment.term,model_approval_payment_term,,1,1,1,1 - +access_refund_sale_order,access.refund.sale.order,model_refund_sale_order,base.group_user,1,1,1,1 +access_refund_sale_order_line,access.refund.sale.order.line,model_refund_sale_order_line,base.group_user,1,1,1,1 access_purchasing_job_seen,purchasing.job.seen,model_purchasing_job_seen,,1,1,1,1 access_tukar_guling_all_users,tukar.guling.all.users,model_tukar_guling,base.group_user,1,1,1,1 diff --git a/indoteknik_custom/views/refund_sale_order.xml b/indoteknik_custom/views/refund_sale_order.xml index 0c4eaa56..e35e76b3 100644 --- a/indoteknik_custom/views/refund_sale_order.xml +++ b/indoteknik_custom/views/refund_sale_order.xml @@ -59,14 +59,14 @@ attrs="{'invisible': ['|', ('status_payment', '!=', 'pending'), ('status', '=', 'reject')]}" /> <button name="action_confirm_refund" type="object" - string="Confirm Refund" + string="Confirm Payment" class="btn-primary" attrs="{'invisible': ['|', ('status', 'not in', ['pengajuan3','refund']), ('status_payment', '!=', 'pending')]}"/> <button name="action_create_journal_refund" - string="Journal Refund" + string="AP Only" type="object" class="oe_highlight" - attrs="{'invisible': [('journal_refund_state', '=', 'posted')]}"/> + attrs="{'invisible': ['|', ('journal_refund_state', '=', 'posted'), ('status', 'not in', ['pengajuan3','refund'])]}"/> <field name="status" widget="statusbar" diff --git a/indoteknik_custom/views/res_partner.xml b/indoteknik_custom/views/res_partner.xml index a030a75c..38cd2756 100644 --- a/indoteknik_custom/views/res_partner.xml +++ b/indoteknik_custom/views/res_partner.xml @@ -217,7 +217,7 @@ <group string="Aging Info"> <field name="avg_aging" readonly="1"/> <field name="payment_difficulty" attrs="{'readonly': [('parent_id', '!=', False)]}" /> - <field name="payment_history_url" readonly="1" /> + <field name="payment_history_url" readonly="1" widget="url"/> </group> </page> </notebook> |
