Commit ccfe2fe4 by aa.gusti

form accounting system

1 parent 9b10eeac
...@@ -13,14 +13,15 @@ Indonesia Goverment Accounting ...@@ -13,14 +13,15 @@ Indonesia Goverment Accounting
'images': [], 'images': [],
'depends': ['id_gov','portal'], 'depends': ['id_gov','portal'],
'data': [ 'data': [
# 'security/account_security.xml', 'security/account_security.xml',
'security/ir.model.access.csv', 'security/ir.model.access.csv',
# 'security/ir_rule.xml', # 'security/ir_rule.xml',
'data/account_data.xml', 'data/account_data.xml',
'data/data_account_type.xml', 'data/data_account_type.xml',
'data/account_group.xml', 'data/account_group.xml',
'data/account.account.csv', 'data/account.account.csv',
# 'views/menus.xml', 'views/account_account_views.xml',
'views/menus.xml',
], ],
'demo': [ 'demo': [
], ],
......
...@@ -751,6 +751,11 @@ class AccountRoot(models.Model): ...@@ -751,6 +751,11 @@ class AccountRoot(models.Model):
tools.drop_view_if_exists(self.env.cr, self._table) tools.drop_view_if_exists(self.env.cr, self._table)
self.env.cr.execute(''' self.env.cr.execute('''
CREATE OR REPLACE VIEW %s AS ( CREATE OR REPLACE VIEW %s AS (
SELECT DISTINCT ASCII(code) * 10000 + SUBSTRING(code,2,3)::int AS id,
LEFT(code,4) AS name,
ASCII(code) * 1000 + ASCII(SUBSTRING(code,2,1)) AS parent_id
FROM account_account WHERE code IS NOT NULL
UNION ALL
SELECT DISTINCT ASCII(code) * 1000 + ASCII(SUBSTRING(code,2,1)) AS id, SELECT DISTINCT ASCII(code) * 1000 + ASCII(SUBSTRING(code,2,1)) AS id,
LEFT(code,2) AS name, LEFT(code,2) AS name,
ASCII(code) AS parent_id ASCII(code) AS parent_id
......
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_account_account_admin","access.account.account.admin","model_account_account","base.group_system",1,1,1,1 access_account_account_admin,access.account.account.admin,"model_account_account","base.group_system",1,1,1,1
"access_account_account_type_admin","access.account.account.type.admin","model_account_account_type","base.group_system",1,1,1,1 access_account_account_type_admin,access.account.account.type.admin,"model_account_account_type","base.group_system",1,1,1,1
access_account_root_admin,account.root.admin,model_account_root,idg_account.group_account_manager,1,0,0,0
access_account_root_user,account.root.user,model_account_root,idg_account.group_account_readonly,1,0,0,0
access_account_group_admin,account.group.admin,model_account_group,idg_account.group_account_manager,1,1,1,1
access_account_group_user,account.group.user,model_account_group,idg_account.group_account_readonly,1,0,0,0
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="view_account_form" model="ir.ui.view">
<field name="name">account.account.form</field>
<field name="model">account.account</field>
<field name="arch" type="xml">
<form string="Account">
<sheet>
<!-- <div class="oe_button_box" name="button_box">-->
<!-- <button class="oe_stat_button" name="account.action_move_line_select"-->
<!-- string="Journal Items" type="action" icon="fa-bars"/>-->
<!-- </div>-->
<div class="oe_title">
<h1 class= "oe_read_only">
<field name="code" placeholder="code"/> - <field name="name" placeholder="name"/>
<!-- <field name="company_id" invisible="1"/>-->
</h1>
<div class="oe_inline oe_edit_only">
<label for="code"/>
<field name="code" placeholder="code"/>
<label for="name"/>
<field name="name" placeholder="name"/>
</div>
</div>
<group>
<group name="left_main_group">
<!-- <field name="company_id" options="{'no_create': True}" groups="base.group_multi_company"/>-->
<field name="user_type_id" widget="account_hierarchy_selection"/>
<field name="group_id"/>
<field name="internal_type" invisible="1" readonly="1"/>
<field name="internal_group" invisible="1" readonly="1"/>
</group>
<group name="right_main_group">
<field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/>
<field name="deprecated"/>
</group>
<group string="Account Options" name="options_group">
<!-- <field name="tax_ids" widget="many2many_tags" domain="[('company_id','=',company_id)]" attrs="{'invisible': [('internal_group', '=', 'off_balance')]}"/>-->
<!-- <field name="tag_ids" widget="many2many_tags" domain="[('applicability', '!=', 'taxes')]" context="{'default_applicability': 'accounts'}" options="{'no_create_edit': True}"/>-->
</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>
</form>
</field>
</record>
<record id="view_account_list" model="ir.ui.view">
<field name="name">account.account.list</field>
<field name="model">account.account</field>
<field name="arch" type="xml">
<tree editable="top" create="1" delete="1" multi_edit="1" string="Chart of accounts">
<field name="code"/>
<field name="name"/>
<field name="user_type_id" widget="account_hierarchy_selection"/>
<field name="group_id" optional="hide"/>
<field name="internal_type" 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="tax_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="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/>
<!-- <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"/>
</tree>
</field>
</record>
<record id="view_account_account_kanban" model="ir.ui.view">
<field name="name">account.account.kanban</field>
<field name="model">account.account</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<field name="name"/>
<field name="code"/>
<field name="user_type_id"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
<div class="row">
<div class="col-6">
<strong><field name="name"/></strong>
</div>
<div class="col-6 text-right">
<span class="badge badge-pill"><t t-esc="record.code.value"/></span>
</div>
</div>
<div>
<strong>Type: </strong><t t-esc="record.user_type_id.value"/>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_account_search" model="ir.ui.view">
<field name="name">account.account.search</field>
<field name="model">account.account</field>
<field name="arch" type="xml">
<search string="Accounts">
<field name="name" filter_domain="['|', ('name','ilike',self), ('code','=like',str(self)+'%')]" string="Account"/>
<filter string="Receivable Accounts" name="receivableacc" domain="[('internal_type','=','receivable')]"/>
<filter string="Payable Accounts" name="payableacc" domain="[('internal_type','=','payable')]"/>
<filter string="Equity" name="equityacc" domain="[('internal_group','=', 'equity')]"/>
<filter string="Assets" name="assetsacc" domain="[('internal_group','=', 'asset')]"/>
<filter string="Liability" name="liabilityacc" domain="[('internal_group','=', 'liability')]"/>
<filter string="Income" name="incomeacc" domain="[('internal_group','=', 'income')]"/>
<filter string="Expenses" name="expensesacc" domain="[('internal_group','=', 'expense')]"/>
<separator/>
<filter string="Account with Entries" name="used" domain="[('used', '=', True)]"/>
<filter string="Active Account" name="activeacc" domain="[('deprecated', '=', False)]"/>
<separator/>
<field name="user_type_id"/>
<group expand="0" string="Group By">
<filter string="Account Type" name="accounttype" domain="" context="{'group_by':'user_type_id'}"/>
</group>
<searchpanel class="account_root">
<field name="root_id" icon="fa-filter" limit="0"/>
</searchpanel>
</search>
</field>
</record>
<record id="action_idgaccnt_coa" model="ir.actions.act_window">
<field name="name">Chart of Accounts</field>
<field name="res_model">account.account</field>
<field name="view_mode">tree,kanban,form</field>
<field name="search_view_id" ref="view_account_search"/>
<field name="view_id" ref="view_account_list"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Add a new account
</p><p>
An account is part of a ledger allowing your company
to register all kinds of debit and credit transactions.
Companies present their annual accounts in two main parts: the
balance sheet and the income statement (profit and loss
account). The annual accounts of a company are required by law
to disclose a certain amount of information.
</p>
</field>
<field name="context">{'search_default_activeacc': True}</field>
</record>
<record id="action_duplicate_account" model="ir.actions.server">
<field name="name">Duplicate</field>
<field name="model_id" ref="model_account_account"/>
<field name="binding_model_id" ref="idg_account.model_account_account"/>
<field name="binding_view_types">list</field>
<field name="state">code</field>
<field name="code">
action = model.action_duplicate_accounts()
</field>
</record>
</data>
</odoo>
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Top menu item -->
<menuitem id="idgaccnt_menu_root"
name="IDG Account"
web_icon="id_dashboard_icon,static/description/icon.png"
active="True"
sequence="400"/>
<!-- Konfigurasi-->
<menuitem id="config_idgaccnt_menu"
name="Konfigurasi"
parent="idgaccnt_menu_root"
sequence="7"/>
<menuitem id="coa_idgaccnt_menu"
name="Chart Of Acccount"
parent="config_idgaccnt_menu"
action="action_idgaccnt_coa"
sequence="2"/>
</odoo>
...@@ -11,7 +11,7 @@ RI Goverment Dashboard ...@@ -11,7 +11,7 @@ RI Goverment Dashboard
'category': 'Indonesia Goverment', 'category': 'Indonesia Goverment',
'website': 'https://opensipkd.com', 'website': 'https://opensipkd.com',
'images': [], 'images': [],
'depends': ['id_gov', 'idg_account', 'portal'], 'depends': ['id_gov', 'idg_account', 'portal', 'board'],
'data': [ 'data': [
# 'security/account_security.xml', # 'security/account_security.xml',
'security/ir.model.access.csv', 'security/ir.model.access.csv',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!