Skip to content

Commit

Permalink
Merge PR #27 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by andhit-r
  • Loading branch information
ssi-bot committed Sep 23, 2024
2 parents 48a7791 + ba6d1ad commit be334f6
Show file tree
Hide file tree
Showing 11 changed files with 194 additions and 193 deletions.
3 changes: 3 additions & 0 deletions ssi_general_audit_worksheet_inherent_risk/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
],
"data": [
"security/ir_module_category_data.xml",
"security/res_group_data.xml",
"security/ir.model.access.csv",
"security/res_group/general_audit_ws_a418d89.xml",
"security/ir_model_access/general_audit_ws_a418d89.xml",
"security/ir_rule/general_audit_ws_a418d89.xml",
Expand All @@ -22,6 +24,7 @@
"data/policy_template/general_audit_ws_a418d89.xml",
"data/approval_template/general_audit_ws_a418d89.xml",
"data/general_audit_worksheet_type_data.xml",
"views/general_audit_inherent_risk_factor_views.xml",
"views/general_audit_ws_a418d89_views.xml",
"views/general_audit_standard_detail_views.xml",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="sequence_general_audit_ws_a418d89" model="ir.sequence">
<field name="name">Inherent Risk (a418d89)</field>
<field name="name">Account Level Inherent Risks (a418d89)</field>
<field name="code">general_audit_ws_a418d89</field>
<field name="padding">6</field>
<field name="prefix">WS-A418D89/%(range_year)s/</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0-standalone.html).

