Commit 7a1e7fb9 by Kunto Bregananta Adi
2 parents 8b5e3e49 cfd9157d
...@@ -22,6 +22,8 @@ Indonesia Goverment Accounting ...@@ -22,6 +22,8 @@ Indonesia Goverment Accounting
'data/account.account.csv', 'data/account.account.csv',
'views/account.xml', 'views/account.xml',
'views/account_account_views.xml', 'views/account_account_views.xml',
'views/account_account_type_views.xml',
'views/account_group_views.xml',
'views/menus.xml', 'views/menus.xml',
], ],
'demo': [ 'demo': [
......
...@@ -2,54 +2,54 @@ ...@@ -2,54 +2,54 @@
<odoo> <odoo>
<template id="_assets_primary_variables" inherit_id="web._assets_primary_variables"> <template id="_assets_primary_variables" inherit_id="web._assets_primary_variables">
<xpath expr="//link[last()]" position="after"> <xpath expr="//link[last()]" position="after">
<link rel="stylesheet" type="text/scss" href="/account/static/src/scss/variables.scss"/> <link rel="stylesheet" type="text/scss" href="/idg_account/static/src/scss/variables.scss"/>
</xpath> </xpath>
</template> </template>
<template id="assets_backend" name="account assets" inherit_id="web.assets_backend"> <template id="assets_backend" name="account assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside"> <xpath expr="." position="inside">
<link rel="stylesheet" href="/account/static/src/css/account_bank_and_cash.css"/> <link rel="stylesheet" href="/idg_account/static/src/css/account_bank_and_cash.css"/>
<link rel="stylesheet" href="/account/static/src/css/account.css"/> <link rel="stylesheet" href="/idg_account/static/src/css/account.css"/>
<link rel="stylesheet" href="/account/static/src/css/tax_group.css"/> <link rel="stylesheet" href="/idg_account/static/src/css/tax_group.css"/>
<link rel="stylesheet" type="text/scss" href="/account/static/src/scss/account_reconciliation.scss"/> <link rel="stylesheet" type="text/scss" href="/idg_account/static/src/scss/account_reconciliation.scss"/>
<link rel="stylesheet" type="text/scss" href="/account/static/src/scss/account_journal_dashboard.scss"/> <link rel="stylesheet" type="text/scss" href="/idg_account/static/src/scss/account_journal_dashboard.scss"/>
<link rel="stylesheet" type="text/scss" href="/account/static/src/scss/account_dashboard.scss"/> <link rel="stylesheet" type="text/scss" href="/idg_account/static/src/scss/account_dashboard.scss"/>
<link rel="stylesheet" type="text/scss" href="/account/static/src/scss/account_searchpanel.scss"/> <link rel="stylesheet" type="text/scss" href="/idg_account/static/src/scss/account_searchpanel.scss"/>
<link rel="stylesheet" href="/account/static/src/scss/section_and_note_backend.scss"/> <link rel="stylesheet" href="/idg_account/static/src/scss/section_and_note_backend.scss"/>
<link rel="stylesheet" type="text/scss" href="/account/static/src/scss/account_activity.scss"/> <link rel="stylesheet" type="text/scss" href="/idg_account/static/src/scss/account_activity.scss"/>
<script type="text/javascript" src="/account/static/src/js/account_payment_field.js"></script> <script type="text/javascript" src="/idg_account/static/src/js/account_payment_field.js"></script>
<script type="text/javascript" src="/account/static/src/js/account_resequence_field.js"></script> <script type="text/javascript" src="/idg_account/static/src/js/account_resequence_field.js"></script>
<script type="text/javascript" src="/account/static/src/js/grouped_view_widget.js"></script> <script type="text/javascript" src="/idg_account/static/src/js/grouped_view_widget.js"></script>
<script type="text/javascript" src="/account/static/src/js/mail_activity.js"></script> <script type="text/javascript" src="/idg_account/static/src/js/mail_activity.js"></script>
<script type="text/javascript" src="/account/static/src/js/tax_group.js"></script> <script type="text/javascript" src="/idg_account/static/src/js/tax_group.js"></script>
<script type="text/javascript" src="/account/static/src/js/bank_statement.js"></script> <script type="text/javascript" src="/idg_account/static/src/js/bank_statement.js"></script>
<script type="text/javascript" src="/account/static/src/js/section_and_note_fields_backend.js"></script> <script type="text/javascript" src="/idg_account/static/src/js/section_and_note_fields_backend.js"></script>
<script type="text/javascript" src="/account/static/src/js/tours/account.js"></script> <script type="text/javascript" src="/idg_account/static/src/js/tours/account.js"></script>
<script type="text/javascript" src="/account/static/src/js/bills_tree_upload.js"/> <script type="text/javascript" src="/idg_account/static/src/js/bills_tree_upload.js"/>
<script type="text/javascript" src="/account/static/src/js/account_selection.js"/> <script type="text/javascript" src="/idg_account/static/src/js/account_selection.js"/>
</xpath> </xpath>
</template> </template>
<template id="assets_frontend" name="account assets" inherit_id="web.assets_frontend"> <template id="assets_frontend" name="account assets" inherit_id="web.assets_frontend">
<xpath expr="." position="inside"> <xpath expr="." position="inside">
<script type="text/javascript" src="/account/static/src/js/account_portal_sidebar.js"></script> <script type="text/javascript" src="/idg_account/static/src/js/account_portal_sidebar.js"></script>
</xpath> </xpath>
</template> </template>
<template id="assets_tests" name="Account Assets Tests" inherit_id="web.assets_tests"> <template id="assets_tests" name="Account Assets Tests" inherit_id="web.assets_tests">
<xpath expr="." position="inside"> <xpath expr="." position="inside">
<script type="text/javascript" src="/account/static/tests/tours/account_dashboard_setup_bar_tests.js"></script> <script type="text/javascript" src="/idg_account/static/tests/tours/account_dashboard_setup_bar_tests.js"></script>
<script type="text/javascript" src="/account/static/tests/tours/tax_group_tests.js"></script> <script type="text/javascript" src="/idg_account/static/tests/tours/tax_group_tests.js"></script>
</xpath> </xpath>
</template> </template>
<template id="qunit_suite" name="account tests" inherit_id="web.qunit_suite_tests"> <template id="qunit_suite" name="account tests" inherit_id="web.qunit_suite_tests">
<xpath expr="//script[contains(@src, '/web/static/tests/views/kanban_tests.js')]" position="after"> <xpath expr="//script[contains(@src, '/web/static/tests/views/kanban_tests.js')]" position="after">
<script type="text/javascript" src="/account/static/tests/account_payment_field_tests.js"></script> <script type="text/javascript" src="/idg_account/static/tests/account_payment_field_tests.js"></script>
<script type="text/javascript" src="/account/static/tests/section_and_note_tests.js"></script> <script type="text/javascript" src="/idg_account/static/tests/section_and_note_tests.js"></script>
</xpath> </xpath>
</template> </template>
</odoo> </odoo>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_account_type_search" model="ir.ui.view">
<field name="name">account.account.type.search</field>
<field name="model">account.account.type</field>
<field name="arch" type="xml">
<search string="Account Type">
<field name="name" filter_domain="['|', ('name','ilike',self), ('type','ilike',self)]" string="Account Type"/>
</search>
</field>
</record>
<record id="view_account_type_tree" model="ir.ui.view">
<field name="name">account.account.type.tree</field>
<field name="model">account.account.type</field>
<field name="arch" type="xml">
<tree string="Account Type">
<field name="name"/>
<field name="type"/>
</tree>
</field>
</record>
<record id="view_account_type_form" model="ir.ui.view">
<field name="name">account.account.type.form</field>
<field name="model">account.account.type</field>
<field name="arch" type="xml">
<form string="Account Type">
<group>
<group>
<field name="name"/>
<field name="type"/>
</group>
<group>
<field name="include_initial_balance"/>
</group>
</group>
<separator string="Description"/>
<field name="note"/>
</form>
</field>
</record>
<record id="action_account_type_form" model="ir.actions.act_window">
<field name="name">Account Types</field>
<field name="res_model">account.account.type</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_account_type_search"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Define a new account type
</p><p>
An account type is used to determine how an account is used in
each journal. The deferral method of an account type determines
the process for the annual closing. Reports such as the Balance
Sheet and the Profit and Loss report use the category
(profit/loss or balance sheet).
</p>
</field>
</record>
</data>
</odoo>
...@@ -6,43 +6,46 @@ ...@@ -6,43 +6,46 @@
<field name="model">account.account</field> <field name="model">account.account</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Account"> <form string="Account">
<sheet> <sheet>
<!-- <div class="oe_button_box" name="button_box">--> <!-- <div class="oe_button_box" name="button_box">-->
<!-- <button class="oe_stat_button" name="account.action_move_line_select"--> <!-- <button class="oe_stat_button" name="account.action_move_line_select"-->
<!-- string="Journal Items" type="action" icon="fa-bars"/>--> <!-- string="Journal Items" type="action" icon="fa-bars"/>-->
<!-- </div>--> <!-- </div>-->
<div class="oe_title"> <div class="oe_title">
<h1 class= "oe_read_only"> <h1 class="oe_read_only">
<field name="code" placeholder="code"/> - <field name="name" placeholder="name"/> <field name="code" placeholder="code"/>
<!-- <field name="company_id" invisible="1"/>--> -
</h1> <field name="name" placeholder="name"/>
<div class="oe_inline oe_edit_only"> <!-- <field name="company_id" invisible="1"/>-->
<label for="code"/> </h1>
<field name="code" placeholder="code"/> <div class="oe_inline oe_edit_only">
<label for="name"/> <label for="code"/>
<field name="name" placeholder="name"/> <field name="code" placeholder="code"/>
</div> <label for="name"/>
</div> <field name="name" placeholder="name"/>
<group> </div>
<group name="left_main_group"> </div>
<!-- <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>--> <group>
<field name="user_type_id" widget="account_hierarchy_selection"/> <group name="left_main_group">
<field name="group_id"/> <!-- <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>-->
<field name="internal_type" invisible="1" readonly="1"/> <field name="user_type_id" widget="account_hierarchy_selection"/>
<field name="internal_group" invisible="1" readonly="1"/> <field name="group_id"/>
</group> <field name="internal_type" invisible="1" readonly="1"/>
<group name="right_main_group"> <field name="internal_group" invisible="1" readonly="1"/>
<field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/> </group>
<field name="deprecated"/> <group name="right_main_group">
</group> <field name="currency_id" options="{'no_create': True}"
<group string="Account Options" name="options_group"> groups="base.group_multi_currency"/>
<!-- <field name="tax_ids" widget="many2many_tags" domain="[('company_id','=',company_id)]" attrs="{'invisible': [('internal_group', '=', 'off_balance')]}"/>--> <field name="deprecated"/>
<!-- <field name="tag_ids" widget="many2many_tags" domain="[('applicability', '!=', 'taxes')]" context="{'default_applicability': 'accounts'}" options="{'no_create_edit': True}"/>--> </group>
</group> <group string="Account Options" name="options_group">
<group string="Security" name="security_group"> <!-- <field name="tax_ids" widget="many2many_tags" domain="[('company_id','=',company_id)]" attrs="{'invisible': [('internal_group', '=', 'off_balance')]}"/>-->
<!-- <field name="allowed_journal_ids" widget="many2many_tags" domain="[('company_id','=',company_id)]" options="{'no_create_edit': True}"/>--> <!-- <field name="tag_ids" widget="many2many_tags" domain="[('applicability', '!=', 'taxes')]" context="{'default_applicability': 'accounts'}" options="{'no_create_edit': True}"/>-->
</group> </group>
</group> <group string="Security" name="security_group">
<!-- <field name="allowed_journal_ids" widget="many2many_tags" domain="[('company_id','=',company_id)]" options="{'no_create_edit': True}"/>-->
</group>
</group>
</sheet> </sheet>
</form> </form>
</field> </field>
...@@ -59,13 +62,13 @@ ...@@ -59,13 +62,13 @@
<field name="group_id" optional="hide"/> <field name="group_id" optional="hide"/>
<field name="internal_type" invisible="1"/> <field name="internal_type" invisible="1"/>
<field name="internal_group" invisible="1"/> <field name="internal_group" invisible="1"/>
<field name="reconcile" widget="boolean_toggle" attrs="{'invisible': ['|', ('internal_type','=','liquidity'), ('internal_group', '=', 'off_balance')]}"/> <!-- <field name="reconcile" widget="boolean_toggle" attrs="{'invisible': ['|', ('internal_type','=','liquidity'), ('internal_group', '=', 'off_balance')]}"/>-->
<!-- <field name="tax_ids" optional="hide" widget="many2many_tags"/>--> <!-- <field name="tax_ids" optional="hide" widget="many2many_tags"/>-->
<!-- <field name="tag_ids" optional="hide" widget="many2many_tags"/>--> <!-- <field name="tag_ids" optional="hide" widget="many2many_tags"/>-->
<!-- <field name="allowed_journal_ids" optional="hide" widget="many2many_tags"/>--> <!-- <field name="allowed_journal_ids" optional="hide" widget="many2many_tags"/>-->
<field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/> <!-- <field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/>-->
<!-- <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>--> <!-- <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>-->
<button name="action_read_account" type="object" string="Setup" class="float-right btn-secondary"/> <!-- <button name="action_read_account" type="object" string="Setup" class="float-right btn-secondary"/>-->
</tree> </tree>
</field> </field>
</record> </record>
...@@ -83,14 +86,19 @@ ...@@ -83,14 +86,19 @@
<div t-attf-class="oe_kanban_global_click"> <div t-attf-class="oe_kanban_global_click">
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6">
<strong><field name="name"/></strong> <strong>
<field name="name"/>
</strong>
</div> </div>
<div class="col-6 text-right"> <div class="col-6 text-right">
<span class="badge badge-pill"><t t-esc="record.code.value"/></span> <span class="badge badge-pill">
<t t-esc="record.code.value"/>
</span>
</div> </div>
</div> </div>
<div> <div>
<strong>Type: </strong><t t-esc="record.user_type_id.value"/> <strong>Type:</strong>
<t t-esc="record.user_type_id.value"/>
</div> </div>
</div> </div>
</t> </t>
...@@ -104,8 +112,10 @@ ...@@ -104,8 +112,10 @@
<field name="model">account.account</field> <field name="model">account.account</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<search string="Accounts"> <search string="Accounts">
<field name="name" filter_domain="['|', ('name','ilike',self), ('code','=like',str(self)+'%')]" string="Account"/> <field name="name" filter_domain="['|', ('name','ilike',self), ('code','=like',str(self)+'%')]"
<filter string="Receivable Accounts" name="receivableacc" domain="[('internal_type','=','receivable')]"/> string="Account"/>
<filter string="Receivable Accounts" name="receivableacc"
domain="[('internal_type','=','receivable')]"/>
<filter string="Payable Accounts" name="payableacc" domain="[('internal_type','=','payable')]"/> <filter string="Payable Accounts" name="payableacc" domain="[('internal_type','=','payable')]"/>
<filter string="Equity" name="equityacc" domain="[('internal_group','=', 'equity')]"/> <filter string="Equity" name="equityacc" domain="[('internal_group','=', 'equity')]"/>
<filter string="Assets" name="assetsacc" domain="[('internal_group','=', 'asset')]"/> <filter string="Assets" name="assetsacc" domain="[('internal_group','=', 'asset')]"/>
...@@ -118,7 +128,8 @@ ...@@ -118,7 +128,8 @@
<separator/> <separator/>
<field name="user_type_id"/> <field name="user_type_id"/>
<group expand="0" string="Group By"> <group expand="0" string="Group By">
<filter string="Account Type" name="accounttype" domain="" context="{'group_by':'user_type_id'}"/> <filter string="Account Type" name="accounttype" domain=""
context="{'group_by':'user_type_id'}"/>
</group> </group>
<searchpanel class="account_root"> <searchpanel class="account_root">
<field name="root_id" icon="fa-filter" limit="0"/> <field name="root_id" icon="fa-filter" limit="0"/>
...@@ -134,16 +145,17 @@ ...@@ -134,16 +145,17 @@
<field name="search_view_id" ref="view_account_search"/> <field name="search_view_id" ref="view_account_search"/>
<field name="view_id" ref="view_account_list"/> <field name="view_id" ref="view_account_list"/>
<field name="help" type="html"> <field name="help" type="html">
<p class="o_view_nocontent_smiling_face"> <p class="o_view_nocontent_smiling_face">
Add a new account Add a new account
</p><p> </p>
An account is part of a ledger allowing your company <p>
to register all kinds of debit and credit transactions. An account is part of a ledger allowing your company
Companies present their annual accounts in two main parts: the to register all kinds of debit and credit transactions.
balance sheet and the income statement (profit and loss Companies present their annual accounts in two main parts: the
account). The annual accounts of a company are required by law balance sheet and the income statement (profit and loss
to disclose a certain amount of information. account). The annual accounts of a company are required by law
</p> to disclose a certain amount of information.
</p>
</field> </field>
<field name="context">{'search_default_activeacc': True}</field> <field name="context">{'search_default_activeacc': True}</field>
</record> </record>
......
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_account_group_form" model="ir.ui.view">
<field name="name">account.group.form</field>
<field name="model">account.group</field>
<field name="arch" type="xml">
<form string="Account Group">
<sheet>
<group>
<field name="name"/>
<field name="parent_id"/>
<label for="code_prefix_start" string="Code Prefix"/>
<div>
From <field name="code_prefix_start" class="oe_inline"/> to <field name="code_prefix_end" class="oe_inline"/>
</div>
<!-- <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>-->
</group>
</sheet>
</form>
</field>
</record>
<record id="view_account_group_search" model="ir.ui.view">
<field name="name">account.group.search</field>
<field name="model">account.group</field>
<field name="arch" type="xml">
<search string="Account groups">
<field name="name"
filter_domain="['|', ('code_prefix_start', '=like', str(self) + '%'), ('name', 'ilike', self)]"
string="Account group"/>
</search>
</field>
</record>
<record id="view_account_group_tree" model="ir.ui.view">
<field name="name">account.group.tree</field>
<field name="model">account.group</field>
<field name="arch" type="xml">
<tree string="Account Group">
<field name="code_prefix_start"/>
<field name="code_prefix_end"/>
<field name="name"/>
<!-- <field name="company_id" groups="base.group_multi_company"/>-->
</tree>
</field>
</record>
</data>
</odoo>
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<data>
<record id="action_account_group_form" model="ir.actions.act_window">
<field name="name">Account Group</field>
<field name="res_model">account.group</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_account_group_search"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Define a new account group
</p>
</field>
</record>
</data>
<!-- Top menu item --> <!-- Top menu item -->
<menuitem id="idgaccnt_menu_root" <menuitem id="idgaccnt_menu_root"
name="IDG Account" name="IDG Account"
...@@ -17,5 +30,15 @@ ...@@ -17,5 +30,15 @@
parent="config_idgaccnt_menu" parent="config_idgaccnt_menu"
action="action_idgaccnt_coa" action="action_idgaccnt_coa"
sequence="2"/> sequence="2"/>
<menuitem id="type_idgaccnt_menu"
name="Acccount Type"
parent="config_idgaccnt_menu"
action="action_account_type_form"
sequence="2"/>
<menuitem id="group_idgaccnt_menu"
name="Acccount Group"
parent="config_idgaccnt_menu"
action="action_account_group_form"
sequence="2"/>
</odoo> </odoo>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!