[FIX] Project->Project (members) m2m kaban doesnt work when empty, cannot add items
[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                     <group col="4">
117                       <field name="reference"/>
118                       <field name="mode" widget='selection'/>
119                       <field name="user_id"/>
120                       <field name="date_prefered"/>
121                       <field name="date_scheduled" attrs="{'readonly':[('date_prefered','!=','fixed')]}" />
122                       <field name="company_id" widget='selection' groups="base.group_multi_company"/>
123                       <button name="%(action_create_payment_order)d" string="Select Invoices to Pay"
124                           type="action" attrs="{'invisible':[('state','=','done')]}" icon="gtk-find"/>
125                     </group>
126                     <field name="line_ids" context="{'order_id': active_id or False}" >
127                         <form string="Payment Line" version="7.0">
128                             <notebook>
129                                 <page string="Payment">
130                                     <group col="4">
131                                         <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)] "/>
132                                         <separator colspan="4" string="Transaction Information"/>
133                                         <field name="date"/>
134                                         <label for="amount_currency"/>
135                                         <div>
136                                             <field name="amount_currency" on_change="onchange_amount(amount_currency,currency,company_currency)" class="oe_inline"/>
137                                             <field name="currency" nolabel="1" class="oe_inline"/>
138                                         </div>
139                                         <field name="partner_id" on_change="onchange_partner(partner_id,parent.mode)"/>
140                                         <field domain="[('partner_id','=',partner_id)]" name="bank_id"/>
141                                         <separator colspan="2" string="Owner Account"/>
142                                         <separator colspan="2" string="Destination Account"/>
143                                         <field colspan="2" name="info_owner" nolabel="1"/>
144                                         <field colspan="2" name="info_partner" nolabel="1"/>
145                                         <field colspan="4" name="communication"/>
146                                         <field colspan="4" name="communication2"/>
147                                         <field name="name"/>
148                                         <field name="state"/>
149                                         <field name="company_id" widget="selection" groups="base.group_multi_company"/>
150                                     </group>
151                                 </page>
152                                 <page string="Information">
153                                     <group col="4" string="General Information">
154                                         <label for="amount"/>
155                                         <div>
156                                             <field name="amount" class="oe_inline"/>
157                                             <field name="company_currency" class="oe_inline"/>
158                                         </div>
159                                         <separator colspan="4" string="Entry Information"/>
160                                         <field name="create_date" readonly="1"/>
161                                         <field name="ml_maturity_date"/>
162                                         <field name="ml_inv_ref"/>
163                                     </group>
164                                 </page>
165                             </notebook>
166                         </form>
167                         <tree string="Payment Line">
168                             <field name="ml_inv_ref" />
169                             <field name="partner_id"/>
170                             <field name="communication"/>
171                             <field name="bank_id" domain="[('partner_id', '=', partner_id)]"/>
172                             <field name="ml_maturity_date"/>
173                             <field name="date"/>
174                             <field name="amount_currency" string="Amount"/>
175                             <field name="currency"/>
176                             <field name="name"/>
177                             <field name="amount" sum="Total in Company Currency" invisible="1"/>
178                         </tree>
179                     </field>
180                     <field name="date_created"/>
181                     <field name="date_done"/>
182                     </sheet>
183                 </form>
184             </field>
185         </record>
186
187         <record id="view_payment_order_tree" model="ir.ui.view">
188             <field name="name">payment.order.tree</field>
189             <field name="model">payment.order</field>
190             <field name="type">tree</field>
191             <field eval="4" name="priority"/>
192             <field name="arch" type="xml">
193                 <tree colors="blue:state == 'draft';gray:state in ('cancel','done');black:state == 'open'" string="Payment order">
194                     <field name="reference"/>
195                     <field name="mode"/>
196                     <field name="user_id"/>
197                     <field name="company_id" groups="base.group_multi_company"/>
198                     <field name="date_created"/>
199                     <field name="date_done"/>
200                     <field name="total"/>
201                     <field name="state"/>
202                 </tree>
203             </field>
204         </record>
205
206         <record id="view_payment_order_search" model="ir.ui.view">
207             <field name="name">payment.order.tree.search</field>
208             <field name="model">payment.order</field>
209             <field name="type">search</field>
210             <field name="arch" type="xml">
211                 <search string="Search Payment Orders">
212                     <group>
213                         <field name="reference"
214                             string="Payment Order"/>
215                         <separator orientation="vertical"/>
216                         <field name="date_done"/>
217                         <separator orientation="vertical"/>
218                         <filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
219                         <filter string="Confirmed" domain="[('state','=','open')]" icon="terp-camera_test"/>
220                         <filter string="Done" domain="[('state','=','done')]" icon="terp-dialog-close"/>
221                         <separator orientation="vertical"/>
222                         <field name="mode" widget='selection'/>
223                         <field name="state"/>
224                     </group>
225                     <newline/>
226                     <group expand="0" string="Group By...">
227                         <filter string="Payment Mode" context="{'group_by': 'mode'}" icon="terp-dolar"/>
228                         <filter string="Status" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
229                     </group>
230                 </search>
231             </field>
232         </record>
233
234         <record id="action_payment_order_tree" model="ir.actions.act_window">
235             <field name="name">Payment Orders</field>
236             <field name="res_model">payment.order</field>
237             <field name="view_type">form</field>
238             <field name="view_mode">tree,form</field>
239             <field name="search_view_id" ref="view_payment_order_search"/>
240             <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>
241         </record>
242
243         <menuitem action="action_payment_order_tree" id="menu_action_payment_order_form" parent="menu_main_payment" sequence="3"/>
244
245         <record id="action_payment_order_tree_new" model="ir.actions.act_window">
246             <field name="name">New Payment Order</field>
247             <field name="res_model">payment.order</field>
248             <field name="view_type">form</field>
249             <field name="view_mode">form,tree</field>
250         </record>
251
252         <record id="view_payment_line_form" model="ir.ui.view">
253             <field name="name">Payment Line</field>
254             <field name="model">payment.line</field>
255             <field name="type">form</field>
256             <field name="arch" type="xml">
257                 <form string="Payment Line" version="7.0">
258                     <notebook>
259                         <page string="Payment">
260                             <group col="4">
261                                 <field name="order_id"/>
262                                 <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)]"/>
263                                 <separator colspan="4" string="Transaction Information"/>
264                                 <field name="date"/>
265                                 <label for="amount_currency"/>
266                                 <div>
267                                     <field name="amount_currency" on_change="onchange_amount(amount_currency,currency,company_currency)" class="oe_inline"/>
268                                     <field name="currency" class="oe_inline"/>
269                                 </div>
270                                 <field name="partner_id" on_change="onchange_partner(partner_id, False)"/>
271                                 <field domain="[('partner_id','=',partner_id)]" name="bank_id"/>
272                                 <separator colspan="2" string="Owner Account"/>
273                                 <separator colspan="2" string="Desitination Account"/>
274                                 <field colspan="2" name="info_owner" nolabel="1"/>
275                                 <field colspan="2" name="info_partner" nolabel="1"/>
276
277                                 <field colspan="4" name="communication"/>
278                                 <field colspan="4" name="communication2"/>
279                                 <field name="name"/>
280                                 <field name="state"/>
281                             </group>
282                         </page>
283                         <page string="Information">
284                             <group col="4" string="General Information">
285                                 <field name="amount"/>
286                                 <field name="company_currency" nolabel="1"/>
287                             </group>
288                             <group col="4" string="Entry Information">
289                                 <field name="create_date"/>
290                                 <field name="ml_maturity_date"/>
291                                 <field name="ml_inv_ref"/>
292                             </group>
293                         </page>
294                     </notebook>
295                 </form>
296             </field>
297         </record>
298         <record id="view_payment_line_tree" model="ir.ui.view">
299             <field name="name">Payment Lines</field>
300             <field name="model">payment.line</field>
301             <field name="type">tree</field>
302             <field eval="4" name="priority"/>
303             <field name="arch" type="xml">
304                 <tree string="Payment Line">
305                     <field name="order_id"/>
306                     <field name="ml_inv_ref" />
307                     <field name="ml_maturity_date"/>
308                     <field name="partner_id"/>
309                     <field name="communication"/>
310                     <field name="amount" sum="Amount Total"/>
311                     <field name="amount_currency" sum="Currency Amount Total"/>
312                     <field name="currency"/>
313                     <field name="bank_id" domain="[('partner_id', '=', partner_id)]"/>
314                     <field name="move_line_id" on_change="onchange_move_line(move_line_id,parent.mode)"/>
315                     <field name="create_date"/>
316                     <field name="name"/>
317                 </tree>
318             </field>
319         </record>
320         <record id="action_payment_line_form" model="ir.actions.act_window">
321             <field name="name">Payment Line</field>
322             <field name="res_model">payment.line</field>
323             <field name="view_type">tree</field>
324             <field name="view_mode">form,tree</field>
325         </record>
326
327         <record id="view_bank_statement_form" model="ir.ui.view">
328             <field name="name">account.bank.statement.form.inherit</field>
329             <field name="model">account.bank.statement</field>
330             <field name="type">form</field>
331             <field name="inherit_id" ref="account.view_bank_statement_form"/>
332             <field name="arch" type="xml">
333                 <field name="journal_id" position="after">
334                     <button name="%(action_account_populate_statement_confirm)d" attrs="{'invisible':[('state','=','confirm')]}" string="Import payment lines" type="action" icon="gtk-execute"/>
335                 </field>
336             </field>
337         </record>
338
339     </data>
340 </openerp>