~serpent-consulting-services/openerp-usa/shipping_api_6-1

« back to all changes in this revision

Viewing changes to account_check_writing/account_voucher_view.xml

  • Committer: npgllc
  • Date: 2012-08-02 17:13:27 UTC
  • Revision ID: npgllc-20120802171327-2xgyyjjb5d1kx26y
Removed all the 6.0 compatible modules

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="UTF-8"?>
2
 
<openerp>
3
 
        <data>
4
 
        
5
 
        <!-- Account Voucher -->
6
 
 
7
 
                <record id="view_voucher_filter_vendor_pay_inherit" model="ir.ui.view">
8
 
                        <field name="name">account.voucher.purchase.pay.select.inherit</field>
9
 
                        <field name="model">account.voucher</field>
10
 
                        <field name="type">search</field>
11
 
                        <field name="inherit_id" ref="account_voucher.view_voucher_filter_vendor_pay" />
12
 
                        <field name="arch" type="xml">
13
 
                                <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" position="after">
14
 
                                        <filter string="Check Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'chk_status'}"/>
15
 
                                </filter>
16
 
                        </field>
17
 
                </record>
18
 
 
19
 
                <record model="ir.ui.view" id="view_voucher_tree_inherit">
20
 
                        <field name="name">account.voucher.tree.inherit</field>
21
 
                        <field name="model">account.voucher</field>
22
 
                        <field name="type">tree</field>
23
 
                        <field name="inherit_id" ref="account_voucher.view_voucher_tree" />
24
 
                        <field name="arch" type="xml">
25
 
                                <field name="journal_id" position="after">
26
 
                                        <field name="chk_seq" />
27
 
                                        <field name="chk_status" invisible="1" />
28
 
                                </field>
29
 
                        </field>
30
 
                </record>
31
 
 
32
 
                <record model="ir.ui.view" id="view_vendor_payment_check_form">
33
 
                        <field name="name">account.voucher.payment.check.form</field>
34
 
                        <field name="model">account.voucher</field>
35
 
                        <field name="type">form</field>
36
 
                        <field name="inherit_id" ref="account_voucher.view_vendor_payment_form" />
37
 
                        <field name="arch" type="xml">
38
 
                                <field name="partner_id" domain="[('supplier','=',True)]" required="1" 
39
 
                                       on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)" 
40
 
                                       context="{'invoice_currency':currency_id}" string="Supplier"/>
41
 
                                <field name="amount" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)"/>
42
 
                                <field name="amount" position="after">
43
 
                                        <field name="allow_check" invisible="1"/>
44
 
                                        <field name="amount_in_word" attrs="{'invisible':[('allow_check','!=',1)]}" nolabel="1" colspan="2"/>
45
 
                                        <field name="chk_seq" attrs="{'invisible':[('allow_check','!=',1)]}" colspan="1"/>
46
 
                                        <field name="chk_status" invisible="1" />
47
 
                                </field>
48
 
                                <field name="journal_id"
49
 
                       domain="[('type','in',['bank', 'cash'])]"
50
 
                       widget="selection" select="1"
51
 
                       on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)"
52
 
                       string="Payment Method"/>
53
 
                                <field name="date" select="1" on_change="onchange_date(partner_id, journal_id, amount, currency_id, type, date)"/>
54
 
                                <field name="name" colspan="4"/>
55
 
                                <field name="type" invisible="True"/>
56
 
                                <field name="currency_id" invisible="True"/>
57
 
                                <field name="state"/>
58
 
                                <button name="proforma_voucher" position="after">
59
 
                                        <button name="%(print_check_act_window)d"   string="Print Check" type="action" 
60
 
                                                attrs="{'invisible':['|',('allow_check','!=',1),('state','in',['draft','proforma','cancel'])]}"/>
61
 
                                </button>
62
 
                                <separator string="Other Information" colspan="2" position="replace"/>
63
 
                                <field name="number" position="replace"/>
64
 
                        </field>
65
 
                </record>
66
 
                
67
 
                <record model="ir.ui.view" id="view_payment_write_check_form">
68
 
                        <field name="name">account.voucher.payment.write.check.form</field>
69
 
                        <field name="model">account.voucher</field>
70
 
                        <field name="type">form</field>
71
 
                        <field name="arch" type="xml">
72
 
                                <form string="Customer Payment">
73
 
                                        <group col="6" colspan="4">
74
 
                                                <field name="partner_id" domain="[('supplier','=',True)]" required="1" 
75
 
                                                       on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)" string="Pay to the order of"/>
76
 
                                                <field name="date" select="1" on_change="onchange_date(partner_id, journal_id, amount, currency_id, type, date)"/>
77
 
                                                <field name="chk_seq" />
