Skip to content

Commit

Permalink
Merge PR #30 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 27, 2024
2 parents 2f21480 + 92aa39c commit d1d780f
Show file tree
Hide file tree
Showing 27 changed files with 1,059 additions and 5 deletions.
1 change: 1 addition & 0 deletions ssi_general_audit/models/general_audit_worksheet_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class GeneralAuditWorksheetMixin(models.AbstractModel):
worksheet_id = fields.Many2one(
string="# Worksheet",
comodel_name="general_audit_worksheet",
required=True,
readonly=True,
ondelete="cascade",
)
Expand Down
10 changes: 10 additions & 0 deletions ssi_general_audit_worksheet_control_risk/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"installable": True,
"depends": [
"ssi_general_audit_worksheet_understanding_entity",
"ssi_general_audit_worksheet_inherent_risk",
],
"data": [
"security/res_group_data.xml",
Expand All @@ -19,29 +20,37 @@
"security/res_group/general_audit_ws_d3d2719.xml",
"security/res_group/general_audit_ws_f63f569.xml",
"security/res_group/general_audit_ws_eabdaad.xml",
"security/res_group/general_audit_ws_ba9b2f0.xml",
"security/ir_model_access/general_audit_ws_d3d2719.xml",
"security/ir_model_access/general_audit_ws_f63f569.xml",
"security/ir_model_access/general_audit_ws_eabdaad.xml",
"security/ir_model_access/general_audit_ws_ba9b2f0.xml",
"security/ir_rule/general_audit_ws_d3d2719.xml",
"security/ir_rule/general_audit_ws_f63f569.xml",
"security/ir_rule/general_audit_ws_eabdaad.xml",
"security/ir_rule/general_audit_ws_ba9b2f0.xml",
"data/ir_sequence/general_audit_ws_d3d2719.xml",
"data/ir_sequence/general_audit_ws_f63f569.xml",
"data/ir_sequence/general_audit_ws_eabdaad.xml",
"data/ir_sequence/general_audit_ws_ba9b2f0.xml",
"data/sequence_template/general_audit_ws_d3d2719.xml",
"data/sequence_template/general_audit_ws_f63f569.xml",
"data/sequence_template/general_audit_ws_eabdaad.xml",
"data/sequence_template/general_audit_ws_ba9b2f0.xml",
"data/policy_template/general_audit_ws_d3d2719.xml",
"data/policy_template/general_audit_ws_f63f569.xml",
"data/policy_template/general_audit_ws_eabdaad.xml",
"data/policy_template/general_audit_ws_ba9b2f0.xml",
"data/approval_template/general_audit_ws_d3d2719.xml",
"data/approval_template/general_audit_ws_f63f569.xml",
"data/approval_template/general_audit_ws_eabdaad.xml",
"data/approval_template/general_audit_ws_ba9b2f0.xml",
"data/general_audit_worksheet_type_data.xml",
"menu.xml",
"views/general_audit_assersion_type_views.xml",
"views/general_audit_control_activity_views.xml",
"views/general_audit_key_internal_control_views.xml",
"views/general_audit_account_key_internal_control_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 All @@ -53,6 +62,7 @@
"views/general_audit_ws_d3d2719_views.xml",
"views/general_audit_ws_f63f569_views.xml",
"views/general_audit_ws_eabdaad_views.xml",
"views/general_audit_ws_ba9b2f0_views.xml",
],
"demo": [],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?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="approval_template_general_audit_ws_ba9b2f0" model="approval.template">
<field name="name">Standard</field>
<field name="model_id" ref="model_general_audit_ws_ba9b2f0" />
<field name="sequence" eval="100" />
<field name="computation_method">use_python</field>
<field name="python_code">result = True</field>
<field name="validate_sequence" eval="1" />
</record>

<record
id="approval_template_detail_general_audit_ws_ba9b2f0"
model="approval.template_detail"
>
<field name="template_id" ref="approval_template_general_audit_ws_ba9b2f0" />
<field name="approver_selection_method">use_group</field>
<field
name="approver_group_ids"
eval="[(6,0,[ref('general_audit_ws_ba9b2f0_validator_group')])]"
/>
</record>
</odoo>
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,21 @@
</record>

<record id="worksheet_type_eabdaad" model="general_audit_worksheet_type">
<field name="code">EABdAAD</field>
<field name="code">EABDAAD</field>
<field name="name">Business Cycle Internal Control</field>
<field name="sequence" eval="14000" />
<field name="category_id" ref="ssi_general_audit.worksheet_type_category_ra" />
</record>

