From 98383dd65a684799648e17400146dd86dc8dcb09 Mon Sep 17 00:00:00 2001 From: Andhitia Rama Date: Sat, 20 Jul 2024 23:36:47 +0700 Subject: [PATCH] [UPD] ssi_general_audit --- ssi_general_audit/models/client_account.py | 9 ++-- .../models/client_trial_balance.py | 4 +- .../client_trial_balance_standard_detail.py | 2 +- .../views/client_account_mapping_views.xml | 24 +++++++--- .../views/client_account_type_views.xml | 33 ++++++++++++- .../views/client_account_views.xml | 48 ++++++++++++++++++- .../views/client_trial_balance_views.xml | 24 +++++++--- .../views/general_audit_views.xml | 28 +++++++---- .../wizards/import_client_account.xml | 2 +- 9 files changed, 145 insertions(+), 29 deletions(-) diff --git a/ssi_general_audit/models/client_account.py b/ssi_general_audit/models/client_account.py index 536e4f3..15b28c8 100644 --- a/ssi_general_audit/models/client_account.py +++ b/ssi_general_audit/models/client_account.py @@ -35,11 +35,14 @@ class ClientAccount(models.Model): required=False, ondelete="restrict", ) + group_id = fields.Many2one( + string="Account Group", + related="type_id.group_id", + store=True, + ) normal_balance = fields.Selection( - string="Normal Balance", related="type_id.normal_balance", - stored=True, - required=False, + store=True, ) @api.onchange( diff --git a/ssi_general_audit/models/client_trial_balance.py b/ssi_general_audit/models/client_trial_balance.py index a8bbb4c..2d21b83 100644 --- a/ssi_general_audit/models/client_trial_balance.py +++ b/ssi_general_audit/models/client_trial_balance.py @@ -439,7 +439,7 @@ def _check_debit_credit(self): def _reload_account(self): self.ensure_one() ClientAccount = self.env["client_account"] - Detail = self.env["client_trial_balance_detail"] + Detail = self.env["client_trial_balance.detail"] criteria = [ ("partner_id", "=", self.partner_id.id), ] @@ -469,7 +469,7 @@ def _get_account_type_dict(self): "account_type": {}, "account_group": {}, } - StandardDetail = self.env["client_trial_balance_standard_detail"] + StandardDetail = self.env["client_trial_balance.standard_detail"] criteria = [ ("trial_balance_id", "=", self.id), ] diff --git a/ssi_general_audit/models/client_trial_balance_standard_detail.py b/ssi_general_audit/models/client_trial_balance_standard_detail.py index dd5e991..255a3b0 100644 --- a/ssi_general_audit/models/client_trial_balance_standard_detail.py +++ b/ssi_general_audit/models/client_trial_balance_standard_detail.py @@ -28,7 +28,7 @@ class ClientTrialBalanceStandardDetail(models.Model): "trial_balance_id.detail_ids.credit", ) def _compute_balance(self): - obj_detail = self.env["client_trial_balance_detail"] + obj_detail = self.env["client_trial_balance.detail"] for document in self: balance = opening_balance = debit = credit = 0.0 criteria = [ diff --git a/ssi_general_audit/views/client_account_mapping_views.xml b/ssi_general_audit/views/client_account_mapping_views.xml index 18d8250..98645be 100644 --- a/ssi_general_audit/views/client_account_mapping_views.xml +++ b/ssi_general_audit/views/client_account_mapping_views.xml @@ -49,12 +49,24 @@ - - - - - - + diff --git a/ssi_general_audit/views/client_account_type_views.xml b/ssi_general_audit/views/client_account_type_views.xml index 92026d0..1620299 100644 --- a/ssi_general_audit/views/client_account_type_views.xml +++ b/ssi_general_audit/views/client_account_type_views.xml @@ -13,7 +13,34 @@ /> primary - + + + + + + + + + + + + @@ -30,6 +57,10 @@ + + + + diff --git a/ssi_general_audit/views/client_account_views.xml b/ssi_general_audit/views/client_account_views.xml index 5123699..1d75bc2 100644 --- a/ssi_general_audit/views/client_account_views.xml +++ b/ssi_general_audit/views/client_account_views.xml @@ -13,7 +13,46 @@ /> primary - + + + + + + + + + + + + + + + + @@ -30,6 +69,12 @@ + + + + + + @@ -48,6 +93,7 @@ + diff --git a/ssi_general_audit/views/client_trial_balance_views.xml b/ssi_general_audit/views/client_trial_balance_views.xml index 04ebb78..3d7af93 100644 --- a/ssi_general_audit/views/client_trial_balance_views.xml +++ b/ssi_general_audit/views/client_trial_balance_views.xml @@ -52,12 +52,24 @@ - - - - - - + - - + + - - - - - - + diff --git a/ssi_general_audit/wizards/import_client_account.xml b/ssi_general_audit/wizards/import_client_account.xml index 292e436..c1c74ef 100644 --- a/ssi_general_audit/wizards/import_client_account.xml +++ b/ssi_general_audit/wizards/import_client_account.xml @@ -10,7 +10,7 @@
- +