[REM] all @col and @colspan attributes on groups in search views: search views are...
[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                 <form string="Payment Mode">
50                     <field name="name"/>
51                     <field name="journal" widget='selection'/>
52                     <field name="company_id" widget='selection' groups="base.group_multi_company"/>
53                     <newline/>
54                     <group expand="0" string="Group By...">
55                       <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal'}"/>
56                     </group>
57                 </form>
58             </field>
59         </record>
60
61         <record id="view_payment_mode_tree" model="ir.ui.view">
62             <field name="name">payment.mode.tree</field>
63             <field name="model">payment.mode</field>
64             <field name="type">tree</field>
65             <field name="arch" type="xml">
66                 <tree string="Payment Mode">
67                     <field name="name"/>
68                     <field name="journal"/>
69                     <field name="company_id" groups="base.group_multi_company"/>
70                 </tree>
71             </field>
72         </record>
73
74         <record id="view_payment_mode_form" model="ir.ui.view">
75             <field name="name">payment.mode.form</field>
76             <field name="model">payment.mode</field>
77             <field name="type">form</field>
78             <field name="arch" type="xml">
79                 <form string="Payment Mode">
80                     <field name="name" select="1"/>
81                     <field name="journal" select="1"/>
82                     <field name="bank_id"/>
83                     <field name="company_id" select="1" widget='selection' groups="base.group_multi_company"/>
84                 </form>
85             </field>
86         </record>
87         <record id="action_payment_mode_form" model="ir.actions.act_window">
88             <field name="name">Payment Mode</field>
89             <field name="res_model">payment.mode</field>
90             <field name="view_type">form</field>
91             <field name="view_mode">tree,form</field>
92             <field name="search_view_id" ref="view_payment_mode_search"/>
93         </record>
94
95         <menuitem action="action_payment_mode_form" id="menu_action_payment_mode_form" parent="account.menu_configuration_misc"/>
96
97         <record id="view_payment_order_form" model="ir.ui.view">
98             <field name="name">payment.order.form</field>
99             <field name="model">payment.order</field>
100             <field name="type">form</field>
101             <field name="arch" type="xml">
102                 <form string="Payment order">
103                     <group col="6" colspan="4">
104                       <field name="reference"/>
105                       <field name="mode" widget='selection'/>
106                       <field name="user_id"/>
107                       <field name="date_prefered"/>
108                       <field name="date_scheduled" select="1" attrs="{'readonly':[('date_prefered','!=','fixed')]}" />
109                       <button colspan="2" name="%(action_create_payment_order)d" string="Select Invoices to Pay" type="action" attrs="{'invisible':[('state','=','done')]}" icon="gtk-find"/>
110                       <field name="company_id" widget='selection' groups="base.group_multi_company"/>
111                     </group>
112                     <field name="line_ids" colspan="4" widget="one2many_list" nolabel="1" default_get="{'order_id': active_id or False}" >
113                         <form string="Payment Line">
114                             <notebook>
115                                 <page string="Payment">
116                                     <field name="move_line_id" on_change="onchange_move_line(move_line_id,parent.mode,parent.date_prefered,parent.date_scheduled,currency,company_currency)" select="1" domain="[('reconcile_id','=', False), ('credit', '>',0),('amount_to_pay','>',0)] "/>
117                                     <separator colspan="4" string="Transaction Information"/>
118                                     <field name="date"/>
119                                     <group colspan="2">
120                                         <field name="amount_currency" on_change="onchange_amount(amount_currency,currency,company_currency)"/>
121                                         <field name="currency" nolabel="1"/>
122                                     </group>
123                                     <field name="partner_id" on_change="onchange_partner(partner_id,parent.mode)" select="1"/>
124                                     <field domain="[('partner_id','=',partner_id)]" name="bank_id"/>
125                                     <separator colspan="2" string="Owner Account"/>
126                                     <separator colspan="2" string="Destination Account"/>
127                                     <field colspan="2" name="info_owner" nolabel="1"/>
128                                     <field colspan="2" name="info_partner" nolabel="1"/>
129                                     <field colspan="4" name="communication"/>
130                                     <field colspan="4" name="communication2"/>
131                                     <field name="name"/>
132                                     <field name="state"/>
133                                     <field name="company_id" widget='selection' groups="base.group_multi_company"/>
134                                 </page>
135                                 <page string="Information">
136
137                                     <separator colspan="4" string="General Information"/>
138                                     <group colspan="2">
139                                         <field name="amount"/>
140                                         <field name="company_currency" nolabel="1"/>
141                                     </group>
142                                     <separator colspan="4" string="Entry Information"/>
143                                     <field name="create_date" readonly="1"/>
144                                     <field name="ml_maturity_date"/>
145                                     <field name="ml_inv_ref"/>
146                                 </page>
147                             </notebook>
148                         </form>
149                         <tree string="Payment Line">
150                             <field name="ml_inv_ref" />
151                             <field name="partner_id" select="1"/>
152                             <field name="bank_id" domain="[('partner_id', '=', partner_id)]"/>
153                             <field name="ml_maturity_date"/>
154                             <field name="date"/>
155                             <field name="amount_currency" string="Amount"/>
156                             <field name="currency"/>
157                             <field name="name"/>
158                             <field name="amount" sum="Total in Company Currency" invisible="1"/>
159                         </tree>
160                     </field>
161                     <field name="date_created"/>
162                     <field name="date_done"/>
163                     <field name="state" readonly="1" select="1"/>
164                     <group col="4" colspan="2">
165                          <button name="cancel" states="draft,open" string="Cancel" icon="gtk-cancel"/>
166                          <button name="open" states="draft" string="Confirm Payments"  icon="gtk-apply"/>
167                          <button name="set_done" states="open" string="Make Payments" type="object" icon="gtk-execute"/>
168                          <button name="set_to_draft" states="cancel" string="Set to draft" type="object" icon="gtk-convert"/>
169                     </group>
170                 </form>
171             </field>
172         </record>
173
174         <record id="view_payment_order_tree" model="ir.ui.view">
175             <field name="name">payment.order.tree</field>
176             <field name="model">payment.order</field>
177             <field name="type">tree</field>
178             <field eval="4" name="priority"/>
179             <field name="arch" type="xml">
180                 <tree colors="blue:state in ('draft');gray:state in ('cancel','done');black:state in ('open')" string="Payment order">
181                     <field name="reference"/>
182                     <field name="mode"/>
183                     <field name="user_id"/>
184                     <field name="company_id" groups="base.group_multi_company"/>
185                     <field name="date_created"/>
186                     <field name="date_done"/>
187                     <field name="total"/>
188                     <field name="state"/>
189                     <button name="cancel" states="draft,open" string="Cancel" icon="gtk-cancel"/>
190                     <button name="open" states="draft" string="Confirm Payments"  icon="gtk-apply"/>
191                     <button name="set_done" states="open" string="Make Payments"  type ="object" icon="gtk-execute"/>
192                 </tree>
193             </field>
194         </record>
195
196         <record id="view_payment_order_search" model="ir.ui.view">
197             <field name="name">payment.order.tree.search</field>
198             <field name="model">payment.order</field>
199             <field name="type">search</field>
200             <field name="arch" type="xml">
201                 <search string="Search Payment Orders">
202                     <group>
203                         <filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
204                         <filter string="Confirmed" domain="[('state','=','open')]" icon="terp-camera_test"/>
205                         <filter string="Done" domain="[('state','=','done')]" icon="terp-dialog-close"/>
206                         <separator orientation="vertical"/>
207                         <field name="reference"/>
208                         <field name="mode" widget='selection'/>
209                         <field name="date_done"/>
210                         <field name="state"/>
211                     </group>
212                     <newline/>
213                     <group expand="0" string="Group By...">
214                         <filter string="Payment Mode" context="{'group_by': 'mode'}" icon="terp-dolar"/>
215                         <filter string="State" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
216                     </group>
217                 </search>
218             </field>
219         </record>
220
221         <record id="action_payment_order_tree" model="ir.actions.act_window">
222             <field name="name">Payment Orders</field>
223             <field name="res_model">payment.order</field>
224             <field name="view_type">form</field>
225             <field name="view_mode">tree,form</field>
226             <field name="search_view_id" ref="view_payment_order_search"/>
227             <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>
228         </record>
229
230         <menuitem action="action_payment_order_tree" id="menu_action_payment_order_form" parent="menu_main_payment" sequence="3"/>
231
232         <record id="action_payment_order_tree_new" model="ir.actions.act_window">
233             <field name="name">New Payment Order</field>
234             <field name="res_model">payment.order</field>
235             <field name="view_type">form</field>
236             <field name="view_mode">form,tree</field>
237         </record>
238
239         <record id="view_payment_line_form" model="ir.ui.view">
240             <field name="name">Payment Line</field>
241             <field name="model">payment.line</field>
242             <field name="type">form</field>
243             <field name="arch" type="xml">
244                 <form string="Payment Line">
245                     <notebook>
246                         <page string="Payment">
247                             <field name="order_id" select="1"/>
248                             <field name="move_line_id" on_change="onchange_move_line(move_line_id, False, currency, company_currency)" select="1" domain="[('reconcile_id','=', False), ('credit', '>',0),('amount_to_pay','>',0)] "/>
249                             <separator colspan="4" string="Transaction Information"/>
250                             <field name="date"/>
251                             <group colspan="2">
252                                 <field name="amount_currency" on_change="onchange_amount(amount_currency,currency,comapny_currency)"/>
253                                 <field name="currency" nolabel="1"/>
254                             </group>
255                             <field name="partner_id" on_change="onchange_partner(partner_id, False)" select="1"/>
256                             <field domain="[('partner_id','=',partner_id)]" name="bank_id"/>
257                             <separator colspan="2" string="Owner Account"/>
258                             <separator colspan="2" string="Desitination Account"/>
259                             <field colspan="2" name="info_owner" nolabel="1"/>
260                             <field colspan="2" name="info_partner" nolabel="1"/>
261
262                             <field colspan="4" name="communication"/>
263                             <field colspan="4" name="communication2"/>
264                             <field name="name"/>
265                              <field name="state"/>
266                         </page>
267                         <page string="Information">
268                             <separator colspan="4" string="General Information"/>
269                             <group colspan="2">
270                                 <field name="amount" select="1"/>
271                                 <field name="company_currency" nolabel="1"/>
272                             </group>
273                             <separator colspan="4" string="Entry Information"/>
274                             <field name="create_date"/>
275                             <field name="ml_maturity_date"/>
276                             <field name="ml_inv_ref"/>
277                         </page>
278                     </notebook>
279                 </form>
280             </field>
281         </record>
282         <record id="view_payment_line_tree" model="ir.ui.view">
283             <field name="name">Payment Lines</field>
284             <field name="model">payment.line</field>
285             <field name="type">tree</field>
286             <field eval="4" name="priority"/>
287             <field name="arch" type="xml">
288                 <tree string="Payment Line">
289                     <field name="order_id"/>
290                     <field name="ml_inv_ref" />
291                     <field name="ml_maturity_date"/>
292                     <field name="partner_id" select="1"/>
293                     <field name="amount" sum="Amount Total"/>
294                     <field name="amount_currency" sum="Currency Amount Total"/>
295                     <field name="currency"/>
296                     <field name="bank_id" domain="[('partner_id', '=', partner_id)]"/>
297                     <field name="move_line_id" on_change="onchange_move_line(move_line_id,parent.mode)"/>
298                     <field name="create_date"/>
299                     <field name="name"/>
300                 </tree>
301             </field>
302         </record>
303         <record id="action_payment_line_form" model="ir.actions.act_window">
304             <field name="name">Payment Line</field>
305             <field name="res_model">payment.line</field>
306             <field name="view_type">tree</field>
307             <field name="view_mode">form,tree</field>
308         </record>
309
310         <record id="view_bank_statement_form" model="ir.ui.view">
311             <field name="name">account.bank.statement.form.inherit</field>
312             <field name="model">account.bank.statement</field>
313             <field name="type">form</field>
314             <field name="inherit_id" ref="account.view_bank_statement_form"/>
315             <field name="arch" type="xml">
316                 <field name="journal_id" position="after">
317                     <button name="%(action_account_populate_statement_confirm)d" attrs="{'invisible':[('state','=','confirm')]}" string="Import payment lines" type="action" icon="gtk-execute"/>
318                 </field>
319             </field>
320         </record>
321
322         <act_window domain="[('move_line_id.move_id.id', '=', move_id)]" id="act_account_invoice_2_payment_line" name="Payment Lines" res_model="payment.line" src_model="account.invoice"/>
323
324     </data>
325 </openerp>