odoo/addons/account_voucher/voucher_view.xml

271 lines
16 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_voucher_tree">
<field name="name">account.voucher.tree</field>
<field name="model">account.voucher</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Accounting Vouchers">
<field name="date"/>
<field name="number"/>
<field name="name"/>
<field name="journal_id"/>
<field name="type" invisible=" not context.get('set_visible',True)"/>
<field name="account_id" />
<field name="amount" sum="Total Amount"/>
<field name="period_id"/>
<field name="state"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_voucher_form">
<field name="name">account.voucher.form</field>
<field name="model">account.voucher</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Accounting Voucher">
<group col="6" colspan="4">
<field name="name" colspan="4"/>
<field name="number"/>
<field name="journal_id" select="1" on_change="onchange_journal(journal_id,type)"/>
<field name="account_id" on_change="onchange_account(account_id)"/>
<field name="type" on_change="onchange_journal(journal_id,type)"/>
</group>
<notebook colspan="4">
<page string="Journal Entries">
<field name="payment_ids" colspan="4" nolabel="1" height="260">
<tree string="Voucher Lines" editable="top">
<field name="account_analytic_id"/>
<field name="partner_id" on_change="onchange_partner(partner_id,type,parent.type)"/>
<field name="account_id"/>
<field name="name"/>
<field name="type"/>
<field name="amount"/>
<field name="ref"/>
</tree>
</field>
<separator string="Narration" colspan="4"/>
<field name="narration" colspan="4" nolabel="1" height="50"/>
<group col="6" colspan="6">
<field name="state"/>
<button name="open_voucher" string="Pro-forma" states="draft"/>
<button name="proforma_voucher" string="Create" states="proforma"/>
<button name="recheck_voucher" string="Validate" states="recheck"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma,recheck" type="object"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
</group>
</page>
<page string="Other Info">
<field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/>
<field name="currency_id" select="1" />
<field name="period_id"/>
<field name="date" select="1"/>
<!--field name="reference_type" nolabel="1" size="0"/>
<field name="reference" select="1" nolabel="1"/-->
<separator string="General Entries" colspan="4"/>
<field name="move_ids" colspan="4" nolabel="1" readonly="1"/>
</page>
</notebook>
</form>
</field>
</record>
<record id="view_account_move_filter" model="ir.ui.view">
<field name="name">account.voucher.select</field>
<field name="model">account.voucher</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Vouchers">
<group col='8' colspan='4'>
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
<filter icon="terp-check" string="Proforma" domain="[('state','=','proforma')]" help="Proforma Vouchers"/>
<filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
<filter icon="terp-gtk-stop" string="Cancel" domain="[('state','=','cancel')]" help="Cancel Vouchers"/>
<separator orientation="vertical"/>
<field name="date" select='1'/>
<field name="name" select='1'/>
<field name="number" select='1'/>
<field name="journal_id" select='1'/>
<field name="partner_id" select='1'/>
<field name="period_id" select='1'/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="12" col="10">
<filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
<filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type', 'set_visible':True}"/>
<filter string="States" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
</group>
<newline/>
<group expand="0" string="Extended options...">
<field name="journal_id" widget="selection" context="{'journal_id': self}" />
<field name="period_id" widget="selection" context="{'period_id': self}" groups="base.group_extended"/>
<field name="type" context="{'type': self}" />
</group>
</search>
</field>
</record>
<!-- Receipt Vouchers -->
<record model="ir.actions.act_window" id="action_receipt_vou_voucher_list">
<field name="name">Voucher Entries</field>
<field name="res_model">account.voucher</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" eval="view_voucher_tree"/>
<!-- <field name="domain">[('type','like','rec_voucher')]</field>-->
<!-- <field name="context">{'type':'rec_voucher'}</field>-->
</record>
<menuitem id="menu_action_receipt_vou_voucher_list"
action="action_receipt_vou_voucher_list" parent="account.menu_finance_entries" sequence="8"/>
<!-- <record model="ir.actions.act_window" id="action_receipt_cashreceipt_voucher_list">-->
<!-- <field name="name">Cash Receipt</field>-->
<!-- <field name="res_model">account.voucher</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form</field>-->
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
<!-- <field name="domain">[('type','=','rec_voucher')]</field>-->
<!-- <field name="context">{'type':'rec_voucher'}</field>-->
<!-- </record>-->
<!-- <menuitem id="menu_action_receipt_cashreceipt_voucher_list"-->
<!-- action="action_receipt_cashreceipt_voucher_list" parent="menu_action_receipt_vou_voucher_list"/>-->
<!-- <record model="ir.actions.act_window" id="action_receipt_bakreceipt_voucher_list">-->
<!-- <field name="name">Bank Receipt</field>-->
<!-- <field name="res_model">account.voucher</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form</field>-->
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
<!-- <field name="domain">[('type','=','bank_rec_voucher')]</field>-->
<!-- <field name="context">{'type':'bank_rec_voucher'}</field>-->
<!-- </record>-->
<!-- <menuitem id="menu_action_receipt_bakreceipt_voucher_list"-->
<!-- action="action_receipt_bakreceipt_voucher_list" parent="menu_action_receipt_vou_voucher_list"/>-->
<!-- End Receipt Vouchers -->
<!-- Payment Vouchers -->
<!-- <record model="ir.actions.act_window" id="action_payments_voucher_list">-->
<!-- <field name="name">Payable Entries</field>-->
<!-- <field name="res_model">account.voucher</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form</field>-->
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
<!-- <field name="domain">[('type','like','pay_voucher')]</field>-->
<!-- <field name="context">{'type':'pay_voucher'}</field>-->
<!-- </record>-->
<!-- <menuitem id="menu_action_payments_voucher_list"-->
<!-- action="action_payments_voucher_list" parent="account.menu_finance_entries" sequence="8"/>-->
<!-- <record model="ir.actions.act_window" id="action_payments_cashpay_voucher_list">-->
<!-- <field name="name">Cash Payment</field>-->
<!-- <field name="res_model">account.voucher</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form</field>-->
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
<!-- <field name="domain">[('type','=','pay_voucher')]</field>-->
<!-- <field name="context">{'type':'pay_voucher'}</field>-->
<!-- </record>-->
<!-- <menuitem id="menu_action_payments_cashpay_voucher_list"-->
<!-- action="action_payments_cashpay_voucher_list" parent="menu_action_payments_voucher_list"/>-->
<!-- <record model="ir.actions.act_window" id="action_payments_bankpay_voucher_list">-->
<!-- <field name="name">Bank Payment</field>-->
<!-- <field name="res_model">account.voucher</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form</field>-->
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
<!-- <field name="domain">[('type','=','bank_pay_voucher')]</field>-->
<!-- <field name="context">{'type':'bank_pay_voucher'}</field>-->
<!-- </record>-->
<!-- <menuitem id="menu_action_payments_bankpay_voucher_list"-->
<!-- action="action_payments_bankpay_voucher_list" parent="menu_action_payments_voucher_list"/>-->
<!-- End Payment Vouchers -->
<!-- Other Voucher Enries -->
<!-- <record model="ir.actions.act_window" id="action_other_voucher_list">-->
<!-- <field name="name">Other Entries</field>-->
<!-- <field name="res_model">account.voucher</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form</field>-->
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
<!-- </record>-->
<!-- <menuitem id="menu_action_other_voucher_list"-->
<!-- action="action_other_voucher_list" parent="account.menu_finance_entries" sequence="8"/>-->
<!-- <record model="ir.actions.act_window" id="action_view_cont_voucher_form">-->
<!-- <field name="name">Contra Entries</field>-->
<!-- <field name="res_model">account.voucher</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form</field>-->
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
<!-- <field name="domain">[('type','=','cont_voucher')]</field>-->
<!-- <field name="context">{'type':'cont_voucher'}</field>-->
<!-- </record>-->
<!-- <menuitem id="menu_action_view_cont_voucher_form"-->
<!-- action="action_view_cont_voucher_form" parent="menu_action_other_voucher_list"/>-->
<!-- <record model="ir.actions.act_window" id="action_view_jour_sale_voucher_form">-->
<!-- <field name="name">Journal Sale</field>-->
<!-- <field name="res_model">account.voucher</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form</field>-->
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
<!-- <field name="domain">[('type','=','journal_sale_vou')]</field>-->
<!-- <field name="context">{'type':'journal_sale_vou'}</field>-->
<!-- </record>-->
<!-- <menuitem id="menu_action_view_jour_sale_voucher_form"-->
<!-- action="action_view_jour_sale_voucher_form" parent="menu_action_other_voucher_list"/>-->
<!-- <record model="ir.actions.act_window" id="action_view_jour_pur_voucher_form">-->
<!-- <field name="name">Journal Purchase</field>-->
<!-- <field name="res_model">account.voucher</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form</field>-->
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
<!-- <field name="domain">[('type','=','journal_pur_voucher')]</field>-->
<!-- <field name="context">{'type':'journal_pur_voucher'}</field>-->
<!-- </record>-->
<!-- <menuitem id="menu_action_view_jour_pur_voucher_form"-->
<!-- action="action_view_jour_pur_voucher_form" parent="menu_action_other_voucher_list"/>-->
<!-- <record model="ir.actions.act_window" id="action_view_jour_voucher_form">-->
<!-- <field name="name">Journal Voucher</field>-->
<!-- <field name="res_model">account.voucher</field>-->
<!-- <field name="view_type">form</field>-->
<!-- <field name="view_mode">tree,form</field>-->
<!-- <field name="view_id" eval="view_voucher_tree"/>-->
<!-- <field name="domain">[('type','=','journal_voucher')]</field>-->
<!-- <field name="context">{'type':'journal_voucher'}</field>-->
<!-- </record>-->
<!-- <menuitem id="menu_action_view_jour_voucher_form"-->
<!-- action="action_view_jour_voucher_form" parent="menu_action_other_voucher_list"/>-->
<record model="ir.ui.view" id="view_account_journal_form_inherit">
<field name="name">account.journal.form.inherit</field>
<field name="model">account.journal</field>
<field name="type">form</field>
<field name="inherit_id" ref="account.view_account_journal_form"/>
<field name="arch" type="xml">
<field name="allow_date" position="after">
<field name="max_amount" select="1"/>
</field>
</field>
</record>
<act_window
domain="[('journal_id', '=', active_id)]"
id="act_journal_voucher_open"
name="Voucher Entries"
context="{'journal_id': active_id, 'type':type}"
res_model="account.voucher"
src_model="account.journal"/>
</data>
</openerp>