<record id="worksheet_type_ba9b2f0" model="general_audit_worksheet_type">
<field name="code">BA9B2F0</field>
<field name="name">Standard Account Internal Control</field>
<field name="sequence" eval="14000" />
<field name="category_id" ref="ssi_general_audit.worksheet_type_category_ra" />
</record>




</data>
</odoo>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?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="sequence_general_audit_ws_ba9b2f0" model="ir.sequence">
<field name="name">Standard Account Internal Control (ba9b2f0)</field>
<field name="code">general_audit_ws_ba9b2f0</field>
<field name="padding">6</field>
<field name="prefix">WS-BA9B2F0/%(range_year)s/</field>
<field eval="1" name="number_next" />
<field eval="1" name="number_increment" />
<field name="use_date_range" eval="1" />
</record>
</odoo>
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
<?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="policy_template_general_audit_ws_ba9b2f0" model="policy.template">
<field name="name">Standard</field>
<field name="model_id" ref="model_general_audit_ws_ba9b2f0" />
<field
name="state_field_id"
search="[('model_id.model','=','general_audit_ws_ba9b2f0'),('name','=','state')]"
/>
<field name="sequence" eval="100" />
<field name="python_code">result=True</field>
</record>

<!-- Start -->
<record
id="policy_template_general_audit_ws_ba9b2f0_open"
model="policy.template_detail"
>
<field name="template_id" ref="policy_template_general_audit_ws_ba9b2f0" />
<field
name="field_id"
search="[('model_id.model','=','general_audit_ws_ba9b2f0'),('name','=','open_ok')]"
/>
<field name="restrict_state" eval="1" />
<field
name="state_ids"
search="[('field_id.model_id.model','=','general_audit_ws_ba9b2f0'),('value','=','draft')]"
/>
<field name="restrict_user" eval="1" />
<field name="computation_method">use_group</field>
<field
name="group_ids"
eval="[(6,0,[ref('general_audit_ws_ba9b2f0_user_group')])]"
/>
<field name="restrict_additional" eval="0" />
</record>

<!-- Confirm -->
<record
id="policy_template_general_audit_ws_ba9b2f0_confirm"
model="policy.template_detail"
>
<field name="template_id" ref="policy_template_general_audit_ws_ba9b2f0" />
<field
name="field_id"
search="[('model_id.model','=','general_audit_ws_ba9b2f0'),('name','=','confirm_ok')]"
/>
<field name="restrict_state" eval="1" />
<field
name="state_ids"
search="[('field_id.model_id.model','=','general_audit_ws_ba9b2f0'),('value','=','open')]"
/>
<field name="restrict_user" eval="1" />
<field name="computation_method">use_group</field>
<field
name="group_ids"
eval="[(6,0,[ref('general_audit_ws_ba9b2f0_user_group')])]"
/>
<field name="restrict_additional" eval="0" />
</record>

<!-- Cancel -->
<record
id="policy_template_general_audit_ws_ba9b2f0_cancel"
model="policy.template_detail"
>
<field name="template_id" ref="policy_template_general_audit_ws_ba9b2f0" />
<field
name="field_id"
search="[('model_id.model','=','general_audit_ws_ba9b2f0'),('name','=','cancel_ok')]"
/>
<field name="restrict_state" eval="1" />
<field
name="state_ids"
search="[('field_id.model_id.model','=','general_audit_ws_ba9b2f0'),('value','in',['draft','open','done'])]"
/>
<field name="restrict_user" eval="1" />
<field name="computation_method">use_group</field>
<field
name="group_ids"
eval="[(6,0,[ref('general_audit_ws_ba9b2f0_validator_group')])]"
/>
<field name="restrict_additional" eval="0" />
</record>

<!-- Restart -->
<record
id="policy_template_general_audit_ws_ba9b2f0_restart"
model="policy.template_detail"
>
<field name="template_id" ref="policy_template_general_audit_ws_ba9b2f0" />
<field
name="field_id"
search="[('model_id.model','=','general_audit_ws_ba9b2f0'),('name','=','restart_ok')]"
/>
<field name="restrict_state" eval="1" />
<field
name="state_ids"
search="[('field_id.model_id.model','=','general_audit_ws_ba9b2f0'),('value','in',['cancel','reject'])]"
/>
<field name="restrict_user" eval="1" />
<field name="computation_method">use_group</field>
<field
name="group_ids"
eval="[(6,0,[ref('general_audit_ws_ba9b2f0_validator_group')])]"
/>
<field name="restrict_additional" eval="0" />
</record>

