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