from . import (
general_audit_inherent_risk_factor,
general_audit_ws_a418d89,
general_audit_ws_a418d89_detail,
general_audit_standard_detail,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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 fields, models


class GeneralAuditInherentRiskFactor(models.Model):
_name = "general_audit_inherent_risk_factor"
_inherit = [
"mixin.master_data",
]
_description = "General Audit Inherent Risk Factor"
_order = "sequence, id"

sequence = fields.Integer(
string="Sequence",
default=10,
)
direct_impact = fields.Boolean(
string="Direct Impact to Risk",
default=False,
)
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,36 @@

class GeneralAuditWSA418D89(models.Model):
_name = "general_audit_ws_a418d89"
_description = "Inherent Risk (a418d89)"
_description = "Account Level Inherent Risk (a418d89)"
_inherit = [
"general_audit_worksheet_mixin",
]
_type_xml_id = "ssi_general_audit_worksheet_inherent_risk." "worksheet_type_a418d89"

risk_material_missstatement = fields.Selection(
string="Risk Material Misstatement",
selection=[
("low", "Low"),
("medium", "Medium"),
("high", "High"),
],
readonly=True,
required=False,
states={
"open": [
("readonly", False),
],
},
)
auditor_respons = fields.Text(
string="Auditor Respons",
readonly=True,
states={
"open": [
("readonly", False),
],
},
)
# risk_material_missstatement = fields.Selection(
# string="Risk Material Misstatement",
# selection=[
# ("low", "Low"),
# ("medium", "Medium"),
# ("high", "High"),
# ],
# readonly=True,
# required=False,
# states={
# "open": [
# ("readonly", False),
# ],
# },
# )
# auditor_respons = fields.Text(
# string="Auditor Respons",
# readonly=True,
# states={
# "open": [
# ("readonly", False),
# ],
# },
# )
detail_ids = fields.One2many(
string="Details",
comodel_name="general_audit_ws_a418d89.detail",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,26 @@ class GeneralAuditWSA418D89Detail(models.Model):
related="standard_detail_id.sequence",
store=True,
)
inherent_risk_factor_without_impact_ids = fields.Many2many(
string="Inherent Risk Factor Without Direct Impact",
comodel_name="general_audit_inherent_risk_factor",
relation="rel_general_audit_ws_a418d89_detail_2_without_impact",
column1="detail_id",
column2="inherent_risk_factor_id",
domain=[
("direct_impact", "=", False),
],
)
inherent_risk_factor_with_impact_ids = fields.Many2many(
string="Inherent Risk Factor With Direct Impact",
comodel_name="general_audit_inherent_risk_factor",
relation="rel_general_audit_ws_a418d89_detail_2_with_impact",
column1="detail_id",
column2="inherent_risk_factor_id",
domain=[
("direct_impact", "=", False),
],
)
inherent_risk_factor_a = fields.Boolean(
string="Inherent Risk Factor A",
default=False,
Expand Down Expand Up @@ -120,11 +140,7 @@ class GeneralAuditWSA418D89Detail(models.Model):
@api.depends(
"likelihood_risk_occuring",
"impact_of_risk",
"inherent_risk_factor_f",
"inherent_risk_factor_g",
"inherent_risk_factor_h",
"inherent_risk_factor_i",
"inherent_risk_factor_j",
"inherent_risk_factor_with_impact_ids",
"fraud_risk",
"other_significant_risk_factor",
)
Expand All @@ -135,13 +151,9 @@ def _compute_risk(self):
if record.impact_of_risk == "high":
inherent_risk = "high"
if (
record.inherent_risk_factor_f
or record.inherent_risk_factor_g
or record.inherent_risk_factor_h
or record.inherent_risk_factor_i
or record.inherent_risk_factor_j
or record.fraud_risk
) or record.other_significant_risk_factor:
record.inherent_risk_factor_with_impact_ids
or record.other_significant_risk_factor
):
significant_risk = True
elif record.impact_of_risk == "low":
inherent_risk = "medium"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
client_general_audit_inherent_risk_factor_configurator,general_audit_inherent_risk_factor - configurator,model_general_audit_inherent_risk_factor,general_audit_inherent_risk_factor_group,1,1,1,1
client_general_audit_inherent_risk_factor_all,general_audit_inherent_risk_factor - all,model_general_audit_inherent_risk_factor,,1,0,0,0
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
id="general_audit_ws_a418d89_workflow_module_category"
model="ir.module.category"
>
<field name="name">Inherent Risk (a418d89)</field>
<field name="name">Account Level Inherent Risks (a418d89)</field>
<field name="parent_id" ref="ssi_accountant.accountant_workflow_module_category" />
</record>

<record id="general_audit_ws_a418d89_data_module_category" model="ir.module.category">
<field name="name">Inherent Risk (a418d89)</field>
<field name="name">Account Level Inherent Risks (a418d89)</field>
<field name="parent_id" ref="ssi_accountant.accountant_data_module_category" />
</record>

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

<record id="general_audit_inherent_risk_factor_group" model="res.groups">
<field name="name">Inherent Risk Factor</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,77 @@
<?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_inherent_risk_factor_view_search" model="ir.ui.view">
<field name="name">general_audit_inherent_risk_factor - search</field>
<field name="model">general_audit_inherent_risk_factor</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_inherent_risk_factor_view_tree" model="ir.ui.view">
<field name="name">general_audit_inherent_risk_factor - tree</field>
<field name="model">general_audit_inherent_risk_factor</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>
<xpath expr="//field[@name='code']" position="before">
<field name="sequence" widget="handle" />
</xpath>
<xpath expr="//field[@name='name']" position="after">
<field name="direct_impact" />
</xpath>
</data>
</field>
</record>

<record id="general_audit_inherent_risk_factor_view_form" model="ir.ui.view">
<field name="name">general_audit_inherent_risk_factor - form</field>
<field name="model">general_audit_inherent_risk_factor</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>
<xpath expr="//field[@name='code']" position="after">
<field name="sequence" />
<field name="direct_impact" />
</xpath>
</data>
</field>
</record>

<record
id="general_audit_inherent_risk_factor_action"
model="ir.actions.act_window"
>
<field name="name">Inherent Risks Factors</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">general_audit_inherent_risk_factor</field>
<field name="view_mode">tree,form</field>
</record>

<menuitem
id="general_audit_inherent_risk_factor_menu"
name="Inherent Risks Factors"
parent="ssi_general_audit.menu_configuration_general_audit"
action="general_audit_inherent_risk_factor_action"
sequence="110"
groups="general_audit_inherent_risk_factor_group"
/>

</odoo>
Loading

0 comments on commit be334f6

Please sign in to comment.