Skip to content

Commit

Permalink
[UPD] ssi_general_audit_worksheet_control_risk
Browse files Browse the repository at this point in the history
* Menambahkan master data assertion type
* Memperbaiki KK IT Control Evaluation
  • Loading branch information
andhit-r committed Sep 23, 2024
1 parent 9577888 commit 9ac31dc
Show file tree
Hide file tree
Showing 9 changed files with 109 additions and 14 deletions.
1 change: 1 addition & 0 deletions ssi_general_audit_worksheet_control_risk/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"data/approval_template/general_audit_ws_f63f569.xml",
"data/general_audit_worksheet_type_data.xml",
"menu.xml",
"views/general_audit_assersion_type_views.xml",
"views/general_audit_general_control_category_views.xml",
"views/general_audit_general_control_views.xml",
"views/general_audit_general_control_indicator_views.xml",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
general_audit_it_control,
general_audit_it_control_indicator,
general_audit_it_control_set,
general_audit_assersion_type,
general_audit_ws_d3d2719,
general_audit_ws_d3d2719_detail,
general_audit_ws_d3d2719_indicator,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2022 OpenSynergy Indonesia
# Copyright 2022 PT. Simetri Sinergi Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0-standalone.html).

from odoo import models


class GeneralAuditAssersionType(models.Model):
_name = "general_audit_assersion_type"
_inherit = [
"mixin.master_data",
]
_description = "General Audit - Assersion Type"
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@

class GeneralAuditWSF63F569(models.Model):
_name = "general_audit_ws_f63f569"
_description = "General Control Evaluation (f63f569)"
_description = "IT Control Evaluation (f63f569)"
_inherit = [
"general_audit_worksheet_mixin",
]
_type_xml_id = "ssi_general_audit_worksheet_control_risk." "worksheet_type_f63f569"

set_id = fields.Many2one(
string="General Control Set",
comodel_name="general_audit_general_control_set",
string="IT Control Set",
comodel_name="general_audit_it_control_set",
readonly=True,
states={
"draft": [
Expand Down Expand Up @@ -53,14 +53,14 @@ def _01_compute_detail(self):
self.detail_ids.unlink()
Detail = self.env["general_audit_ws_f63f569.detail"]
Indicator = self.env["general_audit_ws_f63f569.indicator"]
general_control_set = self.set_id
for control in general_control_set.general_control_ids:
control_set = self.set_id
for control in control_set.it_control_ids:
data = {
"worksheet_id": self.id,
"control_id": control.id,
}
detail = Detail.create(data)
for indicator in general_control_set.general_control_indicator_ids.filtered(
for indicator in control_set.it_control_indicator_ids.filtered(
lambda r: r.control_id.id == control.id
):
data = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class GeneralAuditWSF63F569Detail(models.Model):
ondelete="cascade",
)
control_id = fields.Many2one(
string="General Control",
comodel_name="general_audit_general_control",
string="IT Control",
comodel_name="general_audit_it_control",
required=True,
)
category_id = fields.Many2one(
Expand All @@ -29,8 +29,9 @@ class GeneralAuditWSF63F569Detail(models.Model):
result = fields.Selection(
string="Result",
selection=[
("adequate", "Adequate"),
("inadequate", "Inadequate"),
("yes", "Yes"),
("no", "No"),
("na", "N/A"),
],
)
explanation = fields.Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ class GeneralAuditWSF63F569Indicator(models.Model):
)
indicator_id = fields.Many2one(
string="Indicator",
comodel_name="general_audit_general_control_indicator",
comodel_name="general_audit_it_control_indicator",
required=True,
)
result = fields.Selection(
string="Result",
selection=[
("adequate", "Adequate"),
("inadequate", "Inadequate"),
("yes", "Yes"),
("no", "No"),
("na", "N/A"),
],
)
explanation = fields.Text(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ client_general_audit_it_control_configurator,general_audit_it_control - configur
client_general_audit_it_control_all,general_audit_it_control - all,model_general_audit_it_control,,1,0,0,0
client_general_audit_it_control_indicator_configurator,general_audit_it_control_indicator - configurator,model_general_audit_it_control_indicator,general_audit_it_control_indicator_group,1,1,1,1
client_general_audit_it_control_indicator_all,general_audit_it_control_indicator - all,model_general_audit_it_control_indicator,,1,0,0,0
client_general_audit_it_control_set_configurator,general_audit_it_control_set - configurator,model_general_audit_it_control_set,general_audit_it_control_indicator_group,1,1,1,1
client_general_audit_it_control_set_configurator,general_audit_it_control_set - configurator,model_general_audit_it_control_set,general_audit_it_control_set_group,1,1,1,1
client_general_audit_it_control_set_all,general_audit_it_control_set - all,model_general_audit_it_control_set,,1,0,0,0
client_general_audit_assersion_type_configurator,general_audit_assersion_type - configurator,model_general_audit_assersion_type,general_audit_assersion_type_group,1,1,1,1
client_general_audit_assersion_type_all,general_audit_assersion_type - all,model_general_audit_assersion_type,,1,0,0,0
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,17 @@
/>
</record>

<record id="general_audit_assersion_type_group" model="res.groups">
<field name="name">Assersion Type</field>
<field
name="category_id"
ref="ssi_accountant.accountant_configurator_module_category"
/>
<field
name="users"
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"
/>
</record>


</odoo>
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" ?>
<!-- Copyright 2022 OpenSynergy Indonesia
Copyright 2022 PT. Simetri Sinergi Indonesia
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0-standalone.html). -->
<odoo>

<record id="general_audit_assersion_type_view_search" model="ir.ui.view">
<field name="name">general_audit_assersion_type - search</field>
<field name="model">general_audit_assersion_type</field>
<field
name="inherit_id"
ref="ssi_master_data_mixin.mixin_master_data_view_search"
/>
<field name="mode">primary</field>
<field name="arch" type="xml">
<data />
</field>
</record>

<record id="general_audit_assersion_type_view_tree" model="ir.ui.view">
<field name="name">general_audit_assersion_type - tree</field>
<field name="model">general_audit_assersion_type</field>
<field
name="inherit_id"
ref="ssi_master_data_mixin.mixin_master_data_view_tree"
/>
<field name="mode">primary</field>
<field name="arch" type="xml">
<data>
</data>
</field>
</record>

<record id="general_audit_assersion_type_view_form" model="ir.ui.view">
<field name="name">general_audit_assersion_type - form</field>
<field name="model">general_audit_assersion_type</field>
<field
name="inherit_id"
ref="ssi_master_data_mixin.mixin_master_data_view_form"
/>
<field name="mode">primary</field>
<field name="arch" type="xml">
<data>
</data>
</field>
</record>

<record id="general_audit_assersion_type_action" model="ir.actions.act_window">
<field name="name">Assersion Types</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">general_audit_assersion_type</field>
<field name="view_mode">tree,form</field>
</record>

<menuitem
id="general_audit_assersion_type_menu"
name="Assersion Types"
parent="ssi_general_audit.menu_configuration_general_audit"
action="general_audit_assersion_type_action"
sequence="110"
groups="general_audit_assersion_type_group"
/>

</odoo>

0 comments on commit 9ac31dc

Please sign in to comment.