78
 
                                                <field name="journal_id"
79
 
                               domain="[('type','=','bank' ),('allow_check_writing','=',True)]"
80
 
                               widget="selection" select="1"
81
 
                               on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)"
82
 
                               string="Payment Method"/>
83
 
                                                <field name="amount" on_change="onchange_amount(amount)" string="Amount"/>
84
 
                                                <field name="allow_check" invisible="1"/>
85
 
                                                <field name="amount_in_word" attrs="{'invisible':[('allow_check','!=',1)]}" nolabel="1" colspan="2"/>
86
 
                                                <field name="reference" select="1" string="Payment Ref"/>
87
 
                                                <field name="name" colspan="4"/>
88
 
                                                <field name="account_id"
89
 
                               widget="selection"
90
 
                               invisible="True"/>
91
 
                                                <field name="type" invisible="True"/>
92
 
                                                <field name="currency_id" invisible="True"/>
93
 
                                        </group>
94
 
                                        <notebook colspan="4">
95
 
                                                <page string="Payment Information">
96
 
                                                        <field name="line_dr_ids" on_change="onchange_price(line_dr_ids, tax_id, partner_id)"
97
 
                                 default_get="{'journal_id':journal_id,'partner_id':partner_id,'type':type}" 
98
 
                                 colspan="4" nolabel="1" height="180">
99
 
                                                                <tree string="Payment Lines" editable="bottom">
100
 
                                                                        <field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
101
 
                                           on_change="onchange_move_line_id(move_line_id)"
102
 
                                           domain="[('account_id.type','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
103
 
                                        />
104
 
                                                                        <!-- check can be used for any payment - should account type be expense ? -/ -->
105
 
                                                                        <field name="account_id" widget="selection" domain="[('type','=','payable')]"/>
106
 
                                                                        <field name="name"/>
107
 
                                                                        <field name="date_original" readonly="1"/>
108
 
                                                                        <field name="date_due" readonly="1"/>
109
 
                                                                        <field name="amount_original" readonly="1"/>
110
 
                                                                        <field name="amount_unreconciled" sum="Open Balance" readonly="1"/>
111
 
                                                                        <field name="amount" sum="Payment"/>
112
 
                                                                </tree>
113
 
                                                        </field>
114
 
                                                        <group col="2" colspan="3">
115
 
                                                                <separator string="Internal Notes" colspan="2"/>
116
 
                                                                <field name="narration" colspan="2" nolabel="1"/>
117
 
                                                        </group>
118
 
                                                        <group col="2" colspan="1">
119
 
                                                                <group col="2" colspan="1">
120
 
                                                                        <separator string="Payment Terms" colspan="2"/>
121
 
                                                                        <field name="date_due"/>
122
 
                                                                </group>
123
 
                                                                <group col="4" colspan="1" name="total">
124
 
                                                                        <separator string="Total" colspan="4"/>
125
 
                                                                        <field name="tax_id" on_change="onchange_price(line_dr_ids, tax_id, partner_id)" widget="selection" 
126
 
                                                                               domain="[('type_tax_use','in',('purchase','all')), ('parent_id', '=', False)]"/>
127
 
                                                                        <field name="tax_amount" nolabel="1"/>
128
 
                                                                        <button type="object" icon="terp-stock_format-scientific" name="compute_tax" string="Compute Tax" 
129
 
                                                                                groups="base.group_extended" attrs="{'invisible': [('state','!=','draft')]}"/>
130
 
                                                                </group>
131
 
                                                        </group>
132
 
                                                </page>
133
 
                                                <page string="Journal Items" groups="base.group_extended" attrs="{'invisible': [('state','!=','posted')]}">
134
 
                                                        <group col="6" colspan="4">
135
 
                                                                <field name="company_id" select="1" widget="selection" groups="base.group_multi_company"/>
136
 
                                                                <field name="period_id"/>
137
 
                                                                <field name="audit"/>
138
 
                                                        </group>
139
 
                                                        <field name="move_ids" colspan="4" nolabel="1" readonly="1">
140
 
                                                                <tree string="Journal Items">
141
 
                                                                        <field name="move_id"/>
142
 
                                                                        <field name="ref"/>
143
 
                                                                        <field name="date"/>
144
 
                                                                        <field name="statement_id"/>
145
 
                                                                        <field name="partner_id"/>
146
 
                                                                        <field name="account_id"/>
147
 
                                                                        <field name="name"/>
148
 
                                                                        <field name="debit"/>
149
 
                                                                        <field name="credit"/>
150
 
                                                                        <field name="state"/>
151
 
                                                                        <field name="reconcile_id"/>
152
 
                                                                </tree>
153
 
                                                        </field>
