odoo/addons/account_voucher/voucher_payment_receipt_vie...

166 lines
11 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_vendor_payment_form">
<field name="name">account.voucher.payment.form</field>
<field name="model">account.voucher</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Bill Payment">
<group col="6" colspan="4">
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, journal_id)"/>
<field name="name" colspan="4"/>
<field name="journal_id" domain="[('type','in',['bank', 'cash'])]" widget="selection" select="1" on_change="onchange_journal(journal_id,type)"/>
<field name="account_id" domain="[('type','=','other')]" widget="selection" on_change="onchange_account(account_id)" readonly="1"/>
<field name="number"/>
<field name="type" invisible="True"/>
</group>
<notebook colspan="4">
<page string="Payment Information">
<field name="line_ids" on_change="onchange_price(line_ids, False, False)" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="180">
<tree string="Payment Lines" editable="bottom">
<field name="amount"/>
<field name="account_id"/>
<field name="account_analytic_id"/>
</tree>
</field>
<group col="2" colspan="3">
<separator string="Narration" colspan="2"/>
<field name="narration" colspan="2" nolabel="1"/>
</group>
<group col="2" colspan="1">
<separator string="Other Information" colspan="2"/>
<field name="reference" select="1"/>
<field name="date" select="1" on_change="onchange_date(date)"/>
<field name="currency_id" select="1" attrs="{'readonly':[('type','in',['sale', 'purchase'])]}"/>
<field name="type" on_change="onchange_journal(journal_id,type)"/>
</group>
</page>
<page string="Journal Items">
<group col="6" colspan="4">
<field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/>
<field name="period_id"/>
<field name="audit"/>
</group>
<separator string="Journal Items" colspan="4"/>
<field name="move_ids" colspan="4" nolabel="1" readonly="1"/>
</page>
</notebook>
<group col="10" colspan="4">
<field name="state"/>
<button name="proforma_voucher" string="Create" states="draft" icon="terp-document-new"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
<button name="%(action_view_account_voucher_unreconcile)d" string="Unreconcile" type="action" states="posted" icon="terp-stock_effects-object-colorize"/>
</group>
</form>
</field>
</record>
<record id="action_vendor_payment" model="ir.actions.act_window">
<field name="name">Vendor Payment</field>
<field name="res_model">account.voucher.open</field>
<field name="view_type">form</field>
<field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','payment')]</field>
<field name="context">{'journal_type':'bank', 'type':'payment'}</field>
<field name="view_id" ref="account_open_vouchers_view"/>
<field name="target">new</field>
</record>
<menuitem action="action_vendor_payment" icon="STOCK_JUSTIFY_FILL" sequence="16"
id="menu_action_vendor_payment" parent="account.menu_finance_payables"/>
<record model="ir.ui.view" id="view_vendor_receipt_form">
<field name="name">account.voucher.receipt.form</field>
<field name="model">account.voucher</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Sales Payment">
<group col="6" colspan="4">
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount)" string="Customer"/>
<field name="journal_id"
domain="[('type','in',['bank', 'cash'])]"
widget="selection" select="1"
on_change="onchange_partner_id(partner_id, journal_id, amount)"
string="Payment Method"/>
<field name="amount"/>
<field name="reference" select="1" string="Payment Ref"/>
<field name="name" colspan="4"/>
<field name="account_id"
domain="[('type','=','other')]"
widget="selection"
on_change="onchange_account(account_id)"
invisible="True"/>
<field name="pre_line" invisible="1"/>
<field name="type" invisible="True"/>
</group>
<notebook colspan="4">
<page string="Payment Information">
<field name="line_cr_ids" default_get="{'journal_id':journal_id, 'partner_id':partner_id}" colspan="4" nolabel="1" height="140">
<tree string="Invoices and outstanding transactions" editable="bottom">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
on_change="onchange_move_line_id(move_line_id)"
domain="[('account_id.type','in',('receivable','payable')), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
/>
<field name="account_id" domain="[('type','=','receivable')]"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
<field name="amount_original" readonly="1"/>
<field name="amount_unreconciled" sum="Open Balance" readonly="1"/>
<field name="amount" sum="Payment"/>
</tree>
</field>
<field name="line_dr_ids" colspan="4" nolabel="1" attrs="{'invisible': [('pre_line','=',False)]}" default_get="{'journal_id':journal_id, 'partner_id':partner_id}">
<tree string="Credits" editable="bottom">
<field name="move_line_id"/>
<field name="account_id" domain="[('type','=','receivable')]"/>
<field name="date_original"/>
<field name="amount_original"/>
<field name="amount" sum="Payment"/>
</tree>
</field>
<group col="2" colspan="3">
<separator string="Internal Notes" colspan="2"/>
<field name="narration" colspan="2" nolabel="1"/>
</group>
<group col="2" colspan="1">
<separator string="Other Information" colspan="2"/>
<field name="date" select="1" on_change="onchange_date(date)"/>
<field name="currency_id" select="1"/>
<field name="number"/>
</group>
</page>
<page string="Journal Items" groups="base.group_extended">
<group col="6" colspan="4">
<field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/>
<field name="period_id"/>
<field name="audit"/>
</group>
<separator string="Journal Items" colspan="4"/>
<field name="move_ids" colspan="4" nolabel="1" readonly="1"/>
</page>
</notebook>
<group col="10" colspan="4">
<field name="state"/>
<button name="proforma_voucher" string="Post" states="draft" icon="terp-document-new"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" icon="gtk-cancel"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
<button name="%(action_view_account_voucher_unreconcile)d" string="Unreconcile" type="action" states="posted" icon="terp-stock_effects-object-colorize"/>
</group>
</form>
</field>
</record>
<record id="action_vendor_receipt" model="ir.actions.act_window">
<field name="name">Sales Payment</field>
<field name="res_model">account.voucher.open</field>
<field name="view_type">form</field>
<field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','receipt')]</field>
<field name="context">{'journal_type':'bank', 'type':'receipt'}</field>
<field name="view_id" ref="account_open_vouchers_view"/>
<field name="target">new</field>
</record>
<menuitem action="action_vendor_receipt" icon="STOCK_JUSTIFY_FILL" sequence="16"
id="menu_action_vendor_receipt" parent="account.menu_finance_receivables"/>
</data>
</openerp>