[IMP] hr_recruitment, project: better access rules for categories
[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="inherit_id" ref="account.view_move_line_form"/>
10             <field name="arch" type="xml">
11                 <field name="reconcile_partial_id" position="after">
12                     <field name="amount_to_pay"/>
13                 </field>
14             </field>
15         </record>
16
17         <record model="ir.ui.view" id="view_move_line_tree_wiz">
18             <field name="name">account.move.line.tree</field>
19             <field name="model">account.move.line</field>
20             <field name="priority" eval="1"/>
21             <field name="arch" type="xml">
22                 <tree string="Account Entry Line">
23                     <field name="partner_id"/>
24                     <field name="ref"/>
25                     <field name="name"/>
26                     <field name="journal_id"/>
27                     <field name="account_id"/>
28                     <field name="date_maturity"/>
29                     <field name="date"/>
30                     <field name="debit" sum="Total debit"/>
31                     <field name="credit" sum="Total credit"/>
32                     <field name="amount_to_pay"/>
33                     <field name="amount_currency"/>
34                     <field name="currency_id"/>
35                     <field name="period_id" invisible="1"/>
36                 </tree>
37             </field>
38         </record>
39
40         <menuitem id="menu_main_payment" name="Payment" parent="account.menu_finance" sequence="7"/>
41
42         <record id="view_payment_mode_search" model="ir.ui.view">
43             <field name="name">payment.mode.search</field>
44             <field name="model">payment.mode</field>
45             <field name="arch" type="xml">
46                 <search string="Payment Mode">
47                     <field name="name" string="Payment Mode"/>
48                     <field name="journal"/>
49                     <field name="company_id" groups="base.group_multi_company"/>
50                     <group expand="0" string="Group By...">
51                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal'}"/>
52                     </group>
53                 </search>
54             </field>
55         </record>
56
57         <record id="view_payment_mode_tree" model="ir.ui.view">
58             <field name="name">payment.mode.tree</field>
59             <field name="model">payment.mode</field>
60             <field name="arch" type="xml">
61                 <tree string="Payment Mode">
62                     <field name="name"/>
63                     <field name="journal"/>
64                     <field name="company_id" groups="base.group_multi_company"/>
65                 </tree>
66             </field>
67         </record>
68
69         <record id="view_payment_mode_form" model="ir.ui.view">
70             <field name="name">payment.mode.form</field>
71             <field name="model">payment.mode</field>
72             <field name="arch" type="xml">
73                 <form string="Payment Mode" version="7.0">
74                     <group col="4">
75                         <field name="name"/>
76                         <field name="journal"/>
77                         <field name="bank_id" domain="[('partner_id','=',partner_id)]"  />
78                         <field name="company_id" widget='selection' groups="base.group_multi_company" on_change="onchange_company_id(company_id)"/>
79                         <field name="partner_id" widget='selection' invisible="1"/>
80                     </group>
81                 </form>
82             </field>
83         </record>
84         <record id="action_payment_mode_form" model="ir.actions.act_window">
85             <field name="name">Payment Mode</field>
86             <field name="res_model">payment.mode</field>
87             <field name="view_type">form</field>
88             <field name="view_mode">tree,form</field>
89             <field name="search_view_id" ref="view_payment_mode_search"/>
90         </record>
91
92         <menuitem action="action_payment_mode_form" id="menu_action_payment_mode_form" parent="account.menu_configuration_misc" groups="base.group_no_one"/>
93
94         <record id="view_payment_order_form" model="ir.ui.view">
95             <field name="name">payment.order.form</field>
96             <field name="model">payment.order</field>
97             <field name="arch" type="xml">
98                 <form string="Payment Order" version="7.0">
99                 <header>
100                     <button name="open" states="draft" string="Confirm Payments" class="oe_highlight"/>
101                     <button name="set_done" states="open" string="Make Payments" type="object" class="oe_highlight"/>
102                     <button name="set_to_draft" states="cancel" string="Set to draft" type="object"/>
103                     <button name="cancel" states="draft,open" string="Cancel"/>
104                     <field name="state" widget="statusbar" statusbar_visible="draft,open"/>
105                 </header>
106                 <sheet string="Payment order">
107                     <div class="oe_button_box">
108                         <button name="%(action_create_payment_order)d" string="Select Invoices to Pay"
109                                type="action" attrs="{'invisible':[('state','=','done')]}" icon="gtk-find"/>
110                     </div>
111                     <div class="oe_title">
112                         <label for="reference" class="oe_edit_only"/>
113                         <h1><field name="reference"/></h1>
114                     </div>
115                     <group>
116                         <group>
117                             <field name="user_id"/>
118                             <field name="mode"/>
119                         </group>
120                         <group>
121                             <field name="date_prefered"/>
122                             <field name="date_scheduled" attrs="{'readonly':[('date_prefered','!=','fixed')]}"/>
123                             <field name="company_id" widget='selection' groups="base.group_multi_company"/>
124                         </group>
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                     </sheet>
181                 </form>
182             </field>
183         </record>
184
185         <record id="view_payment_order_tree" model="ir.ui.view">
186             <field name="name">payment.order.tree</field>
187             <field name="model">payment.order</field>
188             <field eval="4" name="priority"/>
189             <field name="arch" type="xml">
190                 <tree colors="blue:state == 'draft';gray:state in ('cancel','done');black:state == 'open'" string="Payment order">
191                     <field name="reference"/>
192                     <field name="mode"/>
193                     <field name="user_id"/>
194                     <field name="company_id" groups="base.group_multi_company"/>
195                     <field name="date_created"/>
196                     <field name="date_done"/>
197                     <field name="total"/>
198                     <field name="state"/>
199                 </tree>
200             </field>
201         </record>
202
203         <record id="view_payment_order_search" model="ir.ui.view">
204             <field name="name">payment.order.tree.search</field>
205             <field name="model">payment.order</field>
206             <field name="arch" type="xml">
207                 <search string="Search Payment Orders">
208                     <field name="reference" string="Payment Order"/>
209                     <field name="date_done"/>
210                     <filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
211                     <filter string="Confirmed" domain="[('state','=','open')]" icon="terp-camera_test"/>
212                     <filter string="Done" domain="[('state','=','done')]" icon="terp-dialog-close"/>
213                     <field name="mode"/>
214                     <field name="state"/>
215                     <group expand="0" string="Group By...">
216                         <filter string="Payment Mode" context="{'group_by': 'mode'}" icon="terp-dolar"/>
217                         <filter string="Status" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
218                     </group>
219                 </search>
220             </field>
221         </record>
222
223         <record id="action_payment_order_tree" model="ir.actions.act_window">
224             <field name="name">Payment Orders</field>
225             <field name="res_model">payment.order</field>
226             <field name="view_type">form</field>
227             <field name="view_mode">tree,form</field>
228             <field name="search_view_id" ref="view_payment_order_search"/>
229             <field name="help" type="html">
230               <p class="oe_view_nocontent_create">
231                 Click to create a payment order.
232               </p><p>
233                 A payment order is a payment request from your company to pay a
234                 supplier invoice or a customer refund.
235               </p>
236             </field>
237         </record>
238
239         <menuitem action="action_payment_order_tree" id="menu_action_payment_order_form" parent="menu_main_payment" sequence="3"/>
240
241         <record id="action_payment_order_tree_new" model="ir.actions.act_window">
242             <field name="name">New Payment Order</field>
243             <field name="res_model">payment.order</field>
244             <field name="view_type">form</field>
245             <field name="view_mode">form,tree</field>
246         </record>
247
248         <record id="view_payment_line_form" model="ir.ui.view">
249             <field name="name">Payment Line</field>
250             <field name="model">payment.line</field>
251             <field name="arch" type="xml">
252                 <form string="Payment Line" version="7.0">
253                     <notebook>
254                         <page string="Payment">
255                             <group col="4">
256                                 <field name="order_id"/>
257                                 <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)]"/>
258                                 <separator colspan="4" string="Transaction Information"/>
259                                 <field name="date"/>
260                                 <label for="amount_currency"/>
261                                 <div>
262                                     <field name="amount_currency" on_change="onchange_amount(amount_currency,currency,company_currency)" class="oe_inline"/>
263                                     <field name="currency" class="oe_inline"/>
264                                 </div>
265                                 <field name="partner_id" on_change="onchange_partner(partner_id, False)"/>
266                                 <field domain="[('partner_id','=',partner_id)]" name="bank_id"/>
267                                 <separator colspan="2" string="Owner Account"/>
268                                 <separator colspan="2" string="Desitination Account"/>
269                                 <field colspan="2" name="info_owner" nolabel="1"/>
270                                 <field colspan="2" name="info_partner" nolabel="1"/>
271
272                                 <field colspan="4" name="communication"/>
273                                 <field colspan="4" name="communication2"/>
274                                 <field name="name"/>
275                                 <field name="state"/>
276                             </group>
277                         </page>
278                         <page string="Information">
279                             <group col="4" string="General Information">
280                                 <field name="amount"/>
281                                 <field name="company_currency" nolabel="1"/>
282                             </group>
283                             <group col="4" string="Entry Information">
284                                 <field name="create_date"/>
285                                 <field name="ml_maturity_date"/>
286                                 <field name="ml_inv_ref"/>
287                             </group>
288                         </page>
289                     </notebook>
290                 </form>
291             </field>
292         </record>
293         <record id="view_payment_line_tree" model="ir.ui.view">
294             <field name="name">Payment Lines</field>
295             <field name="model">payment.line</field>
296             <field eval="4" name="priority"/>
297             <field name="arch" type="xml">
298                 <tree string="Payment Line">
299                     <field name="order_id"/>
300                     <field name="ml_inv_ref" />
301                     <field name="ml_maturity_date"/>
302                     <field name="partner_id"/>
303                     <field name="communication"/>
304                     <field name="amount" sum="Amount Total"/>
305                     <field name="amount_currency" sum="Currency Amount Total"/>
306                     <field name="currency"/>
307                     <field name="bank_id" domain="[('partner_id', '=', partner_id)]"/>
308                     <field name="move_line_id" on_change="onchange_move_line(move_line_id,parent.mode)"/>
309                     <field name="create_date"/>
310                     <field name="name"/>
311                 </tree>
312             </field>
313         </record>
314         <record id="action_payment_line_form" model="ir.actions.act_window">
315             <field name="name">Payment Line</field>
316             <field name="res_model">payment.line</field>
317             <field name="view_type">tree</field>
318             <field name="view_mode">form,tree</field>
319         </record>
320
321         <record id="view_bank_statement_form" model="ir.ui.view">
322             <field name="name">account.bank.statement.form.inherit</field>
323             <field name="model">account.bank.statement</field>
324             <field name="inherit_id" ref="account.view_bank_statement_form"/>
325             <field name="arch" type="xml">
326                     <xpath expr="//div[@name='import_buttons']" position="inside">
327                         <button name="%(action_account_populate_statement_confirm)d" attrs="{'invisible':[('state','=','confirm')]}" string="Import Payment Lines" type="action" icon="gtk-execute"/>
328                     </xpath>
329             </field>
330         </record>
331
332     </data>
333 </openerp>