2010-08-18 20:20:43 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<openerp>
|
|
|
|
<data>
|
|
|
|
<record model="ir.ui.view" id="view_sale_receipt_form">
|
|
|
|
<field name="name">account.voucher.sale.form</field>
|
|
|
|
<field name="model">account.voucher</field>
|
|
|
|
<field name="type">form</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<form string="Sales Receipt">
|
|
|
|
<group col="6" colspan="4">
|
2010-08-19 07:57:59 +00:00
|
|
|
<field name="partner_id" on_change="onchange_partner_id(partner_id, type)" string="Customer"/>
|
2010-08-18 20:20:43 +00:00
|
|
|
<field name="journal_id" domain="[('type','=','sale')]" widget="selection" select="1" on_change="onchange_journal(journal_id,type)"/>
|
|
|
|
<field name="number"/>
|
2010-08-19 07:57:59 +00:00
|
|
|
<field name="name" colspan="4"/>
|
|
|
|
<field name="date" select="1" on_change="onchange_date(date)"/>
|
2010-08-19 14:01:41 +00:00
|
|
|
<field name="type" on_change="onchange_journal(journal_id,type)" invisible="True"/> <!-- Type is given by menu, not by journal ? yes-->
|
2010-08-19 07:57:59 +00:00
|
|
|
<field name="period_id" invisible="True"/>
|
2010-08-18 20:20:43 +00:00
|
|
|
</group>
|
|
|
|
<notebook colspan="4">
|
|
|
|
<page string="Sales Information">
|
|
|
|
<field name="payment_ids" colspan="4" nolabel="1" height="180">
|
|
|
|
<tree string="Sales Lines" editable="top">
|
2010-08-19 07:57:59 +00:00
|
|
|
<field name="account_id" widget="selection"/>
|
|
|
|
<field name="name"/>
|
|
|
|
<field name="amount" sum="Total"/>
|
|
|
|
<field name="account_analytic_id" groups="base.group_extended"/>
|
2010-08-18 20:20:43 +00:00
|
|
|
</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">
|
|
|
|
<group col="2" colspan="1">
|
|
|
|
<separator string="Payment Options" colspan="2"/>
|
2010-08-19 14:01:41 +00:00
|
|
|
<field name="pay_now" on_change="onchange_payment(pay_now, journal_id, partner_id, type)" required="1"/>
|
2010-08-19 07:57:59 +00:00
|
|
|
<field name="account_id"
|
2010-08-19 14:01:41 +00:00
|
|
|
attrs="{'invisible':[('type','!=','view'),('pay_now','!=','pay_now')]}"
|
|
|
|
domain="[('type','in',['other'])]"/>
|
2010-08-19 07:57:59 +00:00
|
|
|
<!-- should select income accounts only. Or use the journal for this ? -->
|
|
|
|
<field name="reference"
|
|
|
|
attrs="{'invisible':[('pay_now','!=','pay_now')]}"
|
|
|
|
/>
|
2010-08-18 20:20:43 +00:00
|
|
|
</group>
|
2010-08-19 07:57:59 +00:00
|
|
|
<group col="3" colspan="1">
|
|
|
|
<separator string="Total" colspan="3"/>
|
2010-08-19 14:01:41 +00:00
|
|
|
<field name="tax_id" widget="selection" domain="[('type_tax_use','=','sale')]" on_change="onchange_tax_id(amount, tax_id)"/><field name="tax_amount" nolabel="1"/>
|
2010-08-19 07:57:59 +00:00
|
|
|
<label string="" colspan="1"/><field name="amount" string="Total"/>
|
2010-08-18 20:20:43 +00:00
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
</page>
|
2010-08-19 07:57:59 +00:00
|
|
|
<page string="Journal Items" groups="base.group_extended">
|
2010-08-18 20:20:43 +00:00
|
|
|
<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="recheck_voucher" string="Approve" states="recheck" icon="terp-check"/>
|
|
|
|
<button name="cancel_voucher" string="Cancel" states="draft,proforma,recheck" icon="gtk-cancel"/>
|
|
|
|
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
|
|
|
|
</group>
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<!-- Sales Voucher -->
|
|
|
|
<record id="action_sale_receipt" model="ir.actions.act_window">
|
|
|
|
<field name="name">Sales Receipt</field>
|
|
|
|
<field name="res_model">account.voucher.open</field>
|
|
|
|
<field name="view_type">form</field>
|
|
|
|
<field name="domain">[('journal_id.type','=','sale')]</field>
|
|
|
|
<field name="context">{'journal_type':'sale', 'type':'sale'}</field>
|
|
|
|
<field name="view_id" ref="account_open_vouchers_view"/>
|
|
|
|
<field name="target">new</field>
|
|
|
|
</record>
|
|
|
|
<menuitem id="menu_action_sale_receipt" icon="STOCK_JUSTIFY_FILL"
|
2010-08-18 23:59:00 +00:00
|
|
|
action="action_sale_receipt" parent="account.menu_finance_receivables" sequence="14"/>
|
2010-08-18 20:20:43 +00:00
|
|
|
|
|
|
|
<!-- Purchase Vouchers -->
|
|
|
|
<record model="ir.ui.view" id="view_purchase_receipt_form">
|
|
|
|
<field name="name">account.voucher.purchase.form</field>
|
|
|
|
<field name="model">account.voucher</field>
|
|
|
|
<field name="type">form</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<form string="Vendor Bills">
|
|
|
|
<group col="6" colspan="4">
|
|
|
|
<field name="partner_id" on_change="onchange_partner_id(partner_id, type)"/>
|
|
|
|
<field name="name" colspan="4"/>
|
|
|
|
<field name="journal_id" domain="[('type','=','purchase')]" 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)"/>
|
|
|
|
<field name="number"/>
|
|
|
|
</group>
|
|
|
|
<notebook colspan="4">
|
|
|
|
<page string="Bill Information">
|
|
|
|
<field name="payment_ids" colspan="4" nolabel="1" height="180">
|
|
|
|
<tree string="Voucher Lines" editable="top">
|
|
|
|
<field name="stype" on_change="onchange_partner(parent.partner_id,type,parent.type, parent.currency_id)"/>
|
|
|
|
<field name="ref" on_change="onchange_partner(parent.partner_id,type,parent.type, parent.currency_id)"/>
|
|
|
|
<field name="amount"/>
|
|
|
|
<field name="account_id"/>
|
|
|
|
<field name="type" on_change="onchange_type(parent.partner_id,type,parent.type, parent.currency_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="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="recheck_voucher" string="Approve" states="recheck" icon="terp-check"/>
|
|
|
|
<button name="cancel_voucher" string="Cancel" states="draft,proforma,recheck" icon="gtk-cancel"/>
|
|
|
|
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
|
|
|
|
</group>
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
<record id="action_purchase_receipt" model="ir.actions.act_window">
|
|
|
|
<field name="name">Vendor Bills</field>
|
|
|
|
<field name="res_model">account.voucher.open</field>
|
|
|
|
<field name="view_type">form</field>
|
|
|
|
<field name="domain">[('journal_id.type','=','purchase')]</field>
|
|
|
|
<field name="context">{'journal_type':'purchase', 'type':'purchase'}</field>
|
|
|
|
<field name="view_id" ref="account_open_vouchers_view"/>
|
|
|
|
<field name="target">new</field>
|
|
|
|
</record>
|
2010-08-18 23:59:00 +00:00
|
|
|
<menuitem id="menu_action_purchase_receipt" icon="STOCK_JUSTIFY_FILL"
|
|
|
|
action="action_purchase_receipt" parent="account.menu_finance_payables" sequence="14"/>
|
2010-08-18 20:20:43 +00:00
|
|
|
|
|
|
|
</data>
|
|
|
|
</openerp>
|