154
 
                                                </page>
155
 
                                        </notebook>
156
 
                                        <group col="10" colspan="4">
157
 
                                                <field name="state"/>
158
 
                                                <button name="cancel_voucher" string="Cancel" states="draft,proforma"  icon="gtk-cancel"/>
159
 
                                                <button name="cancel_voucher" string="Cancel" type="object" states="posted" icon="terp-stock_effects-object-colorize" 
160
 
                                                        confirm="Are you sure to confirm this record ?"/>
161
 
                                                <group attrs="{'invisible':[('state','!=','posted')]}">
162
 
                                                        <button icon="terp-dolar_ok!" name="%(account_voucher.act_pay_bills)d" 
163
 
                                                                context="{'narration':narration, 'title':'Bill Payment', 'type':'payment', 'partner_id': partner_id, 
164
 
                                                                          'reference':reference}" 
165
 
                                                                type="action" string="Pay Bill" attrs="{'invisible':[('pay_now','=','pay_now')]}"/>
166
 
                                                </group>
167
 
                                                <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" icon="terp-stock_effects-object-colorize"/>
168
 
                                                <button name="proforma_voucher" string="Validate" states="draft" icon="gtk-go-forward"/>
169
 
                                                <button name="%(print_check_act_window)d" states='draft' string="Print Check" type="action" 
170
 
                                                        attrs="{'invisible':[('allow_check','!=',1)]}"/>
171
 
                                        </group>
172
 
                                </form>
173
 
                        </field>
174
 
                </record>
175
 
                
176
 
                <record id="action_write_check" model="ir.actions.act_window">
177
 
                        <field name="name">Write Checks</field>
178
 
                        <field name="res_model">account.voucher</field>
179
 
                        <field name="view_type">form</field>
180
 
                        <field name="view_mode">form,tree</field>
181
 
                        <field name="domain">
182
 
                                [('journal_id.type', '=', 'bank'), ('type', '=', 'payment'), ('journal_id.allow_check_writing', '=', True)]
183
 
                        </field>
184
 
                        <field name="context">{'type':'payment','write_check':True}</field>
185
 
                        <field name="search_view_id" ref="account_voucher.view_voucher_filter"/>
186
 
                        <field name="target">current</field>
187
 
                        <field name="help">
188
 
                                The check payment form allows you to track the payment you do to your suppliers specially by check. 
189
 
                                When you select a supplier, the payment method and an amount for the payment, 
190
 
                                OpenERP will propose to reconcile your payment with the open supplier invoices or bills.You can print the check
191
 
                        </field>
192
 
                </record>
193
 
 
194
 
                <record id="action_write_check_form" model="ir.actions.act_window.view">
195
 
                        <field eval="2" name="sequence"/>
196
 
                        <field name="view_mode">form</field>
197
 
                        <field name="view_id" ref="view_payment_write_check_form"/>
198
 
                        <field name="act_window_id" ref="action_write_check"/>
199
 
                </record>
200
 
 
201
 
                <record id="action_write_check_tree" model="ir.actions.act_window.view">
202
 
                        <field eval="1" name="sequence"/>
203
 
                        <field name="view_mode">tree</field>
204
 
                        <field name="act_window_id" ref="action_write_check"/>
205
 
                </record>
206
 
 
207
 
                <menuitem action="action_write_check" icon="STOCK_JUSTIFY_FILL" sequence="12"
208
 
            id="menu_action_write_check"  parent="account.menu_finance_bank_and_cash"/>
209
 
 
210
 
                <record model="ir.ui.view" id="view_vendor_receipt_form_check_write">
211
 
                        <field name="name">account.voucher.receipt.form.check.write</field>
212
 
                        <field name="model">account.voucher</field>
213
 
                        <field name="type">form</field>
214
 
                        <field name="inherit_id" ref="account_voucher.view_vendor_receipt_form"/>
215
 
                        <field name="arch" type="xml">
216
 
                                <xpath expr="//field[@name='name']" position="after" >
217
 
                                        <field name="chk_seq" attrs="{'invisible':[('allow_check','!=',1)]}" />
218
 
                                        <field name="chk_status" invisible="1" />
219
 
                                        <field name="allow_check" invisible="1"/>
220
 
                                </xpath>
221
 
                                <xpath expr="//button[@string='Cancel']" position="after">
222
 
                                        <button name="%(print_check_act_window)d" states='draft' string="Print Check" type="action" 
223
 
                                                attrs="{'invisible':['|',('allow_check','!=',1),('state','!=','posted')]}"/>                                    
224
 
                                </xpath>
225
 
                        </field>
226
 
                </record>
227
 
 
228
 
        </data>
229
 
</openerp>