Hardik Sanchawat (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-accounting-apa-accounting-hsa into
lp:~openerp-dev/openobject-addons/trunk-accounting-apa.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-accounting-apa-accounting-hsa/+merge/132455
Hello,
I have add button for journal entries and display in list view with filter.
Thanks
- HSA
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-accounting-apa-accounting-hsa/+merge/132455
Your team OpenERP R&D Team is requested to review the proposed merge of
lp:~openerp-dev/openobject-addons/trunk-accounting-apa-accounting-hsa into
lp:~openerp-dev/openobject-addons/trunk-accounting-apa.
=== modified file 'account/account_view.xml'
--- account/account_view.xml 2012-10-31 14:57:08 +0000
+++ account/account_view.xml 2012-11-01 07:12:25 +0000
@@ -549,7 +549,283 @@
</field>
</record>
<menuitem action="action_account_journal_form" id="menu_action_account_journal_form" parent="menu_journals"/>
-
+
+ <!--
+ Entries lines
+ -->
+
+ <record id="view_move_line_tree_reconcile" model="ir.ui.view">
+ <field name="model">account.move.line</field>
+ <field eval="24" name="priority"/>
+ <field name="arch" type="xml">
+ <tree_account_reconciliation colors="red:state == 'draft';black:state == 'valid'" string="Journal Items to Reconcile" create="false" version="7.0">
+ <field name="date"/>
+ <field name="move_id"/>
+ <field name="ref"/>
+ <field name="name"/>
+ <field name="partner_id"/>
+ <field name="account_id"/>
+ <field name="reconcile_partial_id"/>
+ <field name="state" invisible="1"/>
+ <field name="debit" sum="Total debit"/>
+ <field name="credit" sum="Total credit"/>
+ </tree_account_reconciliation>
+ </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="4" name="priority"/>
+ <field name="arch" type="xml">
+ <tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items" editable="top" on_write="on_create_write">
+ <field name="date"/>
+ <field name="period_id"/>
+ <field name="move_id"/>
+ <field name="ref"/>
+ <field name="invoice"/>
+ <field name="name"/>
+ <field name="partner_id" on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"/>
+ <field name="account_id" domain="[('journal_id','=',journal_id), ('company_id', '=', company_id)]"/>
+ <field name="journal_id"/>
+ <field name="debit" sum="Total debit"/>
+ <field name="credit" sum="Total credit"/>
+ <field name="account_tax_id"/>
+ <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('parent_id','!=',False)]"/>
+ <field name="amount_currency" attrs="{'readonly':[('state','=','valid')]}"/>
+ <field name="currency_id" attrs="{'readonly':[('state','=','valid')]}" groups="base.group_multi_currency"/>
+ <field name="reconcile_partial_id"/>
+ <field name="reconcile_id"/>
+ <field name="state" invisible="1"/>
+ </tree>
+ </field>
+ </record>
+
+ <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" version="7.0">
+ <sheet>
+ <group>
+ <group>
+ <field name="name"/>
+ <field name="ref"/>
+ <field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
+ </group>
+ <group>
+ <field name="journal_id"/>
+ <field name="period_id"/>
+ <field name="company_id" required="1" groups="base.group_multi_company"/>
+ </group>
+ </group>
+ <notebook colspan="4">
+ <page string="Information">
+ <group>
+ <group string="Amount">
+ <field name="account_id" domain="[('company_id', '=', company_id), ('type','<>','view'), ('type','<>','consolidation')]"/>
+ <field name="debit"/>
+ <field name="credit"/>
+ <field name="quantity"/>
+ </group>
+ <group string="Accounting Documents">
+ <field name="invoice" readonly="True"/>
+ <field name="move_id" required="False"/>
+ <field name="statement_id" readonly="True"/>
+ </group>
+ <group string="Dates">
+ <field name="date"/>
+ <field name="date_maturity"/>
+ <field name="date_created" readonly="True"/>
+ </group>
+ <group string="Taxes">
+ <field name="tax_code_id"/>
+ <field name="tax_amount"/>
+ <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
+ </group>
+ <group attrs="{'readonly':[('state','=','valid')]}" string="Currency" groups="base.group_multi_currency">
+ <field name="currency_id" invisible="1"/>
+ <field name="amount_currency" widget="monetary" options="{'currency_field': 'currency_id'}"/>
+ </group>
+ <group string="Reconciliation">
+ <field name="reconcile_id"/>
+ <field name="reconcile_partial_id"/>
+ </group>
+ <group string="States">
+ <field name="state"/>
+ <field name="blocked"/>
+ </group>
+ <group groups="analytic.group_analytic_accounting" string="Analytic">
+ <field name="analytic_account_id" domain="[('parent_id','!=',False)]"/>
+ </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="analytic_lines" 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="view_move_line_form2" model="ir.ui.view">
+ <field name="name">account.move.line.form2</field>
+ <field name="model">account.move.line</field>
+ <field eval="9" name="priority"/>
+ <field name="arch" type="xml">
+ <form string="Journal Item" version="7.0">
+ <notebook colspan="4">
+ <page string="Information">
+ <group col="4">
+ <separator colspan="4" string="General Information"/>
+ <field name="name"/>
+ <field name="date"/>
+ <field name="journal_id" readonly="False"/>
+ <field name="period_id" readonly="False"/>
+ <field name="account_id" domain="[('type','<>','view'),('type','<>','consolidation'),('company_id', '=', company_id)]"/>
+ <field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
+ <newline/>
+ <field name="debit"/>
+ <field name="credit"/>
+
+ <separator colspan="4" string="Optional Information"/>
+ <field name="currency_id" invisible="1"/>
+ <field name="amount_currency" groups="base.group_multi_currency" widget="monetary" options="{'currency_field': 'currency_id'}"/>
+ <field name="quantity"/>
+ <field name="move_id" required="False"/>
+ <newline/>
+ <field name="date_maturity"/>
+ <field name="date_created"/>
+ <field name="date_created"/>
+ <field name="blocked"/>
+ <newline/>
+ <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
+ <field name="analytic_account_id" domain="[('parent_id','!=',False)]" groups="analytic.group_analytic_accounting"/>
+ <separator colspan="4" string="Status"/>
+ <newline/>
+ <field name="reconcile_id"/>
+ <field name="reconcile_partial_id"/>
+ <field name="state"/>
+ </group>
+ </page>
+ <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
+ <field name="analytic_lines"/>
+ </page>
+ </notebook>
+ </form>
+ </field>
+ </record>
+
+ <record id="account_move_line_graph" 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="account_id"/>
+ <field name="debit" operator="+"/>
+ <field name="credit" operator="+"/>
+ </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="date"/>
+ <filter icon="terp-document-new" string="Unbalanced" domain="[('state','=','draft')]" help="Unbalanced Journal Items"/>
+ <separator/>
+ <filter icon="terp-document-new" string="Unposted" domain="[('move_id.state','=','draft')]" help="Unposted Journal Items"/>
+ <filter name="posted" icon="terp-camera_test" string="Posted" domain="[('move_id.state','=','posted')]" help="Posted Journal Items"/>
+ <separator/>
+ <filter icon="terp-dolar_ok!" string="Unreconciled" domain="[('reconcile_id','=',False), ('account_id.reconcile','=',True)]" help="Unreconciled Journal Items" name="unreconciled"/>
+ <separator/>
+ <filter string="Next Partner to Reconcile" help="Next Partner Entries to reconcile" name="next_partner" context="{'next_partner_only': 1}" icon="terp-gtk-jump-to-ltr" domain="[('account_id.reconcile','=',True),('reconcile_id','=',False)]"/>
+ <field name="move_id" string="Number (Move)"/>
+ <field name="account_id"/>
+ <field name="partner_id"/>
+ <field name="statement_id"/>
+ <field name="journal_id" context="{'journal_id':self}"/>
+ <field name="period_id" context="{'period_id':self}"/>
+ <group expand="0" string="Group By...">
+ <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
+ <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
+ <filter string="Account" icon="terp-folder-green" context="{'group_by':'account_id'}"/>
+ <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
+ </group>
+ </search>
+ </field>
+ </record>
+
+ <record id="action_account_moves_all_a" model="ir.actions.act_window">
+ <field name="name">Journal Items</field>
+ <field name="res_model">account.move.line</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="context">{}</field>
+ <field name="search_view_id" ref="view_account_move_line_filter"/>
+ <field name="help" type="html">
+ <p class="oe_view_nocontent_create">
+ Click to register a new journal item.
+ </p><p>
+ This view can be used by accountants in order to quickly record
+ entries in OpenERP. If you want to record a supplier invoice,
+ start by recording the line of the expense account. OpenERP
+ will propose to you automatically the Tax related to this
+ account and the counterpart "Account Payable".
+ </p>
+ </field>
+ </record>
+
+ <menuitem
+ action="action_account_moves_all_a"
+ icon="STOCK_JUSTIFY_FILL"
+ id="menu_action_account_moves_all"
+ parent="account.menu_finance_entries"
+ sequence="1"
+ groups="group_account_user"
+ />
+
+ <record id="action_view_move_line" model="ir.actions.act_window">
+ <field name="name">Lines to reconcile</field>
+ <field name="res_model">account.move.line</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="domain">[('account_id.reconcile', '=', True),('reconcile_id','=',False)]</field>
+ <field eval="False" name="view_id"/>
+ <field eval="True" name="filter"/>
+ <field name="search_view_id" ref="view_account_move_line_filter"/>
+ </record>
+
+ <record id="action_move_line_select" model="ir.actions.act_window">
+ <field name="name">Journal Items</field>
+ <field name="res_model">account.move.line</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="view_id" ref="view_move_line_tree"/>
+ <field name="search_view_id" ref="view_account_move_line_filter"/>
+ <field name="context">{'search_default_account_id': [active_id]}</field>
+ </record>
+
+ <record id="ir_account_move_line_select" model="ir.values">
+ <field name="key2">tree_but_open</field>
+ <field name="model">account.account</field>
+ <field name="name">Open Journal Items</field>
+ <field eval="'ir.actions.act_window,%d'%action_move_line_select" name="value"/>
+ </record>
+
+ <record id="action_move_line_search" model="ir.actions.act_window">
+ <field name="name">Journal Items</field>
+ <field name="res_model">account.move.line</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="view_id" ref="view_move_line_tree"/>
+ <field name="search_view_id" ref="view_account_move_line_filter"/>
+ </record>
<record id="view_account_bank_statement_filter" model="ir.ui.view">
<field name="name">account.cash.statement.select</field>
<field name="model">account.bank.statement</field>
@@ -618,7 +894,7 @@
</header>
<sheet>
<div class="oe_right oe_button_box" name="import_buttons">
- <!-- Put here related buttons -->
+ <button name="%(action_move_line_search)d" type="action" string="Journal Items" attrs="{'invisible': [('state','!=','confirm')]}" context="{'search_default_statement_id': active_id}" class="oe_right"/>
</div>
<label for="name" class="oe_edit_only" attrs="{'invisible':[('name','=','/')]}"/>
<h1>
@@ -671,9 +947,6 @@
</form>
</field>
</page>
- <page string="Journal Entries" name="move_live_ids">
- <field name="move_line_ids"/>
- </page>
</notebook>
</sheet>
</form>
@@ -1032,6 +1305,7 @@
<field name="view_id" ref="view_tax_code_tree"/>
</record>
+<<<<<<< TREE
<!--
Entries lines
-->
@@ -1298,6 +1572,9 @@
<field name="name">Open Journal Items</field>
<field eval="'ir.actions.act_window,%d'%action_move_line_select" name="value"/>
</record>
+=======
+
+>>>>>>> MERGE-SOURCE
<!--
Account.Entry Edition
-->
@@ -1369,8 +1646,8 @@
<group>
<group string="Amount">
<field name="account_id" domain="[('company_id', '=', parent.company_id), ('type','<>','view'),('type','<>','consolidation')]"/>
- <field name="debit"/>
- <field name="credit"/>
+ <field name="debit" sum="Total"/>
+ <field name="credit" sum="Total"/>
<field name="quantity"/>
</group>
@@ -1517,14 +1794,6 @@
res_model="account.move.line"
src_model="account.move"/>
- <record id="action_move_line_search" model="ir.actions.act_window">
- <field name="name">Journal Items</field>
- <field name="res_model">account.move.line</field>
- <field name="view_type">form</field>
- <field name="view_mode">tree,form</field>
- <field name="view_id" ref="view_move_line_tree"/>
- <field name="search_view_id" ref="view_account_move_line_filter"/>
- </record>
<record id="action_move_line_search_view1" model="ir.actions.act_window.view">
<field eval="10" name="sequence"/>
<field name="view_mode">tree</field>
@@ -2523,6 +2792,7 @@
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
</header>
<sheet string="Statement">
+ <button name="%(action_move_line_search)d" type="action" string="Journal Items" attrs="{'invisible': [('state','!=','confirm')]}" context="{'search_default_statement_id': active_id}" class="oe_right"/>
<label for="name" class="oe_edit_only" attrs="{'invisible':[('name','=','/')]}"/>
<h1><field name="name" class="oe_inline" attrs="{'invisible':[('name','=','/')]}"/></h1>
<group>
@@ -2591,9 +2861,6 @@
</field>
</group>
</page>
- <page string="Journal Entries" attrs="{'invisible': [('state','!=','confirm')]}">
- <field name="move_line_ids" string="Journal Entries"/>
- </page>
</notebook>
<group col="6" colspan="4">
<group col="2" colspan="2">
=== modified file 'account_voucher/voucher_payment_receipt_view.xml'
--- account_voucher/voucher_payment_receipt_view.xml 2012-10-26 09:58:21 +0000
+++ account_voucher/voucher_payment_receipt_view.xml 2012-11-01 07:12:25 +0000
@@ -130,8 +130,11 @@
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</header>
<sheet>
+ <button name="%(account.action_move_line_search)d" type="action" string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}" context="{'search_default_move_id':move_id}" class="oe_right"/>
<field name="account_id" invisible="True"/>
<field name="pre_line" invisible="1"/>
+ <field name="move_ids" invisible="1"/>
+ <field name="move_id"/>
<field name="type" invisible="True"/>
<group>
<group>
@@ -219,23 +222,6 @@
<field name="audit"/>
<field name="number"/>
</group>
- <field name="move_ids" readonly="1">
- <tree string="Journal Items">
- <field name="move_id"/>
- <field name="ref"/>
- <field name="date"/>
- <field name="statement_id"/>
- <field name="partner_id"/>
- <field name="account_id"/>
- <field name="name"/>
- <field name="debit"/>
- <field name="credit"/>
- <field name="state"/>
- <field name="reconcile_id"/>
- <field name="amount_currency" groups="base.group_multi_currency"/>
- <field name="currency_id" groups="base.group_multi_currency"/>
- </tree>
- </field>
</page>
</notebook>
</sheet>
@@ -398,9 +384,11 @@
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</header>
<sheet>
+ <button name="%(account.action_move_line_search)d" type="action" string="Journal Items" attrs="{'invisible': [('state','!=','posted')]}" context="{'search_default_move_id':move_id}" class="oe_right"/>
<h1 attrs="{'invisible': [('number','=',False)]}"><field name="number"/></h1>
<group>
<group>
+ <field name="move_id" invisible="1"/>
<field name="partner_id" domain="[('customer','=',True)]" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
<field name="currency_id" invisible="1"/>
<field name="amount" class="oe_inline"
@@ -491,23 +479,6 @@
<field name="period_id"/>
<field name="audit"/>
</group>
- <field name="move_ids" readonly="1">
- <tree string="Journal Items">
- <field name="move_id"/>
- <field name="ref"/>
- <field name="date"/>
- <field name="statement_id"/>
- <field name="partner_id"/>
- <field name="account_id"/>
- <field name="name"/>
- <field name="debit"/>
- <field name="credit"/>
- <field name="state"/>
- <field name="reconcile_id"/>
- <field name="amount_currency"/>
- <field name="currency_id" groups="base.group_multi_currency"/>
- </tree>
- </field>
</page>
</notebook>
</sheet>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp