From 2f318138589b01a75b289218460a40466cd377a6 Mon Sep 17 00:00:00 2001 From: eman Date: Thu, 23 Jan 2025 01:13:38 +0200 Subject: [PATCH] Fix issues in expenses and accounting --- .../account_gl_custom/views/account_move_view.xml | 2 +- odex25_accounting/exp_budget_check/models/hr_expense.py | 6 +++--- odex25_accounting/petty_invoice/views/account_move_view.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/odex25_accounting/account_gl_custom/views/account_move_view.xml b/odex25_accounting/account_gl_custom/views/account_move_view.xml index a060a7178..ef3677e88 100644 --- a/odex25_accounting/account_gl_custom/views/account_move_view.xml +++ b/odex25_accounting/account_gl_custom/views/account_move_view.xml @@ -6,7 +6,7 @@ account.move - + diff --git a/odex25_accounting/exp_budget_check/models/hr_expense.py b/odex25_accounting/exp_budget_check/models/hr_expense.py index 183a7348b..21133910b 100644 --- a/odex25_accounting/exp_budget_check/models/hr_expense.py +++ b/odex25_accounting/exp_budget_check/models/hr_expense.py @@ -58,9 +58,9 @@ class AccountMove(models.Model): def action_submit_expenses(self): for record in self: if record.analytic_account_id.is_analytic_budget: - if record.state == 'draft': - record.write({'state': 'confirm'}) - elif record.state == 'confirm' and not record.is_approve: + # if record.state == 'draft': + # record.write({'state': 'confirm'}) + if record.state == 'confirm' and not record.is_approve: raise UserError(_('Please Check Budget First')) elif record.state == 'confirm' and record.is_approve: break diff --git a/odex25_accounting/petty_invoice/views/account_move_view.xml b/odex25_accounting/petty_invoice/views/account_move_view.xml index 7b45cf845..4d5c82f91 100644 --- a/odex25_accounting/petty_invoice/views/account_move_view.xml +++ b/odex25_accounting/petty_invoice/views/account_move_view.xml @@ -27,8 +27,8 @@ - - + +