Skip to content

Commit

Permalink
[UPD] ssi_general_audit_worksheet_understanding_entity/
Browse files Browse the repository at this point in the history
* Menambahkan master Other Report
* Menambahkan informasi other report pada KK Main Business Activity Process
  • Loading branch information
andhit-r committed Oct 3, 2024
1 parent fabad05 commit 12cc783
Show file tree
Hide file tree
Showing 10 changed files with 140 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"views/general_audit_fraud_factor_views.xml",
"views/general_audit_fraud_factor_indicator_views.xml",
"views/general_audit_expert_type_views.xml",
"views/general_audit_fraud_other_report_views.xml",
"views/general_audit_ws_e78a3c6_views.xml",
"views/general_audit_ws_a13a30e_views.xml",
"views/general_audit_ws_bdcdfc5_views.xml",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
general_audit_fraud_factor_category,
general_audit_fraud_factor,
general_audit_fraud_factor_indicator,
general_audit_other_report,
general_audit_ws_e78a3c6,
general_audit_ws_e78a3c6_organization_structure,
general_audit_ws_a13a30e,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,10 @@ class GeneralAudit(models.Model):
column1="general_audit_id",
column2="business_process_id",
)
other_report_ids = fields.Many2many(
string="Other Reports",
comodel_name="general_audit_other_report",
relation="rel_general_audit_2_other_report",
column1="general_audit_id",
column2="other_report_id",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 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 GeneralAuditOtherReport(models.Model):
_name = "general_audit_other_report"
_inherit = [
"mixin.master_data",
]
_description = "General Audit Other Report"
_order = "sequence, id"

sequence = fields.Integer(
string="Sequence",
default=10,
)
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,17 @@ class GeneralAuditWSae11f7e(models.Model):
],
},
)
other_report_ids = fields.Many2many(
string="Other Reports",
related="general_audit_id.other_report_ids",
inverse="_inverse_other_report_ids",
readonly=True,
states={
"open": [
("readonly", False),
],
},
)
expert_ids = fields.One2many(
string="Experts",
comodel_name="general_audit_ws_ae11f7e.expert",
Expand Down Expand Up @@ -78,3 +89,11 @@ def _inverse_business_cycle_ids(self):
"business_cycle_ids": [(6, 0, self.business_cycle_ids.ids)],
}
)

def _inverse_other_report_ids(self):
for record in self:
record.general_audit_id.write(
{
"other_report_ids": [(6, 0, self.other_report_ids.ids)],
}
)
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ client_general_audit_business_document_configurator,general_audit_business_docum
client_general_audit_business_document_all,general_audit_business_document - all,model_general_audit_business_document,,1,0,0,0
client_general_audit_expert_type_configurator,general_audit_expert_type - configurator,model_general_audit_expert_type,general_audit_expert_type_group,1,1,1,1
client_general_audit_expert_type_all,general_audit_expert_type - all,model_general_audit_expert_type,,1,0,0,0
client_general_audit_other_report_configurator,general_audit_other_report - configurator,model_general_audit_other_report,general_audit_other_report_group,1,1,1,1
client_general_audit_other_report_all,general_audit_other_report - all,model_general_audit_other_report,,1,0,0,0
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,16 @@
eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"
/>
</record>

<record id="general_audit_other_report_group" model="res.groups">
<field name="name">Other Report</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,70 @@
<?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_other_report_view_search" model="ir.ui.view">
<field name="name">general_audit_other_report - search</field>
<field name="model">general_audit_other_report</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_other_report_view_tree" model="ir.ui.view">
<field name="name">general_audit_other_report - tree</field>
<field name="model">general_audit_other_report</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>
</data>
</field>
</record>

<record id="general_audit_other_report_view_form" model="ir.ui.view">
<field name="name">general_audit_other_report - form</field>
<field name="model">general_audit_other_report</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" />
</xpath>
</data>
</field>
</record>

<record id="general_audit_other_report_action" model="ir.actions.act_window">
<field name="name">Other Reports</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">general_audit_other_report</field>
<field name="view_mode">tree,form</field>
</record>

<menuitem
id="general_audit_other_report_menu"
name="Other Reports"
parent="ssi_general_audit.menu_configuration_general_audit"
action="general_audit_other_report_action"
sequence="110"
groups="general_audit_other_report_group"
/>

</odoo>
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<page name="understanding_entity" string="Understanding Entity">
<group name="understanding_entity_1" colspan="4" col="2">
<field name="business_cycle_ids" widget="many2many_tags" />
<field name="other_report_ids" widget="many2many_tags" />
</group>
</page>
</xpath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,14 @@
</form>
</field>
</page>


<page name="other_report" string="Other Reports">
<group name="other_report" colspan="4" col="2">
<field
name="other_report_ids"
widget="many2many_checkboxes"
/>
</group>
</page>
</xpath>
</data>
</field>
Expand Down

0 comments on commit 12cc783

Please sign in to comment.