[MERGE] lp:~openerp-dev/openobject-server/trunk-clean-search-imp-tpa
[odoo/odoo.git] / addons / account_payment / account_payment_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <!-- View used in the wizard -->
6         <record id="view_move_line_form" model="ir.ui.view">
7             <field name="name">account.move.line.form.inherit</field>
8             <field name="model">account.move.line</field>
9             <field name="type">form</field>
10             <field name="inherit_id" ref="account.view_move_line_form"/>
11             <field name="arch" type="xml">
12                 <field name="reconcile_partial_id" position="after">
13                     <field name="amount_to_pay"/>
14                 </field>
15             </field>
16         </record>
17
18         <record model="ir.ui.view" id="view_move_line_tree_wiz">
19             <field name="name">account.move.line.tree</field>
20             <field name="model">account.move.line</field>
21             <field name="type">tree</field>
22             <field name="priority" eval="1"/>
23             <field name="arch" type="xml">
24                 <tree string="Account Entry Line">
25                     <field name="partner_id"/>
26                     <field name="ref"/>
27                     <field name="name"/>
28                     <field name="journal_id"/>
29                     <field name="account_id"/>
30                     <field name="date_maturity"/>
31                     <field name="date"/>
32                     <field name="debit" sum="Total debit"/>
33                     <field name="credit" sum="Total credit"/>
34                     <field name="amount_to_pay"/>
35                     <field name="amount_currency"/>
36                     <field name="currency_id"/>
37                     <field name="period_id" invisible="1"/>
38                 </tree>
39             </field>
40         </record>
41
42         <menuitem id="menu_main_payment" name="Payment" parent="account.menu_finance" sequence="7"/>
43
44         <record id="view_payment_mode_search" model="ir.ui.view">
45             <field name="name">payment.mode.search</field>
46             <field name="model">payment.mode</field>
47             <field name="type">search</field>
48             <field name="arch" type="xml">
49                 <search string="Payment Mode">
50                     <field name="name"
51                         string="Payment Mode"/>
52                     <separator orientation="vertical"/>
53                     <field name="journal" widget='selection'/>
54                     <field name="company_id" widget='selection' groups="base.group_multi_company"/>
55                     <newline/>
56                     <group expand="0" string="Group By...">
57                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal'}"/>
58                     </group>
59                 </search>
60             </field>
61         </record>
62
63         <record id="view_payment_mode_tree" model="ir.ui.view">
64             <field name="name">payment.mode.tree</field>
65             <field name="model">payment.mode</field>
66             <field name="type">tree</field>
67             <field name="arch" type="xml">
68                 <tree string="Payment Mode">
69                     <field name="name"/>
70                     <field name="journal"/>
71                     <field name="company_id" groups="base.group_multi_company"/>
72                 </tree>
73             </field>
74         </record>
75
76         <record id="view_payment_mode_form" model="ir.ui.view">
77             <field name="name">payment.mode.form</field>
78             <field name="model">payment.mode</field>
79             <field name="type">form</field>
80             <field name="arch" type="xml">
81                 <form string="Payment Mode" version="7.0">
82                     <group col="4">
83                         <field name="name"/>
84                         <field name="journal"/>
85                         <field name="bank_id" domain="[('partner_id','=',partner_id)]"  />
86                         <field name="company_id" widget='selection' groups="base.group_multi_company" on_change="onchange_company_id(company_id)"/>
87                         <field name="partner_id" widget='selection' invisible="1"/>
88                     </group>
89                 </form>
90             </field>
91         </record>
92         <record id="action_payment_mode_form" model="ir.actions.act_window">
93             <field name="name">Payment Mode</field>
94             <field name="res_model">payment.mode</field>
95             <field name="view_type">form</field>
96             <field name="view_mode">tree,form</field>
97             <field name="search_view_id" ref="view_payment_mode_search"/>
98         </record>
99
100         <menuitem action="action_payment_mode_form" id="menu_action_payment_mode_form" parent="account.menu_configuration_misc" groups="base.group_no_one"/>
101
102         <record id="view_payment_order_form" model="ir.ui.view">
103             <field name="name">payment.order.form</field>
104             <field name="model">payment.order</field>
105             <field name="type">form</field>
106             <field name="arch" type="xml">
107                 <form version="7.0">
108                 <header>
109                     <button name="open" states="draft" string="Confirm Payments" class="oe_highlight"/>
110                     <button name="set_done" states="open" string="Make Payments" type="object" class="oe_highlight"/>
111                     <button name="set_to_draft" states="cancel" string="Set to draft" type="object"/>
112                     <button name="cancel" states="draft,open" string="Cancel"/>
113                     <field name="state" widget="statusbar" statusbar_visible="draft,open"/>
114                 </header>
115                 <sheet string="Payment order">
116                     <div class="oe_button_box">
117                         <button name="%(action_create_payment_order)d" string="Select Invoices to Pay"
118                                type="action" attrs="{'invisible':[('state','=','done')]}" icon="gtk-find"/>
119                     </div>
120                     <div class="oe_title">
121                         <label for="reference" class="oe_edit_only"/>
122                         <h1><field name="reference"/></h1>
123                     </div>
124                     <group>
125                         <group>
126                             <field name="user_id"/>
127                             <field name="mode"/>
128                         </group>
129                         <group>
130                             <field name="date_prefered"/>
131                             <field name="date_scheduled" attrs="{'readonly':[('date_prefered','!=','fixed')]}"/>
132                             <field name="company_id" widget='selection' groups="base.group_multi_company"/>
133                         </group>
134                     </group>
135                     <field name="line_ids" context="{'order_id': active_id or False}" >
136                         <form string="Payment Line" version="7.0">
137                             <notebook>
138                                 <page string="Payment">
139                                     <group col="4">
140                                         <field name="move_line_id" on_change="onchange_move_line(move_line_id,parent.mode,parent.date_prefered,parent.date_scheduled,currency,company_currency)" domain="[('reconcile_id','=', False), ('credit', '>',0),('amount_to_pay','>',0)] "/>
141                                         <separator colspan="4" string="Transaction Information"/>
142                                         <field name="date"/>
143                                         <label for="amount_currency"/>
144                                         <div>
145                                             <field name="amount_currency" on_change="onchange_amount(amount_currency,currency,company_currency)" class="oe_inline"/>
146                                             <field name="currency" nolabel="1" class="oe_inline"/>
147                                         </div>
148                                         <field name="partner_id" on_change="onchange_partner(partner_id,parent.mode)"/>
149                                         <field domain="[('partner_id','=',partner_id)]" name="bank_id"/>
150                                         <separator colspan="2" string="Owner Account"/>
151                                         <separator colspan="2" string="Destination Account"/>
152                                         <field colspan="2" name="info_owner" nolabel="1"/>
153                                         <field colspan="2" name="info_partner" nolabel="1"/>
154                                         <field colspan="4" name="communication"/>
155                                         <field colspan="4" name="communication2"/>
156                                         <field name="name"/>
157                                         <field name="state"/>
158                                         <field name="company_id" widget="selection" groups="base.group_multi_company"/>
159                                     </group>
160                                 </page>
161                                 <page string="Information">
162                                     <group col="4" string="General Information">
163                                         <label for="amount"/>
164                                         <div>
165                                             <field name="amount" class="oe_inline"/>
166                                             <field name="company_currency" class="oe_inline"/>
167                                         </div>
168                                         <separator colspan="4" string="Entry Information"/>
169                                         <field name="create_date" readonly="1"/>
170                                         <field name="ml_maturity_date"/>
171                                         <field name="ml_inv_ref"/>
172                                     </group>
173                                 </page>
174                             </notebook>
175                         </form>
176                         <tree string="Payment Line">
177                             <field name="ml_inv_ref" />
178                             <field name="partner_id"/>
179                             <field name="communication"/>
180                             <field name="bank_id" domain="[('partner_id', '=', partner_id)]"/>
181                             <field name="ml_maturity_date"/>
182                             <field name="date"/>
183                             <field name="amount_currency" string="Amount"/>
184                             <field name="currency"/>
185                             <field name="name"/>
186                             <field name="amount" sum="Total in Company Currency" invisible="1"/>
187                         </tree>
188                     </field>
189                     </sheet>
190                 </form>
191             </field>
192         </record>
193
194         <record id="view_payment_order_tree" model="ir.ui.view">
195             <field name="name">payment.order.tree</field>
196             <field name="model">payment.order</field>
197             <field name="type">tree</field>
198             <field eval="4" name="priority"/>
199             <field name="arch" type="xml">
200                 <tree colors="blue:state == 'draft';gray:state in ('cancel','done');black:state == 'open'" string="Payment order">
201                     <field name="reference"/>
202                     <field name="mode"/>
203                     <field name="user_id"/>
204                     <field name="company_id" groups="base.group_multi_company"/>
205                     <field name="date_created"/>
206                     <field name="date_done"/>
207                     <field name="total"/>
208                     <field name="state"/>
209                 </tree>
210             </field>
211         </record>
212
213         <record id="view_payment_order_search" model="ir.ui.view">
214             <field name="name">payment.order.tree.search</field>
215             <field name="model">payment.order</field>
216             <field name="type">search</field>
217             <field name="arch" type="xml">
218                 <search string="Search Payment Orders">
219                     <group>
220                         <field name="reference"
221                             string="Payment Order"/>
222                         <separator orientation="vertical"/>
223                         <field name="date_done"/>
224                         <separator orientation="vertical"/>
225                         <filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
226                         <filter string="Confirmed" domain="[('state','=','open')]" icon="terp-camera_test"/>
227                         <filter string="Done" domain="[('state','=','done')]" icon="terp-dialog-close"/>
228                         <separator orientation="vertical"/>
229                         <field name="mode" widget='selection'/>
230                         <field name="state"/>
231                     </group>
232                     <newline/>
233                     <group expand="0" string="Group By...">
234                         <filter string="Payment Mode" context="{'group_by': 'mode'}" icon="terp-dolar"/>
235                         <filter string="Status" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
236                     </group>
237                 </search>
238             </field>
239         </record>
240
241         <record id="action_payment_order_tree" model="ir.actions.act_window">
242             <field name="name">Payment Orders</field>
243             <field name="res_model">payment.order</field>
244             <field name="view_type">form</field>
245             <field name="view_mode">tree,form</field>
246             <field name="search_view_id" ref="view_payment_order_search"/>
247             <field name="help">A payment order is a payment request from your company to pay a supplier invoice or a customer credit note. Here you can register all payment orders that should be done, keep track of all payment orders and mention the invoice reference and the partner the payment should be done for.</field>
248         </record>
249
250         <menuitem action="action_payment_order_tree" id="menu_action_payment_order_form" parent="menu_main_payment" sequence="3"/>
251
252         <record id="action_payment_order_tree_new" model="ir.actions.act_window">
253             <field name="name">New Payment Order</field>
254             <field name="res_model">payment.order</field>
255             <field name="view_type">form</field>
256             <field name="view_mode">form,tree</field>
257         </record>
258
259         <record id="view_payment_line_form" model="ir.ui.view">
260             <field name="name">Payment Line</field>
261             <field name="model">payment.line</field>
262             <field name="type">form</field>
263             <field name="arch" type="xml">
264                 <form string="Payment Line" version="7.0">
265                     <notebook>
266                         <page string="Payment">
267                             <group col="4">
268                                 <field name="order_id"/>
269                                 <field name="move_line_id" on_change="onchange_move_line(move_line_id, False, currency, company_currency)" domain="[('reconcile_id','=', False), ('credit', '>',0),('amount_to_pay','>',0)]"/>
270                                 <separator colspan="4" string="Transaction Information"/>
271                                 <field name="date"/>
272                                 <label for="amount_currency"/>
273                                 <div>
274                                     <field name="amount_currency" on_change="onchange_amount(amount_currency,currency,company_currency)" class="oe_inline"/>
275                                     <field name="currency" class="oe_inline"/>
276                                 </div>
277                                 <field name="partner_id" on_change="onchange_partner(partner_id, False)"/>
278                                 <field domain="[('partner_id','=',partner_id)]" name="bank_id"/>
279                                 <separator colspan="2" string="Owner Account"/>
280                                 <separator colspan="2" string="Desitination Account"/>
281                                 <field colspan="2" name="info_owner" nolabel="1"/>
282                                 <field colspan="2" name="info_partner" nolabel="1"/>
283
284                                 <field colspan="4" name="communication"/>
285                                 <field colspan="4" name="communication2"/>
286                                 <field name="name"/>
287                                 <field name="state"/>
288                             </group>
289                         </page>
290                         <page string="Information">
291                             <group col="4" string="General Information">
292                                 <field name="amount"/>
293                                 <field name="company_currency" nolabel="1"/>
294                             </group>
295                             <group col="4" string="Entry Information">
296                                 <field name="create_date"/>
297                                 <field name="ml_maturity_date"/>
298                                 <field name="ml_inv_ref"/>
299                             </group>
300                         </page>
301                     </notebook>
302                 </form>
303             </field>
304         </record>
305         <record id="view_payment_line_tree" model="ir.ui.view">
306             <field name="name">Payment Lines</field>
307             <field name="model">payment.line</field>
308             <field name="type">tree</field>
309             <field eval="4" name="priority"/>
310             <field name="arch" type="xml">
311                 <tree string="Payment Line">
312                     <field name="order_id"/>
313                     <field name="ml_inv_ref" />
314                     <field name="ml_maturity_date"/>
315                     <field name="partner_id"/>
316                     <field name="communication"/>
317                     <field name="amount" sum="Amount Total"/>
318                     <field name="amount_currency" sum="Currency Amount Total"/>
319                     <field name="currency"/>
320                     <field name="bank_id" domain="[('partner_id', '=', partner_id)]"/>
321                     <field name="move_line_id" on_change="onchange_move_line(move_line_id,parent.mode)"/>
322                     <field name="create_date"/>
323                     <field name="name"/>
324                 </tree>
325             </field>
326         </record>
327         <record id="action_payment_line_form" model="ir.actions.act_window">
328             <field name="name">Payment Line</field>
329             <field name="res_model">payment.line</field>
330             <field name="view_type">tree</field>
331             <field name="view_mode">form,tree</field>
332         </record>
333
334         <record id="view_bank_statement_form" model="ir.ui.view">
335             <field name="name">account.bank.statement.form.inherit</field>
336             <field name="model">account.bank.statement</field>
337             <field name="type">form</field>
338             <field name="inherit_id" ref="account.view_bank_statement_form"/>
339             <field name="arch" type="xml">
340                     <xpath expr="//div[@name='import_buttons']" position="inside">
341                         <button name="%(action_account_populate_statement_confirm)d" attrs="{'invisible':[('state','=','confirm')]}" string="Import Payment Lines" type="action" icon="gtk-execute"/>
342                     </xpath>
343             </field>
344         </record>
345
346     </data>
347 </openerp>