[MOVE] account: move account.move xml stuff in dedicated file

This commit is contained in:
Laurent Smet
2019-02-28 09:08:29 +00:00
parent bd5568a48b
commit 9401062aa8
3 changed files with 553 additions and 549 deletions
+1
View File
@@ -26,6 +26,7 @@ You could use this simplified accounting in case you work with an (external) acc
'views/account_payment_view.xml',
'wizard/account_unreconcile_view.xml',
'wizard/account_move_reversal_view.xml',
'views/account_move_views.xml',
'views/account_view.xml',
'views/account_report.xml',
'data/mail_template_data.xml',
+552
View File
@@ -0,0 +1,552 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- VIEWS -->
<!-- account.move.line (Journal items) -->
<record id="view_move_line_form" model="ir.ui.view">
<field name="name">account.move.line.form</field>
<field name="model">account.move.line</field>
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<form string="Journal Item" create="false">
<sheet>
<field name="company_id" invisible="1"/>
<field name="parent_state" invisible="1"/>
<group>
<field name="name"/>
<field name="partner_id"
domain="['|', ('parent_id', '=', False), ('is_company', '=', True)]"
attrs="{'readonly': [('parent_state', '=', 'posted')]}"/>
</group>
<notebook colspan="4">
<page string="Information">
<group>
<group string="Amount">
<field name="account_id" domain="[('company_id', '=', company_id)]" attrs="{'readonly':[('parent_state','=','posted')]}"/>
<field name="debit" attrs="{'readonly':[('parent_state','=','posted')]}"/>
<field name="credit" attrs="{'readonly':[('parent_state','=','posted')]}"/>
<field name="quantity"/>
</group>
<group string="Accounting Documents">
<field name="move_id" attrs="{'readonly':[('parent_state','=','posted')]}"/>
<field name="statement_id" readonly="True" attrs="{'invisible': [('statement_id','=',False)]}"/>
<field name="invoice_id" attrs="{'invisible': [('invoice_id','=',False)]}"/>
</group>
<group string="Dates">
<field name="date_maturity"/>
</group>
<group string="Taxes" attrs="{'invisible': [('tax_line_id','=',False), ('tax_ids','=',[])]}">
<field name="tax_line_id" readonly="1" attrs="{'invisible': [('tax_line_id','=',False)]}"/>
<field name="tax_ids" widget="many2many_tags" readonly="1" attrs="{'invisible': [('tax_ids','=',[])]}"/>
</group>
<group string="Matching" attrs="{'invisible':[('full_reconcile_id','=',False)]}">
<label for="full_reconcile_id"/>
<div>
<field name="full_reconcile_id"/>
<field name="matched_debit_ids" invisible="1"/>
<field name="matched_credit_ids" invisible="1"/>
<button name="open_reconcile_view"
class="oe_link"
type="object"
string="-> View partially reconciled entries"
attrs="{'invisible': ['|', ('full_reconcile_id', '!=', False), '&amp;', ('matched_debit_ids', '=', []),('matched_credit_ids', '=', [])]}">
</button>
</div>
</group>
<group string="Currency" groups="base.group_multi_currency">
<field name="currency_id" invisible="1"/>
<field name="amount_currency"/>
</group>
<group string="States">
<field name="blocked"/>
</group>
<group string="Analytic" groups="analytic.group_analytic_accounting,analytic.group_analytic_tags">
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
<field name="analytic_tag_ids" groups="analytic.group_analytic_tags" widget="many2many_tags"/>
</group>
</group>
<field name="narration" colspan="4" nolabel="1" placeholder="Add an internal note..."/>
</page>
<page string="Analytic Lines" groups="analytic.group_analytic_accounting">
<field name="date" invisible="1"/>
<field name="analytic_line_ids" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="account_move_line_view_kanban" model="ir.ui.view">
<field name="name">account.move.line.kanban</field>
<field name="model">account.move.line</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<field name="date_maturity"/>
<field name="move_id"/>
<field name="name"/>
<field name="partner_id"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click">
<div class="row mb4">
<strong class="col-6">
<span t-esc="record.move_id.value"/>
</strong>
<strong class="col-6 text-right">
<i class="fa fa-clock-o" aria-label="Date" role="img" title="Date"/><field name="date_maturity"/>
</strong>
<div class="col-10">
<span t-esc="record.name.value"/>
</div>
<div class="col-2 text-right">
<img t-att-src="kanban_image('res.partner', 'image_small', record.partner_id.raw_value)" t-att-title="record.partner_id.value" t-att-alt="record.partner_id.value" width="24" height="24" class="oe_kanban_avatar"/>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_move_line_pivot" model="ir.ui.view">
<field name="name">account.move.line.pivot</field>
<field name="model">account.move.line</field>
<field name="arch" type="xml">
<pivot string="Journal Items">
<field name="journal_id" type="row"/>
<field name="date" type="col"/>
<field name="balance" type="measure"/>
</pivot>
</field>
</record>
<record id="view_move_line_tree" model="ir.ui.view">
<field name="name">account.move.line.tree</field>
<field name="model">account.move.line</field>
<field eval="1" name="priority"/>
<field name="arch" type="xml">
<tree string="Journal Items" create="false">
<field name="date"/>
<field name="move_id" required="0" groups="account.group_account_user"/>
<field name="journal_id" options='{"no_open":True}'/>
<field name="name"/>
<field name="ref"/>
<field name="statement_id" invisible="1"/>
<field name="partner_id"/>
<field name="account_id" options='{"no_open":True}' domain="[('company_id', '=', company_id)]" groups="account.group_account_user"/>
<field name="analytic_account_id" groups="account.group_account_user"/>
<field name="analytic_tag_ids" widget="many2many_tags" groups="analytic.group_analytic_tags"/>
<field name="reconciled" invisible="1"/>
<field name="full_reconcile_id"/>
<field name="reconcile_model_id" invisible="1"/>
<field name="debit" sum="Total Debit"/>
<field name="credit" sum="Total Credit"/>
<field name="amount_currency" readonly="True" groups="base.group_multi_currency"/>
<field name="currency_id" readonly="True" invisible="1" />
<field name="date_maturity"/>
<field name="company_currency_id" invisible="1"/>
<field name="company_id" invisible="1"/>
</tree>
</field>
</record>
<record id="view_move_line_tax_audit_tree" model="ir.ui.view">
<field name="name">account.move.line.tax.audit.tree</field>
<field name="model">account.move.line</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="account.view_move_line_tree"/>
<field name="arch" type="xml">
<field name="full_reconcile_id" position="after">
<field name="tax_line_id"/>
<field name="tax_base_amount" sum="Total Base Amount"/>
</field>
<field name="date_maturity" position="replace"/>
</field>
</record>
<record id="account_move_line_graph_date" model="ir.ui.view">
<field name="name">account.move.line.graph</field>
<field name="model">account.move.line</field>
<field name="arch" type="xml">
<graph string="Account Statistics" type="bar">
<field name="date"/>
<field name="balance" operator="+" type='measure'/>
</graph>
</field>
</record>
<record id="account_move_line_graph_date_cash_basis" model="ir.ui.view">
<field name="name">account.move.line.graph</field>
<field name="model">account.move.line</field>
<field name="arch" type="xml">
<graph string="Account Statistics" type="bar">
<field name="date"/>
<field name="balance_cash_basis" operator="+" type='measure'/>
</graph>
</field>
</record>
<record id="view_account_move_line_filter" model="ir.ui.view">
<field name="name">Journal Items</field>
<field name="model">account.move.line</field>
<field name="arch" type="xml">
<search string="Search Journal Items">
<field name="name" filter_domain="['|', ('name','ilike',self), ('ref','ilike',self)]" string="Move"/>
<field name="date"/>
<separator/>
<filter string="Unposted" name="unposted" domain="[('move_id.state','=','draft')]" help="Unposted Journal Items"/>
<filter name="posted" string="Posted" domain="[('move_id.state','=','posted')]" help="Posted Journal Items"/>
<separator/>
<filter string="Unreconciled" domain="[('full_reconcile_id', '=', False), ('balance','!=', 0), ('account_id.reconcile','=',True)]" help="Journal items where matching number isn't set" name="unreconciled"/>
<separator/>
<filter string="Payable" domain="[('account_id.internal_type', '=', 'payable')]" help="From Payable accounts" name="payable"/>
<filter string="Receivable" domain="[('account_id.internal_type', '=', 'receivable')]" help="From Receivable accounts" name="receivable"/>
<separator/>
<field name="account_id"/>
<field name="partner_id"/>
<field name="journal_id"/>
<field name="move_id" string="Number (Move)"/>
<field name="tax_line_id"/>
<field name="tax_ids" />
<field name="reconcile_model_id"/>
<group expand="0" string="Group By">
<filter string="Partner" name="partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Journal" name="journal" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Account" name="account" context="{'group_by':'account_id'}"/>
<filter string="Date" name="groupby_date" domain="[]" context="{'group_by':'date'}"/>
</group>
</search>
</field>
</record>
<!-- account.move (Journal Entry) -->
<record id="view_move_tree" model="ir.ui.view">
<field name="name">account.move.tree</field>
<field name="model">account.move</field>
<field name="arch" type="xml">
<tree decoration-info="state == 'draft'" string="Journal Entries">
<field name="date"/>
<field name="name"/>
<field name="partner_id"/>
<field name="ref"/>
<field name="journal_id"/>
<field name="amount" sum="Total Amount"/>
<field name="state"/>
<field name="currency_id" invisible="1"/>
</tree>
</field>
</record>
<record id="view_account_move_kanban" model="ir.ui.view">
<field name="name">account.move.kanban</field>
<field name="model">account.move</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<field name="journal_id"/>
<field name="ref"/>
<field name="date"/>
<field name="state"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
<div class="row mb4">
<div class="col-6">
<strong><span><field name="journal_id"/></span></strong>
</div>
<div class="col-6 text-right">
<strong><i class="fa fa-clock-o" aria-label="Date" role="img" title="Date"/> <t t-esc="record.date.value"/></strong>
</div>
</div>
<div class="row">
<div class="col-12">
<span><field name="ref"/></span>
</div>
</div>
<div class="row">
<div class="col-6">
<span><field name="amount" widget='monetary'/></span>
<span><field name="currency_id" invisible="1"/></span>
</div>
<div class="col-6">
<span class="float-right">
<field name="state" widget="kanban_label_selection" options="{'classes': {'draft': 'default', 'posted': 'success'}}"/>
</span>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_move_form" model="ir.ui.view">
<field name="name">account.move.form</field>
<field name="model">account.move</field>
<field name="arch" type="xml">
<form string="Account Entry" duplicate="false">
<header>
<button name="action_post" states="draft" string="Post" type="object" class="oe_highlight" groups="account.group_account_invoice"/>
<button name="%(action_view_account_move_reversal)d" states="posted" string="Reverse Entry" type="action" groups="account.group_account_invoice"/>
<button name="action_duplicate" string="Duplicate" type="object" groups="account.group_account_invoice"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<field name="tax_type_domain" invisible="1"/>
<field name="id" invisible="1"/>
<div class="oe_button_box">
<button name="action_view_reverse_entry"
type="object"
class="oe_stat_button"
icon="fa-refresh"
attrs="{'invisible': [('reverse_entry_id', '=', False)]}"
string="Reversed entry">
</button>
<button name="open_reconcile_view"
class="oe_stat_button"
icon="fa-bars"
type="object"
string="Reconciled entries">
</button>
</div>
<h1>
<field name="name" readonly="True" attrs="{'invisible':[('name','=','/')]}"/>
</h1>
<group>
<group>
<field name="date"/>
<field name="ref" attrs="{'required': [('id', '==', False)]}"/>
</group>
<group>
<field name="journal_id" options="{'no_open': True, 'no_create': True}"/>
<field name="company_id" required="1" groups="base.group_multi_company"/>
<field name="amount" invisible="1"/>
<field name="currency_id" invisible="1"/>
</group>
</group>
<notebook>
<page string="Journal Items">
<field name="line_ids" widget="one2many_list"
context="{'line_ids': line_ids, 'journal_id': journal_id }">
<tree editable="bottom" string="Journal Items">
<field name="tax_line_id" invisible="1"/>
<field name="account_id" domain="[('company_id', '=', parent.company_id), ('deprecated', '=', False)]"/>
<field name="partner_id"
domain="['|', ('parent_id', '=', False), ('is_company', '=', True)]"/>
<field name="name"/>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
<field name="analytic_tag_ids" groups="analytic.group_analytic_tags" widget="many2many_tags"/>
<field name="amount_currency" groups="base.group_multi_currency"/>
<field name="company_currency_id" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/>
<field name="debit" sum="Total Debit"/>
<field name="credit" sum="Total Credit"/>
<field name="tax_ids" string="Taxes Applied" widget="many2many_tags"
domain="[('type_tax_use', '=?', parent.tax_type_domain)]"
context="{'append_type_to_tax_name': not parent.tax_type_domain}"
options="{'no_create': True}"/>
<field name="date_maturity" required="0" invisible="context.get('view_no_maturity', False)"/>
<field name="recompute_tax_line" invisible="1" readonly="1"/>
<field name="tax_line_grouping_key" invisible="1" readonly="1"/>
</tree>
</field>
<field name="narration" colspan="4" placeholder="Add an internal note..." nolabel="1" height="50"/>
</page>
<page string="Other Info">
<group>
<field name="auto_reverse" attrs="{'readonly':[('reverse_entry_id', '!=', False)]}"/>
<field name="reverse_date" attrs="{'invisible':[('auto_reverse', '=', False)], 'required':[('auto_reverse', '=', True)],'readonly':[('reverse_entry_id', '!=', False)]}"/>
<field name="reverse_entry_id" attrs="{'invisible':True}"/>
<field name="to_check"/>
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="activity_ids" widget="mail_activity"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record id="view_account_move_filter" model="ir.ui.view">
<field name="name">account.move.select</field>
<field name="model">account.move</field>
<field name="arch" type="xml">
<search string="Search Move">
<field name="name" filter_domain="['|', ('name','ilike',self), ('ref','ilike',self)]" string="Move"/>
<field name="date"/>
<filter string="Unposted" name="unposted" domain="[('state','=','draft')]" help="Unposted Journal Entries"/>
<filter string="Posted" name="posted" domain="[('state','=','posted')]" help="Posted Journal Entries"/>
<filter string="To Check" name="to_check" domain="[('to_check', '=', True)]"/>
<separator/>
<filter string="Sales" name="sales" domain="[('journal_id.type','=','sale')]" context="{'default_journal_type': 'sale'}"/>
<filter string="Purchases" name="purchases" domain="[('journal_id.type','=','purchase')]" context="{'default_journal_type': 'purchase'}"/>
<filter string="Bank Operations" name="bankoperations" domain="[('journal_id.type','=','bank')]" context="{'default_journal_type': 'bank'}"/>
<filter string="Cash Operations" name="cashoperations" domain="[('journal_id.type','=','cash')]" context="{'default_journal_type': 'cash'}"/>
<filter string="Miscellaneous Operations" domain="[('journal_id.type','=','general')]" name="misc_filter" context="{'default_journal_type': 'general'}"/>
<separator/>
<field name="partner_id"/>
<field name="journal_id"/>
<field name="dummy_account_id"/>
<field name="reconcile_model_id"/>
<group expand="0" string="Group By">
<filter string="Partner" name="partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Journal" name="journal" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Status" name="status" domain="[]" context="{'group_by':'state'}"/>
<filter string="Date" name="date" domain="[]" context="{'group_by':'date'}" help="Journal Entries by Date"/>
</group>
</search>
</field>
</record>
<!-- ACTIONS -->
<!-- account.move.line (Journal Items) -->
<act_window
id="action_move_line_select"
name="Journal Items"
context="{'search_default_account_id': [active_id]}"
res_model="account.move.line"
src_model="account.account"/>
<act_window
id="action_move_line_select_by_partner"
name="Journal Items"
context="{'search_default_partner_id': [active_id]}"
res_model="account.move.line"/>
<record id="action_view_account_move_line_reconcile" model="ir.actions.client">
<field name="name">Reconcile Entries</field>
<field name="tag">manual_reconciliation_view</field>
<field name="binding_model_id" ref="account.model_account_move_line"/>
<field name="binding_type">action</field>
</record>
<record id="action_manual_reconcile" model="ir.actions.client">
<field name="name">Journal Items to Reconcile</field>
<field name="res_model">account.move.line</field>
<field name="tag">manual_reconciliation_view</field>
</record>
<act_window
id="action_move_line_select_tax_audit"
name="Journal Items for Tax Audit"
context="{'search_default_account_id': [active_id]}"
res_model="account.move.line"
src_model="account.account"
view_id="account.view_move_line_tax_audit_tree"/>
<record id="action_account_moves_all_a" model="ir.actions.act_window">
<field name="context">{'journal_type':'general'}</field>
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="view_id" ref="view_move_line_tree"/>
<field name="view_mode">tree,pivot,graph,form,kanban</field>
</record>
<record id="action_account_moves_all_tree" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="context">{'search_default_partner_id': [active_id], 'default_partner_id': active_id}</field>
<field name="view_id" ref="view_move_line_tree"/>
</record>
<record id="action_move_line_graph" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="view_mode">graph,pivot</field>
<field name="view_id" ref="account_move_line_graph_date"/>
<field name="context">{'search_default_account_id': [active_id]}</field>
<field name="res_model">account.move.line</field>
</record>
<record id="action_move_line_graph_posted" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="view_mode">graph,pivot</field>
<field name="view_id" ref="account_move_line_graph_date"/>
<field name="context">{'search_default_account_id': [active_id], 'search_default_posted': 1}</field>
<field name="res_model">account.move.line</field>
</record>
<record id="action_move_line_graph_cash_basis" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="view_mode">graph,pivot</field>
<field name="view_id" ref="account_move_line_graph_date_cash_basis"/>
<field name="context">{'search_default_account_id': [active_id]}</field>
<field name="res_model">account.move.line</field>
</record>
<record id="action_move_line_graph_cash_basis_posted" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="view_mode">graph,pivot</field>
<field name="view_id" ref="account_move_line_graph_date_cash_basis"/>
<field name="context">{'search_default_account_id': [active_id], 'search_default_posted': 1}</field>
<field name="res_model">account.move.line</field>
</record>
<!-- account.move (Journal Entry) -->
<record id="action_move_journal_line" model="ir.actions.act_window">
<field name="name">Journal Entries</field>
<field name="res_model">account.move</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form</field>
<field name="view_id" ref="view_move_tree"/>
<field name="search_view_id" ref="view_account_move_filter"/>
<field name="context">{'type': 'misc', 'search_default_misc_filter':1, 'view_no_maturity': True}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a journal entry
</p><p>
A journal entry consists of several journal items, each of
which is either a debit or a credit transaction.
</p>
</field>
</record>
<record id="action_move_line_form" model="ir.actions.act_window">
<field name="name">Entries</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.move</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_move_tree"/>
<field name="search_view_id" ref="view_account_move_filter"/>
</record>
<act_window
id="act_account_move_to_account_move_line_open"
name="Journal Items"
context="{'search_default_move_id': active_id, 'default_move_id': active_id}"
res_model="account.move.line"
src_model="account.move"
view_mode="tree"/>
<!-- MENUS -->
<menuitem
id="menu_action_account_moves_all"
action="action_account_moves_all_a"
parent="account.menu_finance_entries_accounting_entries"
groups="group_account_manager"
sequence="10"/>
<menuitem
id="menu_action_move_journal_line_form"
action="action_move_journal_line"
parent="account.menu_finance_entries_accounting_entries"
groups="account.group_account_user"
sequence="1"/>
</data>
</odoo>
-549
View File
@@ -119,47 +119,6 @@
</record>
<menuitem action="action_account_form" id="menu_action_account_form" parent="account.account_account_menu" groups="account.group_account_user" sequence="2"/>
<act_window
id="act_account_acount_move_line_open_unreconciled"
name="Unreconciled Entries"
res_model="account.move.line"
context="{'search_default_account_id':[active_id], 'search_default_unreconciled':1, 'default_account_id': active_id}"
src_model="account.account"/>
<act_window
id="action_move_line_select"
name="Journal Items"
context="{'search_default_account_id': [active_id]}"
res_model="account.move.line"
src_model="account.account"/>
<act_window
id="action_move_select"
name="Journal Entries"
context="{'search_default_dummy_account_id': [active_id]}"
res_model="account.move"/>
<act_window
id="action_move_line_select_by_type"
name="Journal Items"
context="{'search_default_user_type_id': [active_id]}"
res_model="account.move.line"
src_model="account.account.type"/>
<act_window
id="action_move_line_select_by_partner"
name="Journal Items"
context="{'search_default_partner_id': [active_id]}"
res_model="account.move.line"/>
<!-- Reconciliation action -->
<record id="action_view_account_move_line_reconcile" model="ir.actions.client">
<field name="name">Reconcile Entries</field>
<field name="tag">manual_reconciliation_view</field>
<field name="binding_model_id" ref="account.model_account_move_line"/>
<field name="binding_type">action</field>
</record>
<!-- Account Journal -->
<record id="view_account_journal_tree" model="ir.ui.view">
<field name="name">account.journal.tree</field>
@@ -457,14 +416,6 @@
res_model="account.bank.statement"
src_model="account.journal"/>
<act_window
id="act_account_journal_2_account_move_line"
name="Journal Items"
context="{'search_default_journal_id': active_id, 'default_journal_id': active_id}"
res_model="account.move.line"
src_model="account.journal"
view_mode="tree"/>
<!-- Tags -->
<record id="account_tag_view_form" model="ir.ui.view">
<field name="name">Tags</field>
@@ -802,12 +753,6 @@
<field name="tag">bank_statement_reconciliation_view</field>
</record>
<record id="action_manual_reconcile" model="ir.actions.client">
<field name="name">Journal Items to Reconcile</field>
<field name="res_model">account.move.line</field>
<field name="tag">manual_reconciliation_view</field>
</record>
<record id="view_account_reconcile_model_form" model="ir.ui.view">
<field name="name">account.reconcile.model.form</field>
<field name="model">account.reconcile.model</field>
@@ -1232,500 +1177,6 @@
</record>
<menuitem action="action_tax_form" id="menu_action_tax_form" parent="account_account_menu" sequence="2"/>
<!-- Journal Items -->
<record id="view_move_line_form" model="ir.ui.view">
<field name="name">account.move.line.form</field>
<field name="model">account.move.line</field>
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<form string="Journal Item" create="false">
<sheet>
<field name="company_id" invisible="1"/>
<field name="parent_state" invisible="1"/>
<group>
<field name="name"/>
<field name="partner_id"
domain="['|', ('parent_id', '=', False), ('is_company', '=', True)]"
attrs="{'readonly': [('parent_state', '=', 'posted')]}"/>
</group>
<notebook colspan="4">
<page string="Information">
<group>
<group string="Amount">
<field name="account_id" domain="[('company_id', '=', company_id)]" attrs="{'readonly':[('parent_state','=','posted')]}"/>
<field name="debit" attrs="{'readonly':[('parent_state','=','posted')]}"/>
<field name="credit" attrs="{'readonly':[('parent_state','=','posted')]}"/>
<field name="quantity"/>
</group>
<group string="Accounting Documents">
<field name="move_id" attrs="{'readonly':[('parent_state','=','posted')]}"/>
<field name="statement_id" readonly="True" attrs="{'invisible': [('statement_id','=',False)]}"/>
<field name="invoice_id" attrs="{'invisible': [('invoice_id','=',False)]}"/>
</group>
<group string="Dates">
<field name="date_maturity"/>
</group>
<group string="Taxes" attrs="{'invisible': [('tax_line_id','=',False), ('tax_ids','=',[])]}">
<field name="tax_line_id" readonly="1" attrs="{'invisible': [('tax_line_id','=',False)]}"/>
<field name="tax_ids" widget="many2many_tags" readonly="1" attrs="{'invisible': [('tax_ids','=',[])]}"/>
</group>
<group string="Matching" attrs="{'invisible':[('full_reconcile_id','=',False)]}">
<label for="full_reconcile_id"/>
<div>
<field name="full_reconcile_id"/>
<field name="matched_debit_ids" invisible="1"/>
<field name="matched_credit_ids" invisible="1"/>
<button name="open_reconcile_view"
class="oe_link"
type="object"
string="-> View partially reconciled entries"
attrs="{'invisible': ['|', ('full_reconcile_id', '!=', False), '&amp;', ('matched_debit_ids', '=', []),('matched_credit_ids', '=', [])]}">
</button>
</div>
</group>
<group string="Currency" groups="base.group_multi_currency">
<field name="currency_id" invisible="1"/>
<field name="amount_currency"/>
</group>
<group string="States">
<field name="blocked"/>
</group>
<group string="Analytic" groups="analytic.group_analytic_accounting,analytic.group_analytic_tags">
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
<field name="analytic_tag_ids" groups="analytic.group_analytic_tags" widget="many2many_tags"/>
</group>
</group>
<field name="narration" colspan="4" nolabel="1" placeholder="Add an internal note..."/>
</page>
<page string="Analytic Lines" groups="analytic.group_analytic_accounting">
<field name="date" invisible="1"/>
<field name="analytic_line_ids" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="account_move_line_view_kanban" model="ir.ui.view">
<field name="name">account.move.line.kanban</field>
<field name="model">account.move.line</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<field name="date_maturity"/>
<field name="move_id"/>
<field name="name"/>
<field name="partner_id"/>
<templates>
<t t-name="kanban-box">
<div class="oe_kanban_global_click">
<div class="row mb4">
<strong class="col-6">
<span t-esc="record.move_id.value"/>
</strong>
<strong class="col-6 text-right">
<i class="fa fa-clock-o" aria-label="Date" role="img" title="Date"/><field name="date_maturity"/>
</strong>
<div class="col-10">
<span t-esc="record.name.value"/>
</div>
<div class="col-2 text-right">
<img t-att-src="kanban_image('res.partner', 'image_small', record.partner_id.raw_value)" t-att-title="record.partner_id.value" t-att-alt="record.partner_id.value" width="24" height="24" class="oe_kanban_avatar"/>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_move_line_pivot" model="ir.ui.view">
<field name="name">account.move.line.pivot</field>
<field name="model">account.move.line</field>
<field name="arch" type="xml">
<pivot string="Journal Items">
<field name="journal_id" type="row"/>
<field name="date" type="col"/>
<field name="balance" type="measure"/>
</pivot>
</field>
</record>
<record id="view_move_line_tree" model="ir.ui.view">
<field name="name">account.move.line.tree</field>
<field name="model">account.move.line</field>
<field eval="1" name="priority"/>
<field name="arch" type="xml">
<tree string="Journal Items" create="false">
<field name="date"/>
<field name="move_id" required="0" groups="account.group_account_user"/>
<field name="journal_id" options='{"no_open":True}'/>
<field name="name"/>
<field name="ref"/>
<field name="statement_id" invisible="1"/>
<field name="partner_id"/>
<field name="account_id" options='{"no_open":True}' domain="[('company_id', '=', company_id)]" groups="account.group_account_user"/>
<field name="analytic_account_id" groups="account.group_account_user"/>
<field name="analytic_tag_ids" widget="many2many_tags" groups="analytic.group_analytic_tags"/>
<field name="reconciled" invisible="1"/>
<field name="full_reconcile_id"/>
<field name="reconcile_model_id" invisible="1"/>
<field name="debit" sum="Total Debit"/>
<field name="credit" sum="Total Credit"/>
<field name="amount_currency" readonly="True" groups="base.group_multi_currency"/>
<field name="currency_id" readonly="True" invisible="1" />
<field name="date_maturity"/>
<field name="company_currency_id" invisible="1"/>
<field name="company_id" invisible="1"/>
</tree>
</field>
</record>
<record id="view_move_line_tax_audit_tree" model="ir.ui.view">
<field name="name">account.move.line.tax.audit.tree</field>
<field name="model">account.move.line</field>
<field name="mode">primary</field>
<field name="inherit_id" ref="account.view_move_line_tree"/>
<field name="arch" type="xml">
<field name="full_reconcile_id" position="after">
<field name="tax_line_id"/>
<field name="tax_base_amount" sum="Total Base Amount"/>
</field>
<field name="date_maturity" position="replace"/>
</field>
</record>
<act_window
id="action_move_line_select_tax_audit"
name="Journal Items for Tax Audit"
context="{'search_default_account_id': [active_id]}"
res_model="account.move.line"
src_model="account.account"
view_id="account.view_move_line_tax_audit_tree"/>
<record id="account_move_line_graph_date" model="ir.ui.view">
<field name="name">account.move.line.graph</field>
<field name="model">account.move.line</field>
<field name="arch" type="xml">
<graph string="Account Statistics" type="bar">
<field name="date"/>
<field name="balance" operator="+" type='measure'/>
</graph>
</field>
</record>
<record id="account_move_line_graph_date_cash_basis" model="ir.ui.view">
<field name="name">account.move.line.graph</field>
<field name="model">account.move.line</field>
<field name="arch" type="xml">
<graph string="Account Statistics" type="bar">
<field name="date"/>
<field name="balance_cash_basis" operator="+" type='measure'/>
</graph>
</field>
</record>
<record id="view_account_move_line_filter" model="ir.ui.view">
<field name="name">Journal Items</field>
<field name="model">account.move.line</field>
<field name="arch" type="xml">
<search string="Search Journal Items">
<field name="name" filter_domain="['|', ('name','ilike',self), ('ref','ilike',self)]" string="Move"/>
<field name="date"/>
<separator/>
<filter string="Unposted" name="unposted" domain="[('move_id.state','=','draft')]" help="Unposted Journal Items"/>
<filter name="posted" string="Posted" domain="[('move_id.state','=','posted')]" help="Posted Journal Items"/>
<separator/>
<filter string="Unreconciled" domain="[('full_reconcile_id', '=', False), ('balance','!=', 0), ('account_id.reconcile','=',True)]" help="Journal items where matching number isn't set" name="unreconciled"/>
<separator/>
<filter string="Payable" domain="[('account_id.internal_type', '=', 'payable')]" help="From Payable accounts" name="payable"/>
<filter string="Receivable" domain="[('account_id.internal_type', '=', 'receivable')]" help="From Receivable accounts" name="receivable"/>
<separator/>
<field name="account_id"/>
<field name="partner_id"/>
<field name="journal_id"/>
<field name="move_id" string="Number (Move)"/>
<field name="tax_line_id"/>
<field name="tax_ids" />
<field name="reconcile_model_id"/>
<group expand="0" string="Group By">
<filter string="Partner" name="partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Journal" name="journal" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Account" name="account" context="{'group_by':'account_id'}"/>
<filter string="Date" name="groupby_date" domain="[]" context="{'group_by':'date'}"/>
</group>
</search>
</field>
</record>
<record id="action_account_moves_all_a" model="ir.actions.act_window">
<field name="context">{'journal_type':'general'}</field>
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="view_id" ref="view_move_line_tree"/>
<field name="view_mode">tree,pivot,graph,form,kanban</field>
</record>
<menuitem action="action_account_moves_all_a" id="menu_action_account_moves_all" parent="account.menu_finance_entries_accounting_entries" sequence="10" groups="group_account_manager" />
<record id="action_account_moves_all_tree" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="res_model">account.move.line</field>
<field name="context">{'search_default_partner_id': [active_id], 'default_partner_id': active_id}</field>
<field name="view_id" ref="view_move_line_tree"/>
</record>
<record id="action_move_line_graph" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="view_mode">graph,pivot</field>
<field name="view_id" ref="account_move_line_graph_date"/>
<field name="context">{'search_default_account_id': [active_id]}</field>
<field name="res_model">account.move.line</field>
</record>
<record id="action_move_line_graph_posted" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="view_mode">graph,pivot</field>
<field name="view_id" ref="account_move_line_graph_date"/>
<field name="context">{'search_default_account_id': [active_id], 'search_default_posted': 1}</field>
<field name="res_model">account.move.line</field>
</record>
<record id="action_move_line_graph_cash_basis" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="view_mode">graph,pivot</field>
<field name="view_id" ref="account_move_line_graph_date_cash_basis"/>
<field name="context">{'search_default_account_id': [active_id]}</field>
<field name="res_model">account.move.line</field>
</record>
<record id="action_move_line_graph_cash_basis_posted" model="ir.actions.act_window">
<field name="name">Journal Items</field>
<field name="view_mode">graph,pivot</field>
<field name="view_id" ref="account_move_line_graph_date_cash_basis"/>
<field name="context">{'search_default_account_id': [active_id], 'search_default_posted': 1}</field>
<field name="res_model">account.move.line</field>
</record>
<!-- Account.Entry Edition -->
<record id="view_move_tree" model="ir.ui.view">
<field name="name">account.move.tree</field>
<field name="model">account.move</field>
<field name="arch" type="xml">
<tree decoration-info="state == 'draft'" string="Journal Entries">
<field name="date"/>
<field name="name"/>
<field name="partner_id"/>
<field name="ref"/>
<field name="journal_id"/>
<field name="amount" sum="Total Amount"/>
<field name="state"/>
<field name="currency_id" invisible="1"/>
</tree>
</field>
</record>
<record id="view_account_move_kanban" model="ir.ui.view">
<field name="name">account.move.kanban</field>
<field name="model">account.move</field>
<field name="arch" type="xml">
<kanban class="o_kanban_mobile">
<field name="journal_id"/>
<field name="ref"/>
<field name="date"/>
<field name="state"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_global_click">
<div class="row mb4">
<div class="col-6">
<strong><span><field name="journal_id"/></span></strong>
</div>
<div class="col-6 text-right">
<strong><i class="fa fa-clock-o" aria-label="Date" role="img" title="Date"/> <t t-esc="record.date.value"/></strong>
</div>
</div>
<div class="row">
<div class="col-12">
<span><field name="ref"/></span>
</div>
</div>
<div class="row">
<div class="col-6">
<span><field name="amount" widget='monetary'/></span>
<span><field name="currency_id" invisible="1"/></span>
</div>
<div class="col-6">
<span class="float-right">
<field name="state" widget="kanban_label_selection" options="{'classes': {'draft': 'default', 'posted': 'success'}}"/>
</span>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="view_move_form" model="ir.ui.view">
<field name="name">account.move.form</field>
<field name="model">account.move</field>
<field name="arch" type="xml">
<form string="Account Entry" duplicate="false">
<header>
<button name="action_post" states="draft" string="Post" type="object" class="oe_highlight" groups="account.group_account_invoice"/>
<button name="%(action_view_account_move_reversal)d" states="posted" string="Reverse Entry" type="action" groups="account.group_account_invoice"/>
<button name="action_duplicate" string="Duplicate" type="object" groups="account.group_account_invoice"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<field name="tax_type_domain" invisible="1"/>
<field name="id" invisible="1"/>
<div class="oe_button_box">
<button name="action_view_reverse_entry"
type="object"
class="oe_stat_button"
icon="fa-refresh"
attrs="{'invisible': [('reverse_entry_id', '=', False)]}"
string="Reversed entry">
</button>
<button name="open_reconcile_view"
class="oe_stat_button"
icon="fa-bars"
type="object"
string="Reconciled entries">
</button>
</div>
<h1>
<field name="name" readonly="True" attrs="{'invisible':[('name','=','/')]}"/>
</h1>
<group>
<group>
<field name="date"/>
<field name="ref" attrs="{'required': [('id', '==', False)]}"/>
</group>
<group>
<field name="journal_id" options="{'no_open': True, 'no_create': True}"/>
<field name="company_id" required="1" groups="base.group_multi_company"/>
<field name="amount" invisible="1"/>
<field name="currency_id" invisible="1"/>
</group>
</group>
<notebook>
<page string="Journal Items">
<field name="line_ids" widget="one2many_list"
context="{'line_ids': line_ids, 'journal_id': journal_id }">
<tree editable="bottom" string="Journal Items">
<field name="tax_line_id" invisible="1"/>
<field name="account_id" domain="[('company_id', '=', parent.company_id), ('deprecated', '=', False)]"/>
<field name="partner_id"
domain="['|', ('parent_id', '=', False), ('is_company', '=', True)]"/>
<field name="name"/>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
<field name="analytic_tag_ids" groups="analytic.group_analytic_tags" widget="many2many_tags"/>
<field name="amount_currency" groups="base.group_multi_currency"/>
<field name="company_currency_id" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="currency_id" options="{'no_create': True}" groups="base.group_multi_currency"/>
<field name="debit" sum="Total Debit"/>
<field name="credit" sum="Total Credit"/>
<field name="tax_ids" string="Taxes Applied" widget="many2many_tags"
domain="[('type_tax_use', '=?', parent.tax_type_domain)]"
context="{'append_type_to_tax_name': not parent.tax_type_domain}"
options="{'no_create': True}"/>
<field name="date_maturity" required="0" invisible="context.get('view_no_maturity', False)"/>
<field name="recompute_tax_line" invisible="1" readonly="1"/>
<field name="tax_line_grouping_key" invisible="1" readonly="1"/>
</tree>
</field>
<field name="narration" colspan="4" placeholder="Add an internal note..." nolabel="1" height="50"/>
</page>
<page string="Other Info">
<group>
<field name="auto_reverse" attrs="{'readonly':[('reverse_entry_id', '!=', False)]}"/>
<field name="reverse_date" attrs="{'invisible':[('auto_reverse', '=', False)], 'required':[('auto_reverse', '=', True)],'readonly':[('reverse_entry_id', '!=', False)]}"/>
<field name="reverse_entry_id" attrs="{'invisible':True}"/>
<field name="to_check"/>
</group>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="activity_ids" widget="mail_activity"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<record id="view_account_move_filter" model="ir.ui.view">
<field name="name">account.move.select</field>
<field name="model">account.move</field>
<field name="arch" type="xml">
<search string="Search Move">
<field name="name" filter_domain="['|', ('name','ilike',self), ('ref','ilike',self)]" string="Move"/>
<field name="date"/>
<filter string="Unposted" name="unposted" domain="[('state','=','draft')]" help="Unposted Journal Entries"/>
<filter string="Posted" name="posted" domain="[('state','=','posted')]" help="Posted Journal Entries"/>
<filter string="To Check" name="to_check" domain="[('to_check', '=', True)]"/>
<separator/>
<filter string="Sales" name="sales" domain="[('journal_id.type','=','sale')]" context="{'default_journal_type': 'sale'}"/>
<filter string="Purchases" name="purchases" domain="[('journal_id.type','=','purchase')]" context="{'default_journal_type': 'purchase'}"/>
<filter string="Bank Operations" name="bankoperations" domain="[('journal_id.type','=','bank')]" context="{'default_journal_type': 'bank'}"/>
<filter string="Cash Operations" name="cashoperations" domain="[('journal_id.type','=','cash')]" context="{'default_journal_type': 'cash'}"/>
<filter string="Miscellaneous Operations" domain="[('journal_id.type','=','general')]" name="misc_filter" context="{'default_journal_type': 'general'}"/>
<separator/>
<field name="partner_id"/>
<field name="journal_id"/>
<field name="dummy_account_id"/>
<field name="reconcile_model_id"/>
<group expand="0" string="Group By">
<filter string="Partner" name="partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Journal" name="journal" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Status" name="status" domain="[]" context="{'group_by':'state'}"/>
<filter string="Date" name="date" domain="[]" context="{'group_by':'date'}" help="Journal Entries by Date"/>
</group>
</search>
</field>
</record>
<record id="action_move_journal_line" model="ir.actions.act_window">
<field name="name">Journal Entries</field>
<field name="res_model">account.move</field>
<field name="view_type">form</field>
<field name="view_mode">tree,kanban,form</field>
<field name="view_id" ref="view_move_tree"/>
<field name="search_view_id" ref="view_account_move_filter"/>
<field name="context">{'search_default_misc_filter':1, 'view_no_maturity': True}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a journal entry
</p><p>
A journal entry consists of several journal items, each of
which is either a debit or a credit transaction.
</p>
</field>
</record>
<menuitem
action="action_move_journal_line"
id="menu_action_move_journal_line_form"
parent="account.menu_finance_entries_accounting_entries"
groups="account.group_account_user"
sequence="1"/>
<record id="action_move_line_form" model="ir.actions.act_window">
<field name="name">Entries</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.move</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_move_tree"/>
<field name="search_view_id" ref="view_account_move_filter"/>
</record>
<act_window
id="act_account_move_to_account_move_line_open"
name="Journal Items"
context="{'search_default_move_id': active_id, 'default_move_id': active_id}"
res_model="account.move.line"
src_model="account.move"
view_mode="tree"/>
<!-- Full Reconcile -->
<record id="view_full_reconcile_form" model="ir.ui.view">
<field name="name">account.full.reconcile.form</field>