[NEW] Account Check Writing-1
[odoo/odoo.git] / addons / account_check_writing / account_voucher_view.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <openerp>
3     <data>
4
5         <!-- Supplier voucher view -->
6         
7         <record model="ir.ui.view" id="view_vendor_payment_check_form">
8             <field name="name">account.voucher.payment.check.form</field>
9             <field name="model">account.voucher</field>
10             <field name="type">form</field>
11             <field name="inherit_id" ref="account_voucher.view_vendor_payment_form" />
12             <field name="arch" type="xml">
13                 <field name="journal_id" position="after">
14                     <newline/>
15                     <field name="allow_check" invisible="1"/>
16                     <field name="amount_in_word" attrs="{'invisible':[('allow_check','!=',1)]}" nolabel="1" colspan="6"/>
17                     <newline/>
18                 </field>
19                 <field name="number" position="replace">
20                     <field name="number" attrs="{'readonly':[('allow_check','!=',1)]}" />
21                 </field>
22                 <button name="proforma_voucher" position="after">
23                     <button name="print_check" icon="gtk-print" string="Print Check" type="object" attrs="{'invisible':['|',('allow_check','!=',1),('state','!=','posted') ]}"/>
24                 </button>
25             </field>
26         </record>
27
28         <record id="action_write_check" model="ir.actions.act_window">
29             <field name="name">Write Checks</field>
30             <field name="res_model">account.voucher</field>
31             <field name="view_type">form</field>
32             <field name="view_mode">form,tree</field>
33             <field name="domain">[('journal_id.type', '=', 'bank'), ('type','=','payment'), ('journal_id.allow_check_writing','=',True)]</field>
34             <field name="context">{'type':'payment','write_check':True}</field>
35             <field name="search_view_id" ref="account_voucher.view_voucher_filter"/>
36             <field name="target">current</field>
37             <field name="help">The check payment form allows you to track the payment you do to your suppliers specially by check. When you select a supplier, the payment method and an amount for the payment, OpenERP will propose to reconcile your payment with the open supplier invoices or bills.You can print the check</field>
38         </record>
39
40         <record id="action_write_check_form" model="ir.actions.act_window.view">
41             <field eval="2" name="sequence"/>
42             <field name="view_mode">form</field>
43             <field name="view_id" ref="view_vendor_payment_check_form"/>
44             <field name="act_window_id" ref="action_write_check"/>
45         </record>
46
47         <record id="action_write_check_tree" model="ir.actions.act_window.view">
48             <field eval="1" name="sequence"/>
49             <field name="view_mode">tree</field>
50             <field name="act_window_id" ref="action_write_check"/>
51         </record>
52
53         <menuitem action="action_write_check" icon="STOCK_JUSTIFY_FILL" sequence="12"
54             id="menu_action_write_check"  parent="account.menu_finance_bank_and_cash"/>
55     </data>
56 </openerp>