<!-- Reject -->
<record
id="policy_template_general_audit_ws_ba9b2f0_reject"
model="policy.template_detail"
>
<field name="template_id" ref="policy_template_general_audit_ws_ba9b2f0" />
<field
name="field_id"
search="[('model_id.model','=','general_audit_ws_ba9b2f0'),('name','=','reject_ok')]"
/>
<field name="restrict_state" eval="1" />
<field
name="state_ids"
search="[('field_id.model_id.model','=','general_audit_ws_ba9b2f0'),('value','=','confirm')]"
/>
<field name="restrict_user" eval="0" />
<field name="restrict_additional" eval="1" />
<field name="additional_python_code">result = False
if env.user.id in document.active_approver_user_ids.ids:
result = True</field>
</record>

<!-- Approve -->
<record
id="policy_template_general_audit_ws_ba9b2f0_approve"
model="policy.template_detail"
>
<field name="template_id" ref="policy_template_general_audit_ws_ba9b2f0" />
<field
name="field_id"
search="[('model_id.model','=','general_audit_ws_ba9b2f0'),('name','=','approve_ok')]"
/>
<field name="restrict_state" eval="1" />
<field
name="state_ids"
search="[('field_id.model_id.model','=','general_audit_ws_ba9b2f0'),('value','=','confirm')]"
/>
<field name="restrict_user" eval="0" />
<field name="restrict_additional" eval="1" />
<field name="additional_python_code">result = False
if env.user.id in document.active_approver_user_ids.ids:
result = True</field>
</record>

<!-- Manual Number -->
<record
id="policy_template_general_audit_ws_ba9b2f0_manual_number"
model="policy.template_detail"
>
<field name="template_id" ref="policy_template_general_audit_ws_ba9b2f0" />
<field
name="field_id"
search="[('model_id.model','=','general_audit_ws_ba9b2f0'),('name','=','manual_number_ok')]"
/>
<field name="restrict_state" eval="1" />
<field
name="state_ids"
search="[('field_id.model_id.model','=','general_audit_ws_ba9b2f0'),('value','=','draft')]"
/>
<field name="restrict_user" eval="1" />
<field name="computation_method">use_group</field>
<field
name="group_ids"
eval="[(6,0,[ref('general_audit_ws_ba9b2f0_validator_group')])]"
/>
<field name="restrict_additional" eval="0" />
</record>
</odoo>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?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="sequence_template_general_audit_ws_ba9b2f0" model="sequence.template">
<field name="name">Standard</field>
<field name="model_id" ref="model_general_audit_ws_ba9b2f0" />
<field name="sequence" eval="100" />
<field name="initial_string">/</field>
<field
name="sequence_field_id"
search="[('model_id.model','=','general_audit_ws_ba9b2f0'),('name','=','name')]"
/>
<field
name="date_field_id"
search="[('model_id.model','=','general_audit_ws_ba9b2f0'),('name','=','date_start')]"
/>
<field name="computation_method">use_python</field>
<field name="python_code">result=True</field>
<field name="sequence_id" ref="sequence_general_audit_ws_ba9b2f0" />
<field name="sequence_selection_method">use_sequence</field>
<field name="add_custom_prefix" eval="0" />
<field name="add_custom_suffix" eval="0" />
</record>
</odoo>
5 changes: 5 additions & 0 deletions ssi_general_audit_worksheet_control_risk/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from . import (
general_audit_control_activity,
general_audit_key_internal_control,
general_audit_account_key_internal_control,
general_audit_general_control_category,
general_audit_general_control,
general_audit_general_control_indicator,
Expand All @@ -24,4 +25,8 @@
general_audit_ws_eabdaad_detail,
general_audit_ws_eabdaad_risk_identification,
general_audit_ws_eabdaad_what_can_go_wrong,
general_audit_ws_ba9b2f0,
general_audit_ws_ba9b2f0_detail,
general_audit_ws_ba9b2f0_risk_identification,
general_audit_ws_ba9b2f0_what_can_go_wrong,
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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 GeneralAuditAccountKeyInternalControl(models.Model):
_name = "general_audit_account_key_internal_control"
_inherit = [
"mixin.master_data",
]
_description = "General Audit - Standard Account Key Internal Control"
_order = "sequence, id"

sequence = fields.Integer(
string="Sequence",
required=True,
default=10,
)
account_type_id = fields.Many2one(
string="Standard Account",
comodel_name="client_account_type",
required=True,
ondelete="restrict",
)
control_activity_id = fields.Many2one(
string="Control Activity",
comodel_name="general_audit_control_activity",
required=True,
ondelete="restrict",
)
assersion_type_id = fields.Many2one(
string="Assersion Type",
comodel_name="general_audit_assersion_type",
required=True,
ondelete="restrict",
)
Loading

0 comments on commit d1d780f

Please sign in to comment.