[IMP] account: add a sequence to account journals to allow reordering. This is used...
[odoo/odoo.git] / addons / account / account_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <!-- Fiscal Year -->
6         <record id="view_account_fiscalyear_form" model="ir.ui.view">
7             <field name="name">account.fiscalyear.form</field>
8             <field name="model">account.fiscalyear</field>
9             <field name="arch" type="xml">
10                 <form string="Fiscal year">
11                 <header>
12                     <button name="create_period" states="draft" string="Create Monthly Periods" type="object" class="oe_highlight"/>
13                     <button name="create_period3" states="draft" string="Create 3 Months Periods" type="object" class="oe_highlight"/>
14                     <field name="state" widget="statusbar" nolabel="1" />
15                 </header>
16                     <group>
17                         <group>
18                             <field name="name"/>
19                             <field name="code"/>
20                             <field name="company_id" groups="base.group_multi_company"/>
21                             <field name="end_journal_period_id"/>
22                         </group>
23                         <group>
24                             <field name="date_start"/>
25                             <field name="date_stop"/>
26                         </group>
27                     </group>
28                     <field colspan="4" name="period_ids" nolabel="1" widget="one2many_list">
29                         <form string="Period">
30                             <group col="4">
31                                 <field name="name"/>
32                                 <field name="code"/>
33                                 <field name="date_start"/>
34                                 <field name="date_stop"/>
35                                 <field name="special"/>
36                                 <field name="state" invisible="1"/>
37                             </group>
38                         </form>
39                     </field>
40                 </form>
41             </field>
42         </record>
43         <record id="view_account_fiscalyear_tree" model="ir.ui.view">
44             <field name="name">account.fiscalyear.tree</field>
45             <field name="model">account.fiscalyear</field>
46             <field name="arch" type="xml">
47                 <tree colors="blue:state == 'draft';gray:state == 'done' " string="Fiscalyear">
48                     <field name="code"/>
49                     <field name="name"/>
50                     <field name="company_id" groups="base.group_multi_company"/>
51                     <field name="state"/>
52                 </tree>
53             </field>
54         </record>
55         <record id="view_account_fiscalyear_search" model="ir.ui.view">
56             <field name="name">account.fiscalyear.search</field>
57             <field name="model">account.fiscalyear</field>
58             <field name="arch" type="xml">
59                 <search string="Search Fiscalyear">
60                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Fiscal Year"/>
61                     <filter string="Open" domain="[('state','=','draft')]" icon="terp-camera_test"/>
62                     <filter string="Closed" domain="[('state','=','done')]" icon="terp-dialog-close"/>
63                     <field name="state"/>
64                     <group expand="0" string="Group By">
65                         <filter string="Status" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
66                     </group>
67                 </search>
68             </field>
69         </record>
70         <record id="action_account_fiscalyear" model="ir.actions.act_window">
71             <field name="name">Fiscal Years</field>
72             <field name="res_model">account.fiscalyear</field>
73             <field name="view_type">form</field>
74             <field name="view_mode">tree,form</field>
75             <field name="help" type="html">
76               <p class="oe_view_nocontent_create">
77                 Click to start a new fiscal year.
78               </p><p>
79                 Define your company's financial year according to your needs. A
80                 financial year is a period at the end of which a company's
81                 accounts are made up (usually 12 months). The financial year is
82                 usually referred to by the date in which it ends. For example,
83                 if a company's financial year ends November 30, 2011, then
84                 everything between December 1, 2010 and November 30, 2011
85                 would be referred to as FY 2011.
86               </p>
87             </field>
88         </record>
89         <menuitem id="next_id_23" name="Periods" parent="account.menu_finance_configuration" sequence="1" />
90         <menuitem id="menu_action_account_fiscalyear" action="action_account_fiscalyear" parent="next_id_23"/>
91
92         <!-- Period -->
93         <record id="view_account_period_form" model="ir.ui.view">
94             <field name="name">account.period.form</field>
95             <field name="model">account.period</field>
96             <field name="arch" type="xml">
97                 <form string="Account Period">
98                     <header>
99                         <button string="Close Period" name="%(account.action_account_period_close)d" type="action" class="oe_highlight" states="draft"/>
100                         <button name="action_draft" states="done" string="Re-Open Period" type="object" groups="account.group_account_manager"/>
101                         <field name="state" widget="statusbar" nolabel="1"/>
102                     </header>
103                     <group>
104                         <group>
105                             <field name="name"/>
106                             <field name="fiscalyear_id" widget="selection"/>
107                             <label for="date_start" string="Duration"/>
108                             <div>
109                                 <field name="date_start" class="oe_inline" nolabel="1"/> -
110                                 <field name="date_stop" nolabel="1" class="oe_inline"/>
111                             </div>
112                         </group>
113                         <group>
114                             <field name="code"/>
115                             <field name="special"/>
116                             <field name="company_id" widget="selection" groups="base.group_multi_company"/>
117                         </group>
118                     </group>
119                 </form>
120             </field>
121         </record>
122         <record id="view_account_period_tree" model="ir.ui.view">
123             <field name="name">account.period.tree</field>
124             <field name="model">account.period</field>
125             <field name="arch" type="xml">
126               <tree colors="blue:state == 'draft';gray:state == 'done' " string="Period">
127                     <field name="name"/>
128                     <field name="code"/>
129                     <field name="date_start"/>
130                     <field name="date_stop"/>
131                     <field name="special"/>
132                     <field name="company_id" groups="base.group_multi_company"/>
133                     <field name="state"/>
134                 </tree>
135             </field>
136         </record>
137         <record id="view_account_period_search" model="ir.ui.view">
138             <field name="name">account.period.search</field>
139             <field name="model">account.period</field>
140             <field name="arch" type="xml">
141                 <search string="Search Period">
142                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Period"/>
143                     <filter string="To Close" name="draft" domain="[('state','=','draft')]" icon="terp-dialog-close"/>
144                 </search>
145             </field>
146         </record>
147         <record id="action_account_period" model="ir.actions.act_window">
148             <field name="name">Periods</field>
149             <field name="res_model">account.period</field>
150             <field name="view_type">form</field>
151             <field name="view_mode">tree,form</field>
152             <field name="context">{'search_default_draft': 1}</field>
153             <field name="help" type="html">
154               <p class="oe_view_nocontent_create">
155                 Click to add a fiscal period.
156               </p><p>
157                 An accounting period typically is a month or a quarter. It
158                 usually corresponds to the periods of the tax declaration.
159               </p>
160             </field>
161         </record>
162         <menuitem id="menu_action_account_period" action="action_account_period" parent="account.next_id_23"/>
163
164         <!-- Accounts -->
165         <record id="view_account_form" model="ir.ui.view">
166             <field name="name">account.account.form</field>
167             <field name="model">account.account</field>
168             <field name="arch" type="xml">
169                 <form string="Account">
170                     <label for="code" class="oe_edit_only" string="Account Code and Name"/>
171                     <h1>
172                         <field name="code" class="oe_inline" placeholder="Account code" style="width: 6em"/> -
173                         <field name="name" class="oe_inline" placeholder="Account name"/>
174                     </h1>
175                     <group>
176                         <group>
177                             <field name="parent_id"/>
178                             <field name="type"/>
179                             <field name="user_type"/>
180                             <field name="active"/>
181                             <field name="company_id" widget="selection" groups="base.group_multi_company"/>
182                         </group>
183                         <group>
184                             <field name="debit" attrs="{'readonly':[('type','=','view')]}"/>
185                             <field name="credit" attrs="{'readonly':[('type','=','view')]}"/>
186                             <field name="balance"/>
187                         </group>
188                         <group>
189                             <field name="tax_ids" domain="[('parent_id','=',False)]" widget="many2many_tags"/>
190                             <field name="reconcile"/>
191                             <field name="child_consol_ids"
192                                 attrs="{'invisible':[('type','!=','consolidation')]}"
193                                 widget="many2many_tags"/>
194                         </group>
195                         <group groups="base.group_multi_currency">
196                             <field name="currency_id"/>
197                             <field name="currency_mode" attrs="{'readonly': [('currency_id','=',False)]}"/>
198                         </group>
199                     </group>
200                     <label for="note"/>
201                     <field name="note"/>
202                 </form>
203             </field>
204         </record>
205         <record id="view_account_list" model="ir.ui.view">
206             <field name="name">account.account.list</field>
207             <field name="model">account.account</field>
208             <field name="field_parent">child_id</field>
209             <field name="arch" type="xml">
210                 <tree colors="blue:type == 'view';black:type in ('other','receivable','payable','consolidation');gray:type == 'closed'" string="Chart of accounts" toolbar="1" >
211                     <field name="code"/>
212                     <field name="name"/>
213                     <field name="parent_id" invisible="1"/>
214                     <field name="user_type" invisible="1"/>
215                     <field name="debit"/>
216                     <field name="credit"/>
217                     <field name="balance"/>
218                     <field name="type"/>
219                     <field name="company_id" groups="base.group_multi_company"/>
220                     <field name="company_currency_id"/>
221                 </tree>
222             </field>
223         </record>
224         <record id="view_account_search" model="ir.ui.view">
225             <field name="name">account.account.search</field>
226             <field name="model">account.account</field>
227             <field name="arch" type="xml">
228                 <search string="Accounts">
229                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Account"/>
230                     <filter icon="terp-sale" string="Receivable Accounts" domain="[('type','=','receivable')]"/>
231                     <filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
232                     <field name="user_type"/>
233                     <group expand="0" string="Group By">
234                         <filter string="Parent Account" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
235                         <filter string="Account Type" icon="terp-stock_symbol-selection" domain="" context="{'group_by':'user_type'}"/>
236                         <filter string="Internal Type" icon="terp-stock_symbol-selection" domain="" context="{'group_by':'type'}"/>
237                     </group>
238                 </search>
239             </field>
240         </record>
241         <record id="action_account_form" model="ir.actions.act_window">
242             <field name="name">Accounts</field>
243             <field name="res_model">account.account</field>
244             <field name="view_type">form</field>
245             <field name="view_mode">tree,form,graph</field>
246             <field name="search_view_id" ref="view_account_search"/>
247             <field name="view_id" ref="view_account_list"/>
248             <field name="help" type="html">
249               <p class="oe_view_nocontent_create">
250                 Click to add an account.
251               </p><p>
252                 An account is part of a ledger allowing your company
253                 to register all kinds of debit and credit transactions.
254                 Companies present their annual accounts in two main parts: the
255                 balance sheet and the income statement (profit and loss
256                 account). The annual accounts of a company are required by law
257                 to disclose a certain amount of information.
258               </p>
259             </field>
260         </record>
261         <menuitem id="account_account_menu" name="Accounts" parent="account.menu_finance_configuration" sequence="2"/>
262         <menuitem action="action_account_form" id="menu_action_account_form" parent="account_account_menu" sequence="1"/>
263
264         <act_window
265             id="act_account_acount_move_line_open_unreconciled"
266             name="Unreconciled Entries"
267             res_model="account.move.line"
268             context="{'search_default_account_id':[active_id], 'search_default_unreconciled':1, 'default_account_id': active_id}"
269             src_model="account.account"/>
270
271         <record id="view_account_tree" model="ir.ui.view">
272             <field name="name">account.account.tree</field>
273             <field name="model">account.account</field>
274             <field name="field_parent">child_id</field>
275             <field name="arch" type="xml">
276                 <tree colors="blue:type == 'view';black:type in ('other','receivable','payable','consolidation');gray:type == 'closed'" string="Chart of accounts" toolbar="1" >
277                     <field name="code"/>
278                     <field name="name"/>
279                     <field name="debit"/>
280                     <field name="credit"/>
281                     <field name="balance"/>
282                     <field name="company_currency_id"/>
283                     <field name="company_id" groups="base.group_multi_company"/>
284                     <field name="type"/>
285                     <field name="parent_id" invisible="1"/>
286                 </tree>
287             </field>
288         </record>
289         <record id="action_account_tree" model="ir.actions.act_window">
290             <field name="name">Chart of Accounts</field>
291             <field name="res_model">account.account</field>
292             <field name="view_type">tree</field>
293             <field name="view_id" ref="view_account_tree"/>
294             <field name="domain">[('parent_id','=',False)]</field>
295         </record>
296         <record id="view_account_gain_loss_tree" model="ir.ui.view">
297            <field name="name">Unrealized Gain or Loss</field>
298             <field name="model">account.account</field>
299             <field name="arch" type="xml">
300                 <tree string="Unrealized Gains and losses" create="false">
301                     <field name="code"/>
302                     <field name="name"/>
303                     <field name="parent_id" invisible="1"/>
304                     <field name="user_type" invisible="1"/>
305                     <field name="type" invisible="1"/>
306                     <field name="currency_id"/>
307                     <field name="exchange_rate"/>
308                     <field name="foreign_balance"/>
309                     <field name="adjusted_balance"/>
310                     <field name="balance"/>
311                     <field name="unrealized_gain_loss"/>
312                 </tree>
313             </field>
314         </record>
315         <record id="action_account_gain_loss" model="ir.actions.act_window">
316             <field name="name">Unrealized Gain or Loss</field>
317             <field name="res_model">account.account</field>
318             <field name="view_type">form</field>
319             <field name="view_mode">tree</field>
320             <field name="view_id" ref="view_account_gain_loss_tree"/>
321             <field name="domain">[('currency_id','!=',False)]</field>
322             <field name="help" type="html">
323               <p class="oe_view_nocontent_create">
324                 Click to add an account.
325               </p><p>
326                 When doing multi-currency transactions, you may loose or gain
327                 some amount due to changes of exchange rate. This menu gives
328                 you a forecast of the Gain or Loss you'd realized if those
329                 transactions were ended today. Only for accounts having a
330                 secondary currency set.
331               </p>
332             </field>
333         </record>
334         <menuitem
335             name="Unrealized Gain or Loss"
336             action="action_account_gain_loss"
337             groups="account.group_account_user"
338             id="menu_unrealized_gains_losses"
339             parent="account.menu_multi_currency"/>
340
341         <act_window
342             id="action_move_line_select"
343             name="Journal Items"
344             context="{'search_default_account_id': [active_id]}"
345             res_model="account.move.line"
346             src_model="account.account"/>
347
348         <!-- Enable drill-down from Chart Of Accounts tree view -->
349         <act_window
350             id="action_account_items"
351             name="Journal Items"
352             context="{'search_default_account_id': [active_id], 'fiscalyear': context.get('fiscalyear')}"
353             res_model="account.move.line"
354             src_model="account.account"
355             key2="tree_but_open"/>
356
357         <!-- Account Journal -->
358         <record id="view_account_journal_tree" model="ir.ui.view">
359             <field name="name">account.journal.tree</field>
360             <field name="model">account.journal</field>
361             <field name="arch" type="xml">
362                 <tree string="Account Journal">
363                     <field name='sequence' widget='handle'/>
364                     <field name="code"/>
365                     <field name="name"/>
366                     <field name="type"/>
367                     <field name="user_id"/>
368                     <field name="company_id" groups="base.group_multi_company"/>
369                 </tree>
370             </field>
371         </record>
372         <record id="view_account_journal_search" model="ir.ui.view">
373             <field name="name">account.journal.search</field>
374             <field name="model">account.journal</field>
375             <field name="arch" type="xml">
376                 <search string="Search Account Journal">
377                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Journal"/>
378                     <filter domain="['|', ('type', '=', 'sale'), ('type', '=', 'sale_refund')]" string="Sale" icon="terp-camera_test"/>
379                     <filter domain="['|', ('type', '=', 'purchase'), ('type', '=', 'purchase_refund')]" string="Purchase" icon="terp-purchase"/>
380                     <filter domain="['|', ('type', '=', 'cash'), ('type', '=', 'bank')]" string="Liquidity" icon="terp-dolar"/>
381                     <filter domain="['|', ('type', '=', 'general'), ('type', '=', 'situation')]" string="Others" icon="terp-stock"/>
382                     <field name="user_id"/>
383                     <group expand="0" string="Group By">
384                         <filter string="User" context="{'group_by':'user_id'}" icon="terp-personal"/>
385                         <filter string="Type" context="{'group_by':'type'}" icon="terp-stock_symbol-selection"/>
386                         <filter string="Company" context="{'group_by':'company_id'}" icon="terp-go-home" groups="base.group_multi_company"/>
387                     </group>
388                 </search>
389             </field>
390         </record>
391         <record id="view_account_journal_form" model="ir.ui.view">
392             <field name="name">account.journal.form</field>
393             <field name="model">account.journal</field>
394             <field name="arch" type="xml">
395                 <form string="Account Journal">
396                     <div class="oe_title">
397                         <label for="name" class="oe_edit_only"/>
398                         <h1><field name="name"/></h1>
399                     </div>
400                     <group>
401                         <group>
402                             <field name="code"/>
403                             <field name="type"/>
404                         </group>
405                         <group>
406                             <field name="default_debit_account_id" attrs="{'required':[('type','in', ('cash', 'bank'))]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
407                             <field name="default_credit_account_id" attrs="{'required':[('type','in',('cash', 'bank'))]}" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
408                             <field name="currency" groups="base.group_multi_currency"/>
409                             <field name="company_id" groups="base.group_multi_company"/>
410                         </group>
411                     </group>
412                     <notebook>
413                         <page string="Advanced Settings">
414                             <group>
415                                 <group>
416                                     <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_user']}"/>
417                                     <field name="sequence_id" required="0"/>
418                                 </group>
419                                 <group>
420                                     <field name="centralisation"/>
421                                     <field name="entry_posted"/>
422                                     <field name="allow_date"/>
423                                     <field name="group_invoice_lines"/>
424                                 </group>
425                             </group>
426                         </page>
427                         <page string="Entry Controls">
428                             <separator colspan="4" string="Accounts Type Allowed (empty for no control)"/>
429                             <field colspan="4" name="type_control_ids" nolabel="1"/>
430                             <separator colspan="4" string="Accounts Allowed (empty for no control)"/>
431                             <field colspan="4" name="account_control_ids" nolabel="1"/>
432                         </page>
433                         <page string="Cash Registers">
434                             <group>
435                                 <group string="Accounts">
436                                     <field name="profit_account_id" domain="[('type','!=','view')]"/>
437                                     <field name="loss_account_id" domain="[('type','!=','view')]"/>
438                                     <field name="internal_account_id" domain="[('type','!=','view')]"/>
439                                 </group>
440                                 <group string="Miscellaneous">
441                                     <field name="with_last_closing_balance" attrs="{'invisible': [('type', 'not in', ['bank', 'cash'])]}"/>
442                                     <field name="cash_control" attrs="{'invisible':[('type','not in', ('cash',))]}"/>
443                                 </group>
444                             </group>
445                             <separator string="Available Coins" colspan="4" attrs="{'invisible' : ['|',('cash_control', '=', False),('type','not in', ('cash',))] }"/>
446                             <field name="cashbox_line_ids" nolabel="1" string="Unit Of Currency Definition" colspan="4" attrs="{'invisible' : ['|',('cash_control', '=', False),('type','not in', ('cash',))]}">
447                                 <tree string="CashBox Lines" editable="bottom">
448                                     <field name="pieces" />
449                                 </tree>
450                             </field>
451                         </page>
452                     </notebook>
453                 </form>
454             </field>
455         </record>
456         <record id="action_account_journal_form" model="ir.actions.act_window">
457             <field name="name">Journals</field>
458             <field name="res_model">account.journal</field>
459             <field name="view_type">form</field>
460             <field name="view_mode">tree,form</field>
461             <field name="help" type="html">
462               <p class="oe_view_nocontent_create">
463                 Click to add a journal.
464               </p><p>
465                 A journal is used to record transactions of all accounting data
466                 related to the day-to-day business.
467               </p><p>
468                 A typical company may use one journal per payment method (cash,
469                 bank accounts, checks), one purchase journal, one sale journal
470                 and one for miscellaneous information.
471               </p>
472             </field>
473         </record>
474         <menuitem action="action_account_journal_form" id="menu_action_account_journal_form" parent="menu_journals"/>
475
476         <act_window
477            id="act_account_journal_2_account_bank_statement"
478            name="Bank statements"
479            context="{'search_default_journal_id': active_id, 'default_journal_id': active_id}"
480            res_model="account.bank.statement"
481            src_model="account.journal"/>
482
483         <act_window
484            id="act_account_journal_2_account_move_line"
485            name="Journal Items"
486            context="{'search_default_journal_id': active_id, 'default_journal_id': active_id}"
487            res_model="account.move.line"
488            src_model="account.journal"/>
489
490         <!-- Bank statement -->
491         
492         <record id="action_bank_reconcile_bank_statements" model="ir.actions.client">
493             <field name="name">Reconciliation on Bank Statements</field>
494             <field name="tag">bank_statement_reconciliation_view</field>
495             <field name="context">{'statement_ids': [active_id]}</field>
496         </record>
497         
498         <record id="view_account_bank_statement_filter" model="ir.ui.view">
499             <field name="name">account.cash.statement.select</field>
500             <field name="model">account.bank.statement</field>
501             <field name="arch" type="xml">
502                 <search string="Search Bank Statements">
503                     <field name="name" string="Bank Statement"/>
504                     <field name="date"/>
505                     <filter string="Draft" name="state_draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
506                     <filter string="Open" name="state_open" domain="[('state','=','open')]" icon="terp-check"/>
507                     <filter string="Confirmed" name="state_confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
508                     <field name="journal_id" domain="[('type', '=', 'cash')]" />
509                     <group expand="0" string="Group By">
510                         <filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
511                         <filter string="Status" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
512                         <filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
513                     </group>
514                 </search>
515             </field>
516         </record>
517
518         <record id="view_bank_statement_tree" model="ir.ui.view">
519             <field name="name">account.bank.statement.tree</field>
520             <field name="model">account.bank.statement</field>
521             <field name="arch" type="xml">
522                 <tree colors="red:balance_end_real!=balance_end and state=='draft';blue:state=='draft' and (balance_end_real==balance_end);black:state=='confirm'" string="Statement">
523                     <field name="name"/>
524                     <field name="date"/>
525                     <field name="period_id"/>
526                     <field name="journal_id"/>
527                     <field name="balance_start"/>
528                     <field name="balance_end_real"/>
529                     <field name="balance_end" invisible="1"/>
530                     <field name="state"/>
531                 </tree>
532             </field>
533         </record>
534         
535         <record id="view_bank_statement_search" model="ir.ui.view">
536             <field name="name">account.bank.statement.search</field>
537             <field name="model">account.bank.statement</field>
538             <field name="arch" type="xml">
539                 <search string="Search Bank Statements">
540                     <field name="name" string="Bank Statement"/>
541                     <field name="date"/>
542                     <filter string="Draft" domain="[('state','=','draft')]" icon="terp-document-new"/>
543                     <filter string="Confirmed" domain="[('state','=','confirm')]" icon="terp-camera_test"/>
544                     <field name="period_id"/>
545                     <field name="journal_id" domain="[('type', '=', 'bank')]" />
546                     <group expand="0" string="Group By">
547                         <filter string="Journal" context="{'group_by': 'journal_id'}" icon="terp-folder-orange"/>
548                         <filter string="Status" context="{'group_by': 'state'}" icon="terp-stock_effects-object-colorize"/>
549                         <filter string="Period" context="{'group_by': 'period_id'}" icon="terp-go-month"/>
550                     </group>
551                 </search>
552             </field>
553         </record>
554         
555         <record id="view_bank_statement_form" model="ir.ui.view">
556             <field name="name">account.bank.statement.form</field>
557             <field name="model">account.bank.statement</field>
558             <field name="priority">1</field>
559             <field name="arch" type="xml">
560                 <form string="Bank Statement">
561                 <header>
562                     <field name="all_lines_reconciled" invisible="1" />
563                     <span attrs="{'invisible':['|',('all_lines_reconciled','=',True),('line_ids','=',[])]}">
564                         <button name="%(action_bank_reconcile_bank_statements)d" states="draft" string="Reconcile" type="action" class="oe_highlight"/>
565                     </span>
566                     <span attrs="{'invisible':[('all_lines_reconciled','=',False)]}">
567                         <button name="button_confirm_bank" states="draft" string="Close" type="object" class="oe_highlight"/>
568                     </span>
569                     <button name="button_cancel" states="confirm" string="Cancel Statement" type="object"/>
570                     <field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
571                 </header>
572                 <sheet>
573                     <div class="oe_right oe_button_box" name="import_buttons">
574                         <button class="oe_inline oe_stat_button" name="%(action_view_account_statement_from_invoice_lines)d"
575                             string="Import Invoice" type="action"
576                             attrs="{'invisible':[('state','=','confirm')]}" widget="statinfo" icon="fa-pencil-square-o"/>
577                         <button class="oe_inline oe_stat_button" name="button_journal_entries"
578                                 string="Journal Items" type="object"
579                                 attrs="{'invisible':[('move_line_ids','=',[])]}" icon="fa-bars"/>
580                         <field name="move_line_ids" invisible="1"/>
581                     </div>
582                     <label for="name" class="oe_edit_only"/>
583                     <h1><field name="name"/></h1>
584                     <group>
585                         <group>
586                             <field name="journal_id" domain="[('type', '=', 'bank')]" on_change="onchange_journal_id(journal_id)" attrs="{'readonly': [('move_line_ids', '!=', [])]}" widget="selection"/>
587                             <label for="date" string="Date / Period"/>
588                             <div>
589                                 <field name="date" on_change="onchange_date(date, company_id)" class="oe_inline"/>
590                                 <field name="period_id" class="oe_inline"/>
591                             </div>
592                             <field name='company_id' widget="selection" groups="base.group_multi_company" />
593                             <field name="currency" invisible="1"/>
594                         </group><group>
595                             <field name="balance_start" widget="monetary" options='{"currency_field" : "currency"}'/>
596                             <field name="balance_end_real" widget="monetary" options='{"currency_field" : "currency"}'/>
597                         </group>
598                     </group>
599
600                     <notebook>
601                         <page string="Transactions" name="statement_line_ids">
602                             <field name="line_ids" context="{'date':date}">
603                                 <tree editable="bottom" string="Statement lines" colors="grey:journal_entry_id!=False">
604                                     <field name="sequence" readonly="1" invisible="1"/>
605                                     <field name="journal_entry_id" invisible="1"/>
606                                     <field name="date" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
607                                     <field name="name" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
608                                     <field name="ref" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
609                                     <field name="partner_id" domain="[
610                                         '&amp;',
611                                             '|',('parent_id','=',False),('is_company','=',True),
612                                             '|',('customer','=',True),('supplier','=',True)]"
613                                          context="{'default_supplier': 1}"
614                                          attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
615                                     <field name="amount" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
616                                     <field name="amount_currency" groups="base.group_multi_currency" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
617                                     <field name="currency_id" groups="base.group_multi_currency" attrs="{'readonly' : [('journal_entry_id', '!=', False)] }"/>
618                                     <field name="bank_account_id" groups="base.group_no_one"/>
619                                 </tree>
620                             </field>
621                         </page>
622                     </notebook>
623                     <group class="oe_subtotal_footer oe_right" colspan="2" name="sale_total">
624                         <div class="oe_subtotal_footer_separator oe_inline">
625                             <label for="balance_end" />
626                             <button name="button_dummy" states="draft" string="(update)" type="object" class="oe_edit_only oe_link"/>
627                         </div>
628                         <field name="balance_end" nolabel="1" class="oe_subtotal_footer_separator" widget='monetary' options="{'currency_field': 'currency_id'}"/>
629                     </group>
630                     <div class="oe_clear"/>
631                 </sheet>
632                 </form>
633             </field>
634         </record>
635
636         <record id="action_bank_statement_tree" model="ir.actions.act_window">
637             <field name="name">Bank Statements</field>
638             <field name="res_model">account.bank.statement</field>
639             <field name="view_type">form</field>
640             <field name="view_mode">tree,form,graph</field>
641             <field name="domain">[('journal_id.type', '=', 'bank')]</field>
642             <field name="context">{'journal_type':'bank'}</field>
643             <field name="search_view_id" ref="view_bank_statement_search"/>
644             <field name="help" type="html">
645               <p class="oe_view_nocontent_create">
646                 Click to register a bank statement.
647               </p><p>
648                 A bank statement is a summary of all financial transactions
649                 occurring over a given period of time on a bank account. You
650                 should receive this periodicaly from your bank.
651               </p><p>
652                 Odoo allows you to reconcile a statement line directly with
653                 the related sale or puchase invoices.
654               </p>
655             </field>
656         </record>
657         <record model="ir.actions.act_window.view" id="action_bank_statement_tree_bank">
658             <field name="sequence" eval="1"/>
659             <field name="view_mode">tree</field>
660             <field name="view_id" ref="view_bank_statement_tree"/>
661             <field name="act_window_id" ref="action_bank_statement_tree"/>
662         </record>
663         <record model="ir.actions.act_window.view" id="action_bank_statement_form_bank">
664             <field name="sequence" eval="1"/>
665             <field name="view_mode">form</field>
666             <field name="view_id" ref="view_bank_statement_form"/>
667             <field name="act_window_id" ref="action_bank_statement_tree"/>
668         </record>
669
670         <menuitem string="Bank Statements" action="action_bank_statement_tree" id="menu_bank_statement_tree" parent="menu_finance_bank_and_cash" sequence="7"/>
671
672         <record id="action_bank_statement_draft_tree" model="ir.actions.act_window">
673             <field name="name">Draft statements</field>
674             <field name="res_model">account.bank.statement</field>
675             <field name="view_type">form</field>
676             <field name="view_mode">tree,form</field>
677             <field name="domain">[('state','=','draft')]</field>
678             <field name="filter" eval="True"/>
679         </record>
680         
681         <record id="action_bank_reconcile" model="ir.actions.client">
682             <field name="name">Reconciliation on Bank Statements</field>
683             <field name="res_model">account.bank.statement.line</field>
684             <field name="tag">bank_statement_reconciliation_view</field>
685         </record>
686         
687         <!-- because of the needaction badge, groups needs to be specified -->
688         <menuitem id="menu_bank_reconcile_bank_statements" name="Reconcile" parent="account.periodical_processing_bank_statements" groups="group_account_user" action="action_bank_reconcile" sequence="20"/>
689
690         <record id="view_account_statement_operation_template_form" model="ir.ui.view">
691             <field name="name">account.statement.operation.template.form</field>
692             <field name="model">account.statement.operation.template</field>
693             <field name="arch" type="xml">
694                 <form string="Statement Operation Templates">
695                     <sheet>
696                         <div class="oe_title">
697                             <label for="name" class="oe_edit_only"/>
698                             <h1>
699                                 <field name="name"/>
700                             </h1>
701                         </div>
702                         <group>
703                             <group>
704                                 <field name="account_id" domain="[('type', 'not in', ['view', 'closed', 'consolidation'])]"/>
705                                 <field name="amount_type"/>
706                                 <field name="tax_id" domain="[('type_tax_use', 'in', ['purchase', 'all']), ('parent_id', '=', False)]"/>
707                             </group>
708                             <group>
709                                 <field name="label"/>
710                                 <label for="amount"/>
711                                 <div>
712                                     <field name="amount" class="oe_inline" />
713                                     <label string="%" class="oe_inline" attrs="{'invisible':[('amount_type','not in',('percentage_of_total', 'percentage_of_balance'))]}" />
714                                 </div>
715                                 <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
716                             </group>
717                         </group>
718                     </sheet>
719                 </form>
720             </field>
721         </record>
722         <record id="view_account_statement_operation_template_tree" model="ir.ui.view">
723             <field name="name">account.statement.operation.template.tree</field>
724             <field name="model">account.statement.operation.template</field>
725             <field name="arch" type="xml">
726                 <tree string="Bank Reconciliation Move Presets">
727                     <field name="name"/>
728                     <field name="account_id"/>
729                     <field name="amount_type"/>
730                 </tree>
731             </field>
732         </record>
733         <record id="view_account_statement_operation_template_search" model="ir.ui.view">
734             <field name="name">account.statement.operation.template.search</field>
735             <field name="model">account.statement.operation.template</field>
736             <field name="arch" type="xml">
737                 <search string="Bank Reconciliation Move preset">
738                         <filter string="With tax" domain="[('tax_id','!=',False)]"/>
739                         <field name="amount_type"/>
740                 </search>
741             </field>
742         </record>
743         <record id="action_account_statement_operation_template" model="ir.actions.act_window">
744             <field name="name">Statement Operations</field>
745             <field name="res_model">account.statement.operation.template</field>
746             <field name="view_type">form</field>
747             <field name="view_mode">tree,form</field>
748             <field name="search_view_id" ref="view_account_statement_operation_template_search"/>
749             <field name="help" type="html">
750               <p class="oe_view_nocontent_create">
751                 Click to create a statement operation template.
752               </p><p>
753                 Those can be used to quickly create a move line when reconciling
754                 your bank statements.
755               </p>
756             </field>
757         </record>
758
759         <menuitem
760             id="account_template_folder"
761             name="Templates"
762             parent="account_account_menu"
763             groups="account.group_account_manager"
764             sequence="3"/>
765         <menuitem
766             id="account_report_folder"
767             name="Reports"
768             parent="account_account_menu"
769             groups="account.group_account_manager"
770             sequence="4"/>
771         <menuitem action="action_account_statement_operation_template" id="menu_action_account_statement_operation_template" parent="account_template_folder" name="Statement Operation Templates" sequence="22"/>
772
773         <!-- Account Types -->
774         <record id="view_account_type_search" model="ir.ui.view">
775             <field name="name">account.account.type.search</field>
776             <field name="model">account.account.type</field>
777             <field name="arch" type="xml">
778                 <search string="Account Type">
779                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Account Type"/>
780                 </search>
781             </field>
782         </record>
783         <record id="view_account_type_tree" model="ir.ui.view">
784             <field name="name">account.account.type.tree</field>
785             <field name="model">account.account.type</field>
786             <field name="arch" type="xml">
787                 <tree string="Account Type">
788                     <field name="name"/>
789                     <field name="code"/>
790                 </tree>
791             </field>
792         </record>
793         <record id="view_account_type_form" model="ir.ui.view">
794             <field name="name">account.account.type.form</field>
795             <field name="model">account.account.type</field>
796             <field name="arch" type="xml">
797                 <form string="Account Type">
798                     <group>
799                         <group>
800                             <field name="name"/>
801                             <field name="code"/>
802                         </group>
803                         <group>
804                             <field name="report_type"/>
805                             <field name="close_method"/>
806                         </group>
807                     </group>
808                     <separator string="Description"/>
809                     <field name="note"/>
810                 </form>
811             </field>
812         </record>
813         <record id="action_account_type_form" model="ir.actions.act_window">
814             <field name="name">Account Types</field>
815             <field name="res_model">account.account.type</field>
816             <field name="view_type">form</field>
817             <field name="view_mode">tree,form</field>
818             <field name="search_view_id" ref="view_account_type_search"/>
819             <field name="help" type="html">
820               <p class="oe_view_nocontent_create">
821                 Click to define a new account type.
822               </p><p>
823                 An account type is used to determine how an account is used in
824                 each journal. The deferral method of an account type determines
825                 the process for the annual closing. Reports such as the Balance
826                 Sheet and the Profit and Loss report use the category
827                 (profit/loss or balance sheet).
828               </p>
829             </field>
830         </record>
831         <menuitem action="action_account_type_form" sequence="2" id="menu_action_account_type_form" parent="account_account_menu" groups="base.group_no_one"/>
832
833         <!-- Entries -->
834         <record id="view_account_move_tree" model="ir.ui.view">
835             <field name="name">account.move.tree</field>
836             <field name="model">account.move</field>
837             <field name="arch" type="xml">
838                 <tree colors="blue:state == 'draft';black:state == 'posted'" string="Journal Entries">
839                     <field name="name"/>
840                     <field name="ref"/>
841                     <field name="date"/>
842                     <field name="period_id"/>
843                     <field name="journal_id"/>
844                     <field name="partner_id"/>
845                     <field name="amount" sum="Total Amount"/>
846                     <field name="state"/>
847                 </tree>
848             </field>
849         </record>
850
851         <!-- Reconcile -->
852         <record id="view_move_reconcile_form" model="ir.ui.view">
853             <field name="name">account.move.reconcile.form</field>
854             <field name="model">account.move.reconcile</field>
855             <field name="arch" type="xml">
856                 <form string="Journal Entry Reconcile">
857                     <group col="4">
858                         <field name="name"/>
859                         <field name="create_date"/>
860                         <field name="type"/>
861                     </group>
862                     <separator string="Reconcile Entries"/>
863                     <field name="line_id"/>
864                     <separator string="Partial Reconcile Entries"/>
865                     <field name="line_partial_ids"/>
866                 </form>
867             </field>
868         </record>
869
870         <!-- Tax Codes -->
871         <record id="view_tax_code_search" model="ir.ui.view">
872             <field name="name">account.tax.code.search</field>
873             <field name="model">account.tax.code</field>
874             <field name="arch" type="xml">
875                 <search string="Account Tax Code">
876                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Tax Code"/>
877                     <field name="parent_id"/>
878                     <field name="company_id" groups="base.group_multi_company"/>
879                 </search>
880             </field>
881         </record>
882         <record id="view_tax_code_tree" model="ir.ui.view">
883             <field name="name">account.tax.code.tree</field>
884             <field name="model">account.tax.code</field>
885             <field name="field_parent">child_ids</field>
886             <field name="priority">100</field>
887             <field name="arch" type="xml">
888                 <tree string="Account Tax Code" toolbar="1">
889                     <field name="name"/>
890                     <field name="code"/>
891                     <field name="sum_period"/>
892                     <field name="sum"/>
893                     <field name="company_id" groups="base.group_multi_company"/>
894                 </tree>
895             </field>
896         </record>
897         <record id="view_tax_code_form" model="ir.ui.view">
898             <field name="name">account.tax.code.form</field>
899             <field name="model">account.tax.code</field>
900             <field name="arch" type="xml">
901                 <form string="Account Tax Code">
902                     <group>
903                         <group col="4" colspan="2">
904                             <field name="name"/>
905                             <field name="code"/>
906                             <field name="parent_id"/>
907                             <field name="company_id" groups="base.group_multi_company"/>
908                         </group>
909                         <group string="Reporting Configuration">
910                             <field name="notprintable"/>
911                             <field name="sign"/>
912                         </group>
913                         <group string="Statistics">
914                             <field name="sum_period"/>
915                             <field name="sum"/>
916                         </group>
917                     </group>
918                     <separator string="Description"/>
919                     <field name="info"/>
920                 </form>
921             </field>
922         </record>
923         <record id="action_tax_code_list" model="ir.actions.act_window">
924             <field name="name">Tax codes</field>
925             <field name="res_model">account.tax.code</field>
926             <field name="view_type">form</field>
927             <field name="view_mode">tree,form</field>
928             <field name="view_id" ref="view_tax_code_tree"/>
929             <field name="search_view_id" ref="view_tax_code_search"/>
930             <field name="help" type="html">
931               <p class="oe_view_nocontent_create">
932                 Click to define a new tax code.
933               </p><p>
934                 Depending on the country, a tax code is usually a cell to fill
935                 in your legal tax statement. Odoo allows you to define the
936                 tax structure and each tax computation will be registered in
937                 one or several tax code.
938               </p>
939             </field>
940         </record>
941         <menuitem id="next_id_27" name="Taxes" parent="account.menu_finance_configuration" sequence="4"/>
942         <menuitem action="action_tax_code_list" id="menu_action_tax_code_list" parent="next_id_27" sequence="2" groups="base.group_no_one"/>
943
944         <act_window
945             id="action_tax_code_line_open"
946             name="Journal Items"
947             domain="[('tax_code_id','child_of',active_id),('state','&lt;&gt;','draft')]"
948             res_model="account.move.line"
949             src_model="account.tax.code"/>
950
951         <!-- Enable drill-down from Chart Of Taxes tree view -->
952         <act_window
953             id="action_tax_code_items"
954             name="Journal Items"
955             domain="[('tax_code_id','child_of',active_id),('state','!=','draft')]"
956             res_model="account.move.line"
957             src_model="account.tax.code"
958             key2="tree_but_open"/>
959
960
961         <!-- Tax -->
962         <record id="view_tax_tree" model="ir.ui.view">
963             <field name="name">account.tax.tree</field>
964             <field name="model">account.tax</field>
965             <field name="field_parent">child_ids</field>
966             <field name="arch" type="xml">
967                 <tree string="Account Tax">
968                     <field name="name"/>
969                     <field name="price_include"/>
970                     <field name="description"/>
971                     <field name="company_id" widget="selection" groups="base.group_multi_company"/>
972                     <field name="type_tax_use" invisible="1"/>
973                 </tree>
974             </field>
975         </record>
976         <record id="view_account_tax_search" model="ir.ui.view">
977             <field name="name">account.tax.search</field>
978             <field name="model">account.tax</field>
979             <field name="arch" type="xml">
980                 <search string="Search Taxes">
981                     <field name="name" filter_domain="['|', ('name','ilike',self), ('description','ilike',self)]" string="Tax"/>
982                     <field name="company_id" groups="base.group_multi_company"/>
983                     <filter string="Sale" domain="[('type_tax_use','=','sale')]" />
984                     <filter string="Purchase" domain="[('type_tax_use','=','purchase')]" />
985                     <group string="Group By">
986                         <filter string="Company" domain="[]" context="{'group_by':'company_id'}"/>
987                         <filter string="Tax Application" domain="[]" context="{'group_by':'type_tax_use'}"/>
988                     </group>
989                 </search>
990             </field>
991         </record>
992         <record id="view_tax_form" model="ir.ui.view">
993             <field name="name">account.tax.form</field>
994             <field name="model">account.tax</field>
995             <field name="arch" type="xml">
996                 <form string="Account Tax">
997                     <group>
998                         <group>
999                             <field name="name"/>
1000                             <field name="description"/>
1001                         </group>
1002                         <group>
1003                             <field name="type_tax_use"/>
1004                             <field name="company_id" widget="selection" groups="base.group_multi_company"/>
1005                             <field name="active"/>
1006                         </group>
1007                     </group>
1008                     <notebook>
1009                         <page string="Tax Definition">
1010                         <group>
1011                             <group string="Tax Computation">
1012                                 <label for="type"/>
1013                                 <div>
1014                                     <field name="type"/>
1015                                     <field name="amount" attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
1016                                 </div>
1017                                 <field name="python_compute" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
1018                                 <field name="python_compute_inv" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
1019                                 <field name="price_include"/>
1020                             </group>
1021                             <group string="Misc">
1022                                 <field name="sequence"/>
1023                                 <field name="include_base_amount"/>
1024                                 <field name="child_depend"/>
1025                             </group>
1026                             <group string="Invoices">
1027                                   <field name="account_collected_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
1028                                   <field name="account_analytic_collected_id" domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id)]" groups="analytic.group_analytic_accounting"/>
1029
1030                                   <field name="base_code_id"/>
1031                                   <field name="base_sign"/>
1032                                   <field name="tax_code_id"/>
1033                                   <field name="tax_sign"/>
1034
1035                             </group>
1036                             <group string="Refunds">
1037                                   <field name="account_paid_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
1038                                   <field name="account_analytic_paid_id" domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id)]" groups="analytic.group_analytic_accounting"/>
1039
1040                                   <field name="ref_base_code_id"/>
1041                                   <field name="ref_base_sign"/>
1042                                   <field name="ref_tax_code_id"/>
1043                                   <field name="ref_tax_sign"/>
1044                             </group>
1045                             <group string="Children/Sub Taxes" colspan="2">
1046                                 <field name="child_ids" nolabel="1" colspan="2">
1047                                       <tree string="Account Tax">
1048                                           <field name="sequence"/>
1049                                           <field name="name"/>
1050                                           <field name="price_include"/>
1051                                           <field name="description"/>
1052                                      </tree>
1053                                 </field>
1054                             </group>
1055                         </group>
1056                         </page>
1057                         <page string="Special Computation">
1058                             <group col="4">
1059                                 <separator colspan="4" string="Applicability Options"/>
1060                                 <field name="applicable_type"/>
1061                                 <field name="domain"/>
1062                                 <separator colspan="4" string="Applicable Code (if type=code)"/>
1063                                 <field colspan="4" name="python_applicable" nolabel="1" attrs="{'readonly':[('applicable_type','=','true')], 'required':[('applicable_type','=','code')]}"/>
1064                             </group>
1065                         </page>
1066                     </notebook>
1067                 </form>
1068               </field>
1069         </record>
1070         <record id="action_tax_form" model="ir.actions.act_window">
1071             <field name="name">Taxes</field>
1072             <field name="res_model">account.tax</field>
1073             <field name="view_type">form</field>
1074             <field name="view_id" ref="view_tax_tree"/>
1075             <field name="domain">[('parent_id','=',False)]</field>
1076         </record>
1077         <menuitem action="action_tax_form" id="menu_action_tax_form" parent="next_id_27" sequence="1"/>
1078
1079         <record id="action_tax_code_tree" model="ir.actions.act_window">
1080             <field name="name">Chart of Taxes</field>
1081             <field name="res_model">account.tax.code</field>
1082             <field name="domain">[('parent_id','=',False)]</field>
1083             <field name="view_type">tree</field>
1084             <field name="view_id" ref="view_tax_code_tree"/>
1085         </record>
1086
1087         <!-- Journal Items -->
1088         <record id="view_move_line_form" model="ir.ui.view">
1089             <field name="name">account.move.line.form</field>
1090             <field name="model">account.move.line</field>
1091             <field eval="2" name="priority"/>
1092             <field name="arch" type="xml">
1093                 <form string="Journal Item">
1094                     <sheet>
1095                         <group>
1096                             <group>
1097                                 <field name="name"/>
1098                                 <field name="ref"/>
1099                                 <field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
1100                             </group>
1101                             <group>
1102                                 <field name="journal_id"/>
1103                                 <field name="period_id"/>
1104                                 <field name="company_id" required="1" groups="base.group_multi_company"/>
1105                             </group>
1106                         </group>
1107                         <notebook colspan="4">
1108                             <page string="Information">
1109                                 <group>
1110                                     <group string="Amount">
1111                                         <field name="account_id" domain="[('company_id', '=', company_id), ('type','&lt;&gt;','view'), ('type','&lt;&gt;','consolidation')]"/>
1112                                         <field name="debit"/>
1113                                         <field name="credit"/>
1114                                         <field name="quantity"/>
1115                                     </group>
1116                                     <group string="Accounting Documents">
1117                                         <field name="invoice" readonly="True"/>
1118                                         <field name="move_id" required="False"/>
1119                                         <field name="statement_id" readonly="True"/>
1120                                     </group>
1121                                     <group string="Dates">
1122                                         <field name="date"/>
1123                                         <field name="date_maturity"/>
1124                                         <field name="date_created" readonly="True"/>
1125                                     </group>
1126                                     <group string="Taxes">
1127                                         <field name="tax_code_id"/>
1128                                         <field name="tax_amount"/>
1129                                         <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
1130                                     </group>
1131                                     <group attrs="{'readonly':[('state','=','valid')]}" string="Currency" groups="base.group_multi_currency">
1132                                         <field name="currency_id" invisible="1"/>
1133                                         <field name="amount_currency" widget="monetary" options="{'currency_field': 'currency_id'}"/>
1134                                     </group>
1135                                     <group string="Reconciliation">
1136                                         <field name="reconcile_id"/>
1137                                         <field name="reconcile_partial_id"/>
1138                                     </group>
1139                                     <group string="States">
1140                                         <field name="state"/>
1141                                         <field name="blocked"/>
1142                                     </group>
1143                                     <group groups="analytic.group_analytic_accounting" string="Analytic">
1144                                         <field name="analytic_account_id" domain="[('type','in',('normal','contract'))]"/>
1145                                     </group>
1146                                 </group>
1147                                 <field name="narration" colspan="4" nolabel="1" placeholder="Add an internal note..."/>
1148                             </page>
1149                             <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
1150                                 <field name="analytic_lines" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
1151                             </page>
1152                         </notebook>
1153                     </sheet>
1154                 </form>
1155             </field>
1156         </record>
1157         <record id="view_move_line_form2" model="ir.ui.view">
1158             <field name="name">account.move.line.form2</field>
1159             <field name="model">account.move.line</field>
1160             <field eval="9" name="priority"/>
1161             <field name="arch" type="xml">
1162                 <form string="Journal Item">
1163                     <notebook colspan="4">
1164                         <page string="Information">
1165                             <group col="4">
1166                                 <separator colspan="4" string="General Information"/>
1167                                 <field name="name"/>
1168                                 <field name="date"/>
1169                                 <field name="journal_id" readonly="False"/>
1170                                 <field name="period_id" readonly="False"/>
1171                                 <field name="account_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation'),('company_id', '=', company_id)]"/>
1172                                 <field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
1173                                 <newline/>
1174                                 <field name="debit"/>
1175                                 <field name="credit"/>
1176
1177                                 <separator colspan="4" string="Optional Information"/>
1178                                 <field name="currency_id" invisible="1"/>
1179                                 <field name="amount_currency" groups="base.group_multi_currency" widget="monetary" options="{'currency_field': 'currency_id'}"/>
1180                                 <field name="quantity"/>
1181                                 <field name="move_id" required="False"/>
1182                                 <newline/>
1183                                 <field name="date_maturity"/>
1184                                 <field name="date_created"/>
1185                                 <field name="date_created"/>
1186                                 <field name="blocked"/>
1187                                 <newline/>
1188                                 <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
1189                                 <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1190                                 <separator colspan="4" string="Status"/>
1191                                 <newline/>
1192                                 <field name="reconcile_id"/>
1193                                 <field name="reconcile_partial_id"/>
1194                                 <field name="state"/>
1195                             </group>
1196                         </page>
1197                         <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
1198                             <field name="analytic_lines"/>
1199                         </page>
1200                     </notebook>
1201                 </form>
1202             </field>
1203         </record>
1204         <record id="view_move_line_tree" model="ir.ui.view">
1205             <field name="name">account.move.line.tree</field>
1206             <field name="model">account.move.line</field>
1207             <field eval="1" name="priority"/>
1208             <field name="arch" type="xml">
1209                 <tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items" create="true" on_write="on_create_write" editable="top">
1210                     <field name="journal_id" options='{"no_open":True}' invisible="context.get('journal_id',False)"/>
1211                     <field name="period_id" options='{"no_open":True}' invisible="context.get('period_id',False)"/>
1212                     <field name="date"/>
1213                     <field name="name"/>
1214                     <field name="ref"/>
1215                     <field name="statement_id" invisible="1"/>
1216                     <field name="partner_id" on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"/>
1217                     <field name="account_id" options='{"no_open":True}' domain="[('journal_id','=',journal_id), ('company_id', '=', company_id)]" on_change="onchange_account_id(account_id, partner_id, context)"/>
1218                     <field name="account_tax_id" options='{"no_open":True}' invisible="context.get('journal_type', False) not in ['sale','sale_refund','purchase','purchase_refund','general']"/>
1219                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('type','not in',['view','template'])]" invisible="not context.get('analytic_journal_id',False)"/>
1220                     <field name="move_id" required="0"/>
1221                     <field name="debit" sum="Total Debit"/>
1222                     <field name="credit" sum="Total Credit"/>
1223                     <field name="date_maturity" invisible="context.get('journal_type', False) not in ['sale','sale_refund','purchase','purchase_refund']"/>
1224                     <field name="reconcile_ref"/>
1225                     <field name="invoice" invisible="1"/>
1226                     <field name="amount_currency" readonly="True" invisible="not context.get('currency',False)"/>
1227                     <field name="currency_id" readonly="True" invisible="not context.get('currency',False)" />
1228                     <field name="state" invisible="1"/>
1229                     <field name="company_id" invisible="1"/>
1230                 </tree>
1231             </field>
1232         </record>
1233         <record id="account_move_line_graph" model="ir.ui.view">
1234             <field name="name">account.move.line.graph</field>
1235             <field name="model">account.move.line</field>
1236             <field name="arch" type="xml">
1237                 <graph string="Account Statistics" type="bar">
1238                     <field name="account_id"/>
1239                     <field name="debit" operator="+"/>
1240                     <field name="credit" operator="+"/>
1241                 </graph>
1242             </field>
1243         </record>
1244         <record id="view_account_move_line_filter" model="ir.ui.view">
1245             <field name="name">Journal Items</field>
1246             <field name="model">account.move.line</field>
1247             <field name="arch" type="xml">
1248                 <search string="Search Journal Items">
1249                     <field name="name" filter_domain="['|', ('name','ilike',self), ('ref','ilike',self)]" string="Move"/>
1250                     <field name="date"/>
1251                     <filter icon="terp-document-new" string="Unbalanced" domain="[('state','=','draft')]" help="Unbalanced Journal Items"/>
1252                     <separator/>
1253                     <filter icon="terp-document-new" string="Unposted" domain="[('move_id.state','=','draft')]" help="Unposted Journal Items"/>
1254                     <filter name="posted" icon="terp-camera_test" string="Posted" domain="[('move_id.state','=','posted')]" help="Posted Journal Items"/>
1255                     <separator/>
1256                     <filter icon="terp-dolar_ok!" string="Unreconciled" domain="[('reconcile_id','=',False), ('account_id.reconcile','=',True)]" help="Unreconciled Journal Items" name="unreconciled"/>
1257                     <separator/>
1258                     <filter string="Next Partner to Reconcile" help="Next Partner Entries to reconcile" name="next_partner" context="{'next_partner_only': 1}" icon="terp-gtk-jump-to-ltr" domain="[('account_id.reconcile','=',True),('reconcile_id','=',False)]"/>
1259                     <field name="move_id" string="Number (Move)"/>
1260                     <field name="account_id"/>
1261                     <field name="partner_id"/>
1262                     <field name="journal_id" context="{'journal_id':self}" widget="selection"/> <!-- it's important to keep widget='selection' in this filter viewbecause without that the value passed in the context is not the ID but the textual value (name) of the selected journal -->
1263                     <field name="period_id" context="{'period_id':self}" widget="selection"/> <!-- it's important to keep the widget='selection' in this field, for the same reason as explained above -->
1264                     <group expand="0" string="Group By">
1265                         <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
1266                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
1267                         <filter string="Account"  icon="terp-folder-green" context="{'group_by':'account_id'}"/>
1268                         <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
1269                     </group>
1270                 </search>
1271             </field>
1272         </record>
1273         <record id="action_account_moves_all_a" model="ir.actions.act_window">
1274             <field name="context">{'journal_type':'general'}</field>
1275             <field name="name">Journal Items</field>
1276             <field name="res_model">account.move.line</field>
1277             <field name="view_id" ref="view_move_line_tree"/>
1278             <field name="view_mode">tree_account_move_line_quickadd,form</field>
1279             <field name="help" type="html">
1280               <p class="oe_view_nocontent_create">
1281                 Select the period and the journal you want to fill.
1282               </p><p>
1283                 This view can be used by accountants in order to quickly record
1284                 entries in Odoo. If you want to record a supplier invoice,
1285                 start by recording the line of the expense account. Odoo
1286                 will propose to you automatically the Tax related to this
1287                 account and the counterpart "Account Payable".
1288               </p>
1289             </field>
1290         </record>
1291         <menuitem
1292             action="action_account_moves_all_a"
1293             icon="STOCK_JUSTIFY_FILL"
1294             id="menu_action_account_moves_all"
1295             parent="account.menu_finance_entries"
1296             sequence="1"
1297             groups="group_account_user"
1298         />
1299         <record id="action_account_moves_all_tree" model="ir.actions.act_window">
1300             <field name="name">Journal Items</field>
1301             <field name="res_model">account.move.line</field>
1302             <field name="context">{'search_default_partner_id': [active_id], 'default_partner_id': active_id}</field>
1303             <field name="view_id" ref="view_move_line_tree"/>
1304         </record>
1305         <record id="view_move_line_tree_reconcile" model="ir.ui.view">
1306             <field name="model">account.move.line</field>
1307             <field eval="24" name="priority"/>
1308             <field name="type">tree</field>
1309             <field name="arch" type="xml">
1310                 <tree_account_reconciliation colors="red:state == 'draft';black:state == 'valid'" string="Journal Items to Reconcile" create="false">
1311                     <field name="date"/>
1312                     <field name="move_id"/>
1313                     <field name="ref"/>
1314                     <field name="name"/>
1315                     <field name="partner_id"/>
1316                     <field name="account_id"/>
1317                     <field name="period_id" invisible="1"/>
1318                     <field name="journal_id" invisible="1"/>
1319                     <field name="reconcile_partial_id"/>
1320                     <field name="state" invisible="1"/>
1321                     <field name="debit" sum="Total debit"/>
1322                     <field name="credit" sum="Total credit"/>
1323                 </tree_account_reconciliation>
1324             </field>
1325         </record>
1326         <record id="action_account_manual_reconcile" model="ir.actions.act_window">
1327             <field name="context">{'search_default_unreconciled': 1,'view_mode':True}</field>
1328             <field name="name">Journal Items to Reconcile</field>
1329             <field name="res_model">account.move.line</field>
1330             <field name="view_id" ref="view_move_line_tree_reconcile"/>
1331             <field name="view_mode">tree_account_reconciliation</field>
1332             <field name="help" type="html">
1333                 <p>
1334                     No journal items found.
1335                 </p>
1336             </field>
1337         </record>
1338         <menuitem
1339              name="Manual Reconciliation"
1340              action="action_account_manual_reconcile"
1341              id="menu_manual_reconcile"
1342              parent="account.periodical_processing_reconciliation"/>
1343
1344         <!-- Account.Entry Edition -->
1345         <record id="view_move_tree" model="ir.ui.view">
1346             <field name="name">account.move.tree</field>
1347             <field name="model">account.move</field>
1348             <field name="arch" type="xml">
1349                 <tree colors="blue:state == 'draft';black:state == 'posted'" string="Journal Entries">
1350                     <field name="name"/>
1351                     <field name="ref"/>
1352                     <field name="date"/>
1353                     <field name="period_id"/>
1354                     <field name="journal_id"/>
1355                     <field name="partner_id"/>
1356                     <field name="amount" sum="Total Amount"/>
1357                     <field name="to_check"/>
1358                     <field name="state"/>
1359                 </tree>
1360             </field>
1361         </record>
1362         <record id="view_move_form" model="ir.ui.view">
1363             <field name="name">account.move.form</field>
1364             <field name="model">account.move</field>
1365             <field name="arch" type="xml">
1366                 <form string="Account Entry">
1367                     <header>
1368                         <button name="button_validate" states="draft" string="Post" type="object" class="oe_highlight" groups="account.group_account_invoice"/>
1369                         <button name="button_cancel" states="posted" string="Cancel Entry" type="object" groups="account.group_account_invoice"/>
1370                         <field name="state" widget="statusbar"/>
1371                     </header>
1372                     <label for="name" class="oe_edit_only" attrs="{'invisible':[('name','=','/')]}"/>
1373                     <h1>
1374                         <field name="name" readonly="True" attrs="{'invisible':[('name','=','/')]}"/>
1375                     </h1>
1376                     <group>
1377                         <group>
1378                             <field name="journal_id"/>
1379                             <field name="period_id"/>
1380                             <field name="company_id" required="1" groups="base.group_multi_company"/>
1381                             <field name="partner_id" invisible="1"/>
1382                         </group>
1383                         <group>
1384                             <field name="ref"/>
1385                             <field name="date"/>
1386                             <field name="to_check"/>
1387                             <field name="amount" invisible="1"/>
1388                         </group>
1389                     </group>
1390                     <notebook>
1391                         <page string="Journal Items">
1392                             <field name="line_id" widget="one2many_list"
1393                               context="{'line_id': line_id , 'journal_id': journal_id }">
1394                                 <form string="Journal Item">
1395                                     <group col="6" colspan="4">
1396                                         <field name="name"/>
1397                                         <field name="ref"/>
1398                                         <field name="partner_id" on_change="onchange_partner_id(False, partner_id, account_id, debit, credit, date, journal_id, context)"/>
1399
1400                                         <field name="journal_id"/>
1401                                         <field name="period_id"/>
1402                                         <field name="company_id" required="1" groups="base.group_multi_company"/>
1403                                     </group>
1404                                     <notebook colspan="4">
1405                                         <page string="Information">
1406                                             <group>
1407                                                 <group string="Amount">
1408                                                     <field name="account_id" domain="[('company_id', '=', parent.company_id), ('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
1409                                                     <field name="debit"/>
1410                                                     <field name="credit"/>
1411                                                     <field name="quantity"/>
1412                                                 </group>
1413
1414                                                 <group string="Accounting Documents">
1415                                                     <field name="invoice"/>
1416                                                     <field name="move_id" required="False"/>
1417                                                     <field name="statement_id"/>
1418                                                 </group>
1419
1420                                                 <group string="Dates">
1421                                                     <field name="date"/>
1422                                                     <field name="date_maturity"/>
1423                                                     <field name="date_created"/>
1424                                                 </group>
1425
1426                                                 <group string="Taxes">
1427                                                     <field name="tax_code_id"/>
1428                                                     <field name="tax_amount"/>
1429                                                     <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
1430                                                 </group>
1431
1432                                                 <group string="Currency" groups="base.group_multi_currency">
1433                                                     <field name="currency_id"/>
1434                                                     <field name="amount_currency"/>
1435                                                 </group>
1436
1437                                                 <group string="Reconciliation">
1438                                                     <field name="reconcile_id"/>
1439                                                     <field name="reconcile_partial_id"/>
1440                                                 </group>
1441
1442                                                 <group string="States">
1443                                                     <field name="state"/>
1444                                                     <field name="blocked"/>
1445                                                 </group>
1446
1447                                                 <group groups="analytic.group_analytic_accounting" string="Analytic">
1448                                                     <field name="analytic_account_id"/>
1449                                                 </group>
1450                                             </group>
1451                                             <separator string="Internal Note"/>
1452                                             <field name="narration"/>
1453                                         </page>
1454                                         <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
1455                                             <field colspan="4" name="analytic_lines" nolabel="1" context="{'default_general_account_id':account_id, 'default_name': name, 'default_date':date, 'amount': (debit or 0.0)-(credit or 0.0)}"/>
1456                                         </page>
1457                                     </notebook>
1458                                 </form>
1459                                 <tree colors="blue:state == 'draft';black:state == 'posted'" editable="top" string="Journal Items">
1460                                     <field name="invoice"/>
1461                                     <field name="name"/>
1462                                     <field name="partner_id" on_change="onchange_partner_id(False, partner_id, account_id, debit, credit, parent.date, parent.journal_id, context)"/>
1463                                     <field name="account_id" domain="[('journal_id','=',parent.journal_id),('company_id', '=', parent.company_id)]"/>
1464                                     <field name="date_maturity"/>
1465                                     <field name="debit" sum="Total Debit"/>
1466                                     <field name="credit" sum="Total Credit"/>
1467                                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1468                                     <field name="amount_currency"/>
1469                                     <field name="currency_id" groups="base.group_multi_currency"/>
1470                                     <field name="tax_code_id"/>
1471                                     <field name="tax_amount"/>
1472                                     <field name="state"/>
1473                                     <field name="reconcile_id"/>
1474                                     <field name="reconcile_partial_id"/>
1475                                 </tree>
1476                             </field>
1477                             <field name="narration" colspan="4" placeholder="Add an internal note..." nolabel="1" height="50"/>
1478                         </page>
1479                     </notebook>
1480                 </form>
1481             </field>
1482         </record>
1483         <record id="view_account_move_filter" model="ir.ui.view">
1484             <field name="name">account.move.select</field>
1485             <field name="model">account.move</field>
1486             <field name="arch" type="xml">
1487                 <search string="Search Move">
1488                     <field name="name" filter_domain="['|', ('name','ilike',self), ('ref','ilike',self)]" string="Move"/>
1489                     <field name="date"/>
1490                     <filter icon="terp-document-new" string="Unposted" domain="[('state','=','draft')]" help="Unposted Journal Entries"/>
1491                     <filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Journal Entries"/>
1492                     <separator/>
1493                     <filter icon="terp-gtk-jump-to-ltr" string="To Review" domain="[('to_check','=',True)]" help="Journal Entries to Review"/>
1494                     <field name="partner_id"/>
1495                     <field name="journal_id"/>
1496                     <field name="period_id"/>
1497                     <group expand="0" string="Group By">
1498                         <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
1499                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
1500                         <filter string="States" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
1501                         <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
1502                         <filter string="Entries Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Journal Entries by Month"/>
1503                     </group>
1504                 </search>
1505             </field>
1506         </record>
1507         <record id="action_move_journal_line" model="ir.actions.act_window">
1508             <field name="name">Journal Entries</field>
1509             <field name="res_model">account.move</field>
1510             <field name="view_type">form</field>
1511             <field name="view_mode">tree,form</field>
1512             <field name="view_id" ref="view_move_tree"/>
1513             <field name="search_view_id" ref="view_account_move_filter"/>
1514             <field name="help" type="html">
1515               <p class="oe_view_nocontent_create">
1516                 Click to create a journal entry.
1517               </p><p>
1518                 A journal entry consists of several journal items, each of
1519                 which is either a debit or a credit transaction.
1520               </p><p>
1521                 Odoo automatically creates one journal entry per accounting
1522                 document: invoice, refund, supplier payment, bank statements,
1523                 etc. So, you should record journal entries manually only/mainly
1524                 for miscellaneous operations.
1525               </p>
1526             </field>
1527         </record>
1528         <menuitem
1529             icon="STOCK_JUSTIFY_FILL"
1530             action="action_move_journal_line"
1531             id="menu_action_move_journal_line_form"
1532             parent="account.menu_finance_entries"
1533             groups="group_account_user"
1534             sequence="5"/>
1535
1536         <record id="action_move_line_form" model="ir.actions.act_window">
1537             <field name="name">Entries</field>
1538             <field name="type">ir.actions.act_window</field>
1539             <field name="res_model">account.move</field>
1540             <field name="view_type">form</field>
1541             <field name="view_id" ref="view_move_tree"/>
1542             <field name="search_view_id" ref="view_account_move_filter"/>
1543         </record>
1544
1545         <act_window
1546             id="act_account_move_to_account_move_line_open"
1547             name="Journal Items"
1548             context="{'search_default_move_id': active_id, 'default_move_id': active_id}"
1549             res_model="account.move.line"
1550             src_model="account.move"/>
1551
1552         <act_window
1553             domain="[('reconcile_id', '=', active_id)]"
1554             id="act_account_acount_move_line_reconcile_open"
1555             name="Reconciled entries"
1556             res_model="account.move.line"
1557             src_model="account.move.reconcile"/>
1558
1559         <!-- TODO: Print Journal (and change state), Close Journal (and verify that there is no draft Entry Lines) -->
1560         <record id="view_journal_period_tree" model="ir.ui.view">
1561             <field name="name">account.journal.period.tree</field>
1562             <field name="model">account.journal.period</field>
1563             <field name="arch" type="xml">
1564                 <tree colors="blue:state == 'draft';gray:state == 'done';black:state == 'printed'" string="Journals">
1565                     <field icon="icon" name="fiscalyear_id"/>
1566                     <field name="period_id"/>
1567                     <field name="journal_id"/>
1568                     <field name="state"/>
1569                     <field name="company_id" groups="base.group_multi_company"/>
1570                 </tree>
1571             </field>
1572         </record>
1573         <record id="action_account_journal_period_tree" model="ir.actions.act_window">
1574             <field name="name">Journals</field>
1575             <field name="res_model">account.journal.period</field>
1576             <field name="view_type">tree</field>
1577         </record>
1578
1579         <!-- Account Models -->
1580         <record id="view_model_line_tree" model="ir.ui.view">
1581             <field name="name">account.model.line.tree</field>
1582             <field name="model">account.model.line</field>
1583             <field name="arch" type="xml">
1584                 <tree string="Journal Entry Model Line" editable="bottom">
1585                     <field name="sequence"/>
1586                     <field name="name"/>
1587                     <field name="account_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation'), ('company_id', '=', parent.company_id)]"/>
1588                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1589                     <field name="partner_id"/>
1590                     <field name="debit"/>
1591                     <field name="credit"/>
1592                     <field name="date_maturity"/>
1593                 </tree>
1594             </field>
1595         </record>
1596         <record id="view_model_line_form" model="ir.ui.view">
1597             <field name="name">account.model.line.form</field>
1598             <field name="model">account.model.line</field>
1599             <field name="arch" type="xml">
1600                 <form string="Journal Entry Model Line">
1601                     <group col="4">
1602                         <field colspan="4" name="name"/>
1603                         <field name="sequence"/>
1604                         <field name="account_id" domain="[('type','&lt;&gt;','view'), ('type','&lt;&gt;','consolidation'), ('company_id', '=', parent.company_id)]"/>
1605                         <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1606                         <field name="partner_id"/>
1607                         <field name="debit"/>
1608                         <field name="credit"/>
1609                         <field name="quantity"/>
1610                         <field name="date_maturity"/>
1611                     </group>
1612                 </form>
1613             </field>
1614         </record>
1615         <record id="view_model_form" model="ir.ui.view">
1616             <field name="name">account.model.form</field>
1617             <field name="model">account.model</field>
1618             <field name="arch" type="xml">
1619                 <form string="Journal Entry Model">
1620                     <group col="4">
1621                         <field name="name"/>
1622                         <field name="journal_id" on_change="onchange_journal_id(journal_id)"/>
1623                         <field name="company_id" widget="selection" groups="base.group_multi_company"/>
1624                     </group>
1625
1626                     <field name="lines_id" widget="one2many_list"/>
1627                     <separator string="Legend"/>
1628                     <field name="legend"/>
1629                     <button name="%(action_account_use_model_create_entry)d" string="Create entries" type="action" icon="gtk-execute"/>
1630                 </form>
1631             </field>
1632         </record>
1633         <record id="view_model_tree" model="ir.ui.view">
1634             <field name="name">account.model.tree</field>
1635             <field name="model">account.model</field>
1636             <field name="arch" type="xml">
1637                 <tree string="Journal Entry Model">
1638                     <field name="name"/>
1639                     <field name="journal_id"/>
1640                     <field name="company_id" groups="base.group_multi_company"/>
1641                 </tree>
1642             </field>
1643         </record>
1644         <record id="view_model_search" model="ir.ui.view">
1645             <field name="name">account.model.search</field>
1646             <field name="model">account.model</field>
1647             <field name="arch" type="xml">
1648                 <search string="Journal Entry Model">
1649                     <field name="name" string="Journal Entry Model"/>
1650                     <filter string="Sale" icon="terp-camera_test" domain="[('journal_id.type', '=', 'sale')]"/>
1651                     <filter string="Purchase" icon="terp-purchase" domain="[('journal_id.type', '=', 'purchase')]"/>
1652                     <field name="journal_id"/>
1653                     <field name="company_id" groups="base.group_multi_company"/>
1654                     <group expand="0" string="Group By">
1655                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
1656                     </group>
1657                 </search>
1658             </field>
1659         </record>
1660
1661         <record id="action_model_form" model="ir.actions.act_window">
1662             <field name="name">Recurring Models</field>
1663             <field name="res_model">account.model</field>
1664             <field name="view_type">form</field>
1665             <field name="view_mode">tree,form</field>
1666             <field name="search_view_id" ref="view_model_search"/>
1667         </record>
1668         <menuitem
1669             action="action_model_form" name="Models" id="menu_action_model_form" sequence="5"
1670             parent="account.menu_configuration_recurrent_entries"/>
1671
1672         <!-- Payment Terms -->
1673         <record id="view_payment_term_line_tree" model="ir.ui.view">
1674             <field name="name">account.payment.term.line.tree</field>
1675             <field name="model">account.payment.term.line</field>
1676             <field name="arch" type="xml">
1677                 <tree string="Payment Term">
1678                     <field name="value"/>
1679                     <field name="value_amount" attrs="{'readonly':[('value','=','balance')]}"/>
1680                     <field name="days"/>
1681                     <field name="days2"/>
1682                 </tree>
1683             </field>
1684         </record>
1685         <record id="view_payment_term_line_form" model="ir.ui.view">
1686             <field name="name">account.payment.term.line.form</field>
1687             <field name="model">account.payment.term.line</field>
1688             <field name="arch" type="xml">
1689                 <form string="Payment Term">
1690                     <group>
1691                         <group string="Amount Computation">
1692                             <field name="value" widget="radio" nolabel="1" colspan="4"/>
1693                             <label for="value_amount" string="Amount To Pay"  attrs="{'invisible':[('value','=','balance')]}"/>
1694                             <div attrs="{'invisible':[('value','=','balance')]}">
1695                                 <field name="value_amount" class="oe_inline"/>
1696                             </div>
1697                         </group>
1698                         <group string="Due Date Computation">
1699                             <field name="days"/>
1700                             <field name="days2"/>
1701                         </group>
1702                     </group>
1703                 </form>
1704             </field>
1705         </record>
1706         <record id="view_payment_term_search" model="ir.ui.view">
1707             <field name="name">account.payment.term.search</field>
1708             <field name="model">account.payment.term</field>
1709             <field name="arch" type="xml">
1710                 <search string="Payment Term">
1711                     <field name="name" string="Payment Term"/>
1712                     <field name="active"/>
1713                 </search>
1714             </field>
1715         </record>
1716         <record id="view_payment_term_form" model="ir.ui.view">
1717             <field name="name">account.payment.term.form</field>
1718             <field name="model">account.payment.term</field>
1719             <field name="arch" type="xml">
1720                 <form string="Payment Term">
1721                     <group col="4">
1722                         <field name="name"/>
1723                         <field name="active"/>
1724                     </group>
1725                     <label for="note"/>
1726                     <field name="note" placeholder="Payment term explanation for the customer..."/>
1727                     <separator string="Computation"/>
1728                     <field name="line_ids"/>
1729                 </form>
1730             </field>
1731         </record>
1732         <record id="action_payment_term_form" model="ir.actions.act_window">
1733             <field name="name">Payment Terms</field>
1734             <field name="res_model">account.payment.term</field>
1735             <field name="view_type">form</field>
1736             <field name="view_mode">tree,form</field>
1737             <field name="search_view_id" ref="view_payment_term_search"/>
1738         </record>
1739         <menuitem id="account_followup_main_menu" parent="menu_finance_configuration" name="Follow-ups" sequence="6"/>
1740
1741         <menuitem action="action_payment_term_form"
1742             id="menu_action_payment_term_form" parent="account_followup_main_menu" sequence="0"/>
1743
1744         <!-- Account Subscriptions -->
1745         <record id="view_subscription_line_form" model="ir.ui.view">
1746             <field name="name">account.subscription.line.form</field>
1747             <field name="model">account.subscription.line</field>
1748             <field name="arch" type="xml">
1749                 <form string="Subscription lines">
1750                     <group>
1751                         <field name="date"/>
1752                         <field name="move_id"/>
1753                     </group>
1754                 </form>
1755             </field>
1756         </record>
1757         <record id="view_subscription_line_tree" model="ir.ui.view">
1758             <field name="name">account.subscription.line.tree</field>
1759             <field name="model">account.subscription.line</field>
1760             <field name="arch" type="xml">
1761                 <tree string="Subscription lines">
1762                     <field name="date"/>
1763                     <field name="move_id"/>
1764                 </tree>
1765             </field>
1766         </record>
1767         <record id="view_subscription_tree" model="ir.ui.view">
1768             <field name="name">account.subscription.tree</field>
1769             <field name="model">account.subscription</field>
1770             <field name="arch" type="xml">
1771                 <tree colors="blue:state == 'draft';gray:state == 'done';black:state == 'running'" string="Entry Subscription">
1772                     <field name="name"/>
1773                     <field name="model_id"/>
1774                     <field name="ref"/>
1775                     <field name="date_start"/>
1776                     <field name="state"/>
1777                 </tree>
1778             </field>
1779         </record>
1780         <record id="view_subscription_search" model="ir.ui.view">
1781             <field name="name">account.subscription.search</field>
1782             <field name="model">account.subscription</field>
1783             <field name="arch" type="xml">
1784                 <search string="Entry Subscription">
1785                     <field name="name" string="Account Subscription"/>
1786                     <field name="date_start"/>
1787                     <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Subscription"/>
1788                     <filter icon="terp-camera_test" string="Running" domain="[('state','=','running')]" help="Running Subscription"/>
1789                     <field name="model_id"/>
1790                     <group expand="0" string="Group By">
1791                         <filter string="Model" icon="terp-folder-orange" domain="[]" context="{'group_by':'model_id'}"/>
1792                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
1793                     </group>
1794                 </search>
1795             </field>
1796         </record>
1797         <record id="view_subscription_form" model="ir.ui.view">
1798             <field name="name">account.subscription.form</field>
1799             <field name="model">account.subscription</field>
1800             <field name="arch" type="xml">
1801                 <form string="Recurring">
1802                     <header>
1803                         <button name="state_draft" states="done" string="Set to Draft" type="object"  icon="gtk-convert" />
1804                         <button name="compute" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific" class="oe_highlight"/>
1805                         <button name="remove_line" states="running" string="Remove Lines" type="object" icon="gtk-remove" class="oe_highlight"/>
1806                         <field name="state" widget="statusbar" statusbar_visible="draft,running,done"/>
1807                     </header>
1808                     <sheet>
1809                         <group>
1810                             <group>
1811                                 <field name="name"/>
1812                                 <field name="model_id"/>
1813                                 <field name="ref"/>
1814                             </group>
1815                             <group>
1816                                 <field name="date_start"/>
1817                                 <field name="period_type"/>
1818                                 <field name="period_nbr"/>
1819                                 <field name="period_total"/>
1820                             </group>
1821                         </group>
1822                         <separator string="Subscription Lines"/>
1823                         <field name="lines_id" widget="one2many_list"/>
1824                     </sheet>
1825                 </form>
1826             </field>
1827         </record>
1828         <record id="action_subscription_form" model="ir.actions.act_window">
1829             <field name="name">Recurring Lines</field>
1830             <field name="res_model">account.subscription</field>
1831             <field name="view_type">form</field>
1832             <field name="view_mode">tree,form</field>
1833             <field name="search_view_id" ref="view_subscription_search"/>
1834             <field name="help" type="html">
1835               <p class="oe_view_nocontent_create">
1836                 Click to define a new recurring entry.
1837               </p><p>
1838                 A recurring entry occurs on a recurrent basis from a specific
1839                 date, i.e. corresponding to the signature of a contract or an
1840                 agreement with a customer or a supplier. You can create such
1841                 entries to automate the postings in the system.
1842               </p>
1843             </field>
1844         </record>
1845         <menuitem
1846             name="Define Recurring Entries" action="action_subscription_form"
1847             id="menu_action_subscription_form" sequence="1"
1848             parent="account.menu_configuration_recurrent_entries"/>
1849
1850         <record id="action_subscription_form_running" model="ir.actions.act_window">
1851             <field name="name">Running Subscriptions</field>
1852             <field name="res_model">account.subscription</field>
1853             <field name="view_type">form</field>
1854             <field name="view_mode">tree,form</field>
1855             <field name="domain">[('state','=','running')]</field>
1856             <field name="filter" eval="True"/>
1857         </record>
1858
1859         <record id="action_subscription_form_new" model="ir.actions.act_window">
1860             <field name="name">New Subscription</field>
1861             <field name="res_model">account.subscription</field>
1862             <field name="view_type">form</field>
1863             <field name="view_mode">form,tree</field>
1864             <field name="view_id" ref="view_subscription_form"/>
1865         </record>
1866
1867         <record id="view_subscription_line_form_complete" model="ir.ui.view">
1868             <field name="name">account.subscription.line.form</field>
1869             <field name="model">account.subscription.line</field>
1870             <field eval="20" name="priority"/>
1871             <field name="arch" type="xml">
1872                 <form string="Subscription lines">
1873                     <group col="4">
1874                         <field name="subscription_id"/>
1875                         <field name="date"/>
1876                         <field name="move_id"/>
1877                     </group>
1878                 </form>
1879             </field>
1880         </record>
1881
1882         <!-- Account Templates -->
1883
1884         <menuitem
1885             id="account_template_taxes"
1886             name="Templates"
1887             parent="next_id_27"
1888             sequence="4"/>
1889
1890         <record id="view_account_template_form" model="ir.ui.view">
1891             <field name="name">account.account.template.form</field>
1892             <field name="model">account.account.template</field>
1893             <field name="arch" type="xml">
1894                 <form string="Account Template">
1895                     <group col="4">
1896                         <field name="name"/>
1897                         <field name="code"/>
1898                         <newline/>
1899                         <field name="parent_id"/>
1900                         <field name="shortcut"/>
1901                         <field name="type"/>
1902                         <field name="user_type"/>
1903
1904                         <field name="currency_id" groups="base.group_multi_currency"/>
1905                         <field name="reconcile"/>
1906                         <field name="chart_template_id"/>
1907                     </group>
1908                     <separator string="Default Taxes"/>
1909                     <field name="tax_ids"/>
1910                     <separator string="Notes"/>
1911                     <field name="note" placeholder="Internal notes..."/>
1912                 </form>
1913             </field>
1914         </record>
1915         <record id="view_account_template_tree" model="ir.ui.view">
1916             <field name="name">account.account.template.tree</field>
1917             <field name="model">account.account.template</field>
1918             <field name="arch" type="xml">
1919                 <tree string="Account Template">
1920                     <field name="code"/>
1921                     <field name="name"/>
1922                     <field name="type" invisible="1"/>
1923                     <field name="user_type" invisible="1"/>
1924                 </tree>
1925             </field>
1926         </record>
1927         <record id="view_account_template_search" model="ir.ui.view">
1928             <field name="name">account.account.template.search</field>
1929             <field name="model">account.account.template</field>
1930             <field name="arch" type="xml">
1931                 <search string="Search Account Templates">
1932                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Account Template"/>
1933                     <filter icon="terp-sale" string="Receivable Accounts" domain="[('type','=','receivable')]"/>
1934                     <filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
1935                     <field name="parent_id"/>
1936                     <field name="user_type"/>
1937                     <field name="type"/>
1938                     <group expand="0" string="Group By">
1939                         <filter string="Internal Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
1940                         <filter string="Account Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'user_type'}"/>
1941                    </group>
1942                 </search>
1943             </field>
1944         </record>
1945         <record id="action_account_template_form" model="ir.actions.act_window">
1946             <field name="name">Account Templates</field>
1947             <field name="res_model">account.account.template</field>
1948             <field name="view_type">form</field>
1949             <field name="view_mode">tree,form</field>
1950             <field name="search_view_id" ref="view_account_template_search"/>
1951         </record>
1952         <menuitem action="action_account_template_form" id="menu_action_account_template_form" parent="account_template_folder" 
1953         sequence="2"/>
1954
1955         <record id="view_account_addtmpl_wizard_form" model="ir.ui.view">
1956             <field name="name">Create Account</field>
1957             <field name="model">account.addtmpl.wizard</field>
1958             <field name="arch" type="xml">
1959                 <form string="Create Account">
1960                     <header>
1961                         <button icon="gtk-ok" name="action_create" string="Add" type="object" class="oe_highlight"  />
1962                     </header>
1963                     <separator col="4" colspan="4" string="Create an Account Based on this Template"/>
1964                     <field name="cparent_id"/>
1965                 </form>
1966             </field>
1967         </record>
1968
1969         <act_window domain="[]" id="action_account_addtmpl_wizard_form"
1970             name="Create Account"
1971             target="new"
1972             res_model="account.addtmpl.wizard"
1973             context="{'tmpl_ids': active_id}"
1974             src_model="account.account.template"
1975             view_type="form" view_mode="form"/>
1976
1977
1978         <!-- Chart of Accounts Templates -->
1979         <record id="view_account_chart_template_form" model="ir.ui.view">
1980             <field name="name">account.chart.template.form</field>
1981             <field name="model">account.chart.template</field>
1982             <field name="arch" type="xml">
1983                 <form string="Chart of Accounts Template">
1984                     <group col="4">
1985                         <field name="name"/>
1986                         <field name="account_root_id" attrs="{'required': [('parent_id', '=', False)]}"/>
1987                         <field name="bank_account_view_id" attrs="{'required': [('parent_id', '=', False)]}"/>
1988                         <field name="tax_code_root_id" attrs="{'required': [('parent_id', '=', False)]}"/>
1989                         <field name="parent_id" />
1990                         <!--<field name="code_digits" />-->
1991                         <field name="visible" />
1992                         <field name="complete_tax_set" />
1993                     </group>
1994                     <separator string="Default Taxes" colspan="4"/>
1995                     <field name="tax_template_ids" colspan="4"  nolabel="1"/>
1996                     <separator string="Properties" colspan="4"/>
1997                     <group col="4">
1998                         <field name="property_account_receivable" domain="[('id', 'child_of', [account_root_id])]"/>
1999                         <field name="property_account_payable" domain="[('id', 'child_of', [account_root_id])]"/>
2000                         <field name="property_account_expense_categ" domain="[('id', 'child_of', [account_root_id])]"/>
2001                         <field name="property_account_income_categ" domain="[('id', 'child_of', [account_root_id])]" />
2002                         <field name="property_account_expense" domain="[('id', 'child_of', [account_root_id])]"/>
2003                         <field name="property_account_income" domain="[('id', 'child_of', [account_root_id])]"/>
2004                         <field name="property_account_income_opening" domain="[('id', 'child_of', [account_root_id])]"/>
2005                         <field name="property_account_expense_opening" domain="[('id', 'child_of', [account_root_id])]"/>
2006                     </group>
2007                 </form>
2008             </field>
2009         </record>
2010         <record id="view_account_chart_template_seacrh" model="ir.ui.view">
2011             <field name="name">account.chart.template.search</field>
2012             <field name="model">account.chart.template</field>
2013             <field name="arch" type="xml">
2014                 <search string="Search Chart of Account Templates">
2015                     <field name="name" string="Account Template"/>
2016                     <field name="account_root_id"/>
2017                     <field name="bank_account_view_id"/>
2018                     <group expand="0" string="Group By">
2019                         <filter string="Root Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'account_root_id'}"/>
2020                         <filter string="Bank Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'bank_account_view_id'}"/>
2021                         <filter string="Receivable Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_receivable'}"/>
2022                         <filter string="Payable Account" icon="terp-purchase" domain="[]" context="{'group_by':'property_account_payable'}"/>
2023                         <filter string="Income Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_income_categ'}"/>
2024                         <filter string="Expense Account" icon="terp-purchase" domain="[]" context="{'group_by':'property_account_expense_categ'}"/>
2025                     </group>
2026                 </search>
2027             </field>
2028         </record>
2029         <record id="view_account_chart_template_tree" model="ir.ui.view">
2030             <field name="name">account.chart.template.tree</field>
2031             <field name="model">account.chart.template</field>
2032             <field name="arch" type="xml">
2033                 <tree string="Chart of Accounts Template">
2034                     <field name="name"/>
2035                     <field name="account_root_id"/>
2036                     <field name="tax_code_root_id"/>
2037                     <field name="bank_account_view_id"/>
2038                     <field name="property_account_receivable" invisible="1"/>
2039                     <field name="property_account_payable" invisible="1"/>
2040                     <field name="property_account_expense_categ" invisible="1"/>
2041                     <field name="property_account_income_categ" invisible="1"/>
2042                 </tree>
2043             </field>
2044         </record>
2045         <record id="action_account_chart_template_form" model="ir.actions.act_window">
2046             <field name="name">Chart of Accounts Templates</field>
2047             <field name="res_model">account.chart.template</field>
2048             <field name="view_type">form</field>
2049             <field name="view_mode">tree,form</field>
2050         </record>
2051         <menuitem action="action_account_chart_template_form" id="menu_action_account_chart_template_form" parent="account_template_folder" sequence="1"/>
2052
2053         <!-- Account Tax Templates -->
2054         <record id="view_account_tax_template_form" model="ir.ui.view">
2055             <field name="name">account.tax.template.form</field>
2056             <field name="model">account.tax.template</field>
2057             <field name="arch" type="xml">
2058                 <form string="Account Tax Template">
2059                     <group col="4">
2060                         <field name="name"/>
2061                         <field name="description"/>
2062                         <field name="chart_template_id"/>
2063                         <field name="type"/>
2064                         <field name="type_tax_use"/>
2065                         <field name="price_include"/>
2066                     </group>
2067                     <notebook>
2068                         <page string="Tax Definition">
2069                             <group col="4">
2070                                 <field name="applicable_type"/>
2071                                 <field name="amount" attrs="{'readonly':[('type','=','none'),('type','=','code')]}"/>
2072                                 <field name="include_base_amount"/>
2073                                 <field name="domain"/>
2074                                 <newline/>
2075                                 <field name="account_collected_id"/>
2076                                 <label colspan="2" string="Keep empty to use the income account"/>
2077                                 <field name="account_paid_id"/>
2078                                 <label colspan="2" string="Keep empty to use the expense account"/>
2079                                 <field name="child_depend"/>
2080                                 <field name="sequence"/>
2081                             </group>
2082                         </page>
2083                         <page string="Tax Declaration">
2084                             <group col="4">
2085                                 <separator colspan="4" string="Invoices"/>
2086                                 <field name="base_code_id"/>
2087                                 <field name="base_sign"/>
2088                                 <field name="tax_code_id"/>
2089                                 <field name="tax_sign"/>
2090
2091                                 <separator colspan="4" string="Credit Notes"/>
2092                                 <field name="ref_base_code_id"/>
2093                                 <field name="ref_base_sign"/>
2094                                 <field name="ref_tax_code_id"/>
2095                                 <field name="ref_tax_sign"/>
2096                             </group>
2097                         </page>
2098                         <page string="Special Computation">
2099                             <separator string="Compute Code (if type=code)"/>
2100                             <field name="python_compute" attrs="{'readonly':[('type','!=','code')]}"/>
2101                             <separator string="Compute Code for Taxes Included Prices"/>
2102                             <field name="python_compute_inv"/>
2103                             <separator string="Applicable Code (if type=code)"/>
2104                             <field name="python_applicable" attrs="{'readonly':[('applicable_type','=','true')]}"/>
2105                         </page>
2106                     </notebook>
2107                 </form>
2108             </field>
2109         </record>
2110         <record id="view_account_tax_template_tree" model="ir.ui.view">
2111             <field name="name">account.tax.template.tree</field>
2112             <field name="model">account.tax.template</field>
2113             <field name="arch" type="xml">
2114                 <tree string="Account Tax Template">
2115                     <field name="name" />
2116                     <field name="description"/>
2117                 </tree>
2118             </field>
2119         </record>
2120         <record id="view_account_tax_template_search" model="ir.ui.view">
2121             <field name="name">account.tax.template.search</field>
2122             <field name="model">account.tax.template</field>
2123             <field name="arch" type="xml">
2124                 <search string="Search Tax Templates">
2125                     <field name="name" filter_domain="['|', ('name','ilike',self), ('description','ilike',self)]" string="Tax Template"/>
2126                     <filter icon="terp-sale" string="Sale" domain="[('type_tax_use','=','sale')]" help="Taxes used in Sales"/>
2127                     <filter icon="terp-purchase" string="Purchase" domain="[('type_tax_use','=','purchase')]" help="Taxes used in Purchases"/>
2128                     <field name="chart_template_id"/>
2129                 </search>
2130             </field>
2131         </record>
2132         <record id="action_account_tax_template_form" model="ir.actions.act_window">
2133             <field name="name">Tax Templates</field>
2134             <field name="res_model">account.tax.template</field>
2135             <field name="view_type">form</field>
2136             <field name="view_mode">tree,form</field>
2137             <field name="search_view_id" ref="view_account_tax_template_search"/>
2138         </record>
2139         <menuitem action="action_account_tax_template_form" id="menu_action_account_tax_template_form" parent="account_template_taxes" sequence="13"/>
2140
2141         <!-- Account Tax Code Templates -->
2142         <record id="view_tax_code_template_tree" model="ir.ui.view">
2143             <field name="name">account.tax.code.template.tree</field>
2144             <field name="model">account.tax.code.template</field>
2145             <field name="field_parent">child_ids</field>
2146             <field name="arch" type="xml">
2147                 <tree string="Account Tax Code Template" toolbar="1">
2148                     <field name="name"/>
2149                     <field name="code"/>
2150                     <field name="parent_id" invisible="1"/>
2151                 </tree>
2152             </field>
2153         </record>
2154         <record id="view_tax_code_template_search" model="ir.ui.view">
2155             <field name="name">account.tax.code.template.search</field>
2156             <field name="model">account.tax.code.template</field>
2157             <field name="arch" type="xml">
2158                 <search string="Search tax template">
2159                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Tax Template"/>
2160                     <field name="parent_id"/>
2161                     <group expand="0" string="Group By">
2162                         <filter string="Parent Code" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
2163                     </group>
2164                 </search>
2165             </field>
2166         </record>
2167         <record id="view_tax_code_template_form" model="ir.ui.view">
2168             <field name="name">account.tax.code.template.form</field>
2169             <field name="model">account.tax.code.template</field>
2170             <field name="arch" type="xml">
2171                 <form string="Account Tax Code Template">
2172                     <group col="4">
2173                         <field name="name"/>
2174                         <field name="code"/>
2175                         <field name="parent_id"/>
2176                         <field name="sign"/>
2177                     </group>
2178                     <separator string="Description"/>
2179                     <field name="info"/>
2180                 </form>
2181             </field>
2182         </record>
2183         <record id="action_account_tax_code_template_form" model="ir.actions.act_window">
2184             <field name="name">Tax Code</field>
2185             <field name="res_model">account.tax.code.template</field>
2186             <field name="view_type">form</field>
2187             <field name="view_mode">tree,form</field>
2188             <field name="search_view_id" ref="view_tax_code_template_search"/>
2189         </record>
2190         <menuitem action="action_account_tax_code_template_form" id="menu_action_account_tax_code_template_form" parent="account_template_taxes" sequence="14"/>
2191
2192
2193         <!--  Wizard for Multi Charts of Accounts -->
2194         <record id="view_wizard_multi_chart" model="ir.ui.view">
2195             <field name="name">Set Your Accounting Options</field>
2196             <field name="model">wizard.multi.charts.accounts</field>
2197             <field name="inherit_id" ref="base.res_config_view_base"/>
2198             <field name="arch" type="xml">
2199                 <form position="attributes">
2200                     <attribute name="string">Accounting Application Configuration</attribute>
2201                 </form>
2202                 <group string="res_config_contents" position="replace">
2203                     <field name="only_one_chart_template" invisible="1"/>
2204                     <field name="complete_tax_set" invisible="1"/>
2205                     <group col="1">
2206                         <group attrs="{'invisible': [('only_one_chart_template','=',True)]}">
2207                             <field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
2208                         </group>
2209                         <group>
2210                             <field name="company_id" widget="selection"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
2211                             <field name="currency_id" class="oe_inline"/>
2212                             <field name="sale_tax" attrs="{'invisible': [('complete_tax_set', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
2213                             <label for="sale_tax_rate" string="Sale Tax" attrs="{'invisible': [('complete_tax_set', '=', True)]}"/>
2214                             <div attrs="{'invisible': [('complete_tax_set', '=', True)]}">
2215                                 <field name="sale_tax_rate" class="oe_inline" on_change="onchange_tax_rate(sale_tax_rate)"/> %%
2216                             </div>
2217                             <field name="purchase_tax" attrs="{'invisible': [('complete_tax_set', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('purchase', 'all'))]"/>
2218                             <label for="purchase_tax_rate" string="Purchase Tax" attrs="{'invisible': [('complete_tax_set', '=', True)]}"/>
2219                             <div attrs="{'invisible': [('complete_tax_set', '=', True)]}">
2220                                 <field name="purchase_tax_rate" class="oe_inline"/> %%
2221                             </div>
2222                         </group>
2223                         <group groups="account.group_account_user">
2224                             <field name="code_digits"/>
2225                         </group>
2226                     </group>
2227                 </group>
2228             </field>
2229         </record>
2230         <record id="action_wizard_multi_chart" model="ir.actions.act_window">
2231             <field name="name">Set Your Accounting Options</field>
2232             <field name="type">ir.actions.act_window</field>
2233             <field name="res_model">wizard.multi.charts.accounts</field>
2234             <field name="view_id" ref="view_wizard_multi_chart"/>
2235             <field name="view_type">form</field>
2236             <field name="view_mode">form</field>
2237             <field name="target">new</field>
2238         </record>
2239
2240         <record id="account_account_graph" model="ir.ui.view">
2241             <field name="name">account.account.graph</field>
2242             <field name="model">account.account</field>
2243             <field name="arch" type="xml">
2244                 <graph string="Account Statistics" type="bar">
2245                     <field name="name"/>
2246                     <field name="balance" operator="+"/>
2247                 </graph>
2248             </field>
2249          </record>
2250
2251          <!-- Fiscal Position Templates -->
2252
2253         <record id="view_account_position_template_search" model="ir.ui.view">
2254             <field name="name">account.fiscal.position.template.search</field>
2255             <field name="model">account.fiscal.position.template</field>
2256             <field name="arch" type="xml">
2257                 <search string="Fiscal Position">
2258                     <field name="name" string="Fiscal Position Template"/>
2259                 </search>
2260             </field>
2261         </record>
2262
2263         <record id="view_account_position_template_form" model="ir.ui.view">
2264             <field name="name">account.fiscal.position.template.form</field>
2265             <field name="model">account.fiscal.position.template</field>
2266             <field name="arch" type="xml">
2267                 <form string="Fiscal Position Template">
2268                     <group col="4">
2269                         <field name="name"/>
2270                         <field name="chart_template_id"/>
2271                     </group>
2272                     <field name="tax_ids">
2273                         <tree string="Taxes Mapping" editable="bottom">
2274                             <field name="tax_src_id" domain="[('parent_id','=',False)]"/>
2275                             <field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
2276                         </tree>
2277                         <form string="Taxes Mapping">
2278                             <field name="tax_src_id" domain="[('parent_id','=',False)]"/>
2279                             <field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
2280                         </form>
2281                     </field>
2282                     <field name="account_ids">
2283                         <tree string="Accounts Mapping" editable="bottom">
2284                             <field name="account_src_id"/>
2285                             <field name="account_dest_id"/>
2286                         </tree>
2287                         <form string="Accounts Mapping">
2288                             <field name="account_src_id"/>
2289                             <field name="account_dest_id"/>
2290                         </form>
2291                     </field>
2292                 </form>
2293             </field>
2294         </record>
2295         <record id="view_account_position_template_tree" model="ir.ui.view">
2296             <field name="name">account.fiscal.position.template.tree</field>
2297             <field name="model">account.fiscal.position.template</field>
2298             <field name="arch" type="xml">
2299                 <tree string="Fiscal Position">
2300                     <field name="name"/>
2301                 </tree>
2302             </field>
2303         </record>
2304
2305         <record id="action_account_fiscal_position_template_form" model="ir.actions.act_window">
2306             <field name="name">Fiscal Position</field>
2307             <field name="res_model">account.fiscal.position.template</field>
2308             <field name="view_type">form</field>
2309             <field name="view_mode">tree,form</field>
2310             <field name="search_view_id" ref="view_account_position_template_search"/>
2311         </record>
2312
2313         <menuitem
2314             action="action_account_fiscal_position_template_form"
2315             id="menu_action_account_fiscal_position_form_template"
2316             parent="account_template_taxes" sequence="20"/>
2317
2318         <!-- Cash Statement -->
2319         <record id="view_cash_statement_tree" model="ir.ui.view">
2320             <field name="name">account.bank.statement.tree</field>
2321             <field name="model">account.bank.statement</field>
2322             <field name="arch" type="xml">
2323                 <tree colors="red:balance_end_real!=balance_end;blue:state=='draft' and (balance_end_real==balance_end);black:state == 'open'" string="Statement">
2324                     <field name="name"/>
2325                     <field name="date"/>
2326                     <field name="period_id"/>
2327                     <field name="journal_id"/>
2328                     <field name="balance_start"/>
2329                     <field name="balance_end_real"/>
2330                     <field name="balance_end" invisible="1" />
2331                     <field name="state"/>
2332                 </tree>
2333             </field>
2334         </record>
2335         <record id="view_bank_statement_form2" model="ir.ui.view">
2336             <field name="name">account.bank.statement.form</field>
2337             <field name="model">account.bank.statement</field>
2338             <field name="priority">2</field>
2339             <field name="arch" type="xml">
2340                 <form string="Statement">
2341                 <header>
2342                     <field name="all_lines_reconciled" invisible="1" />
2343                     <span attrs="{'invisible':['|',('all_lines_reconciled','=',True),('line_ids','=',[])]}">
2344                         <button name="%(action_bank_reconcile_bank_statements)d" states="open" string="Reconcile" type="action" class="oe_highlight"/>
2345                     </span>
2346                     <span attrs="{'invisible':[('all_lines_reconciled','=',False)]}">
2347                         <button name="button_confirm_cash" states="open" string="Close CashBox" type="object" class="oe_highlight"/>
2348                     </span>
2349                     <button name="button_open" states="draft" string="Open CashBox" type="object" class="oe_highlight"/>
2350                     <button name="button_cancel" states="confirm,open" string="Cancel CashBox" type="object"/>
2351                     <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
2352                 </header>
2353                 <sheet string="Statement">
2354                     <label for="name" class="oe_edit_only" attrs="{'invisible':[('name','=','/')]}"/>
2355                     <h1><field name="name" class="oe_inline" attrs="{'invisible':[('name','=','/')]}"/></h1>
2356                     <group>
2357                         <group>
2358                             <field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection" domain="[('type', '=', 'cash')]" />
2359                             <field name="user_id" attrs="{'readonly':[('state','!=','draft')]}" string="Responsible"/>
2360                             <field name='company_id' widget="selection" groups="base.group_multi_company" />
2361                         </group>
2362                         <group>
2363                             <field name="date" attrs="{'readonly':[('state','!=','draft')]}"  on_change="onchange_date(date, company_id)"/>
2364                             <field name="closing_date" readonly="1"/>
2365                             <field name="period_id" class="oe_inline"/>
2366                             <field name="currency" invisible="1"/>
2367                             <field name="cash_control" invisible="1"/>
2368                         </group>
2369                     </group>
2370                     <notebook>
2371                         <page string="Cash Transactions" attrs="{'invisible': [('state','=','draft')]}">
2372                             <field name="line_ids" context="{'date':date}">
2373                                 <tree editable="bottom" string="Statement lines">
2374                                     <field name="sequence" invisible="1"/>
2375                                     <field name="date"/>
2376                                     <field name="name"/>
2377                                     <field name="ref"/>
2378                                     <field name="partner_id"/>
2379                                     <field name="amount"/>
2380                                 </tree>
2381                                 <form string="Statement lines">
2382                                     <group col="4">
2383                                         <field name="date"/>
2384                                         <field name="name"/>
2385                                         <field name="ref"/>
2386                                         <field name="partner_id"/>
2387                                         <field name="amount"/>
2388                                         <field name="sequence"/>
2389                                     </group>
2390                                     <separator string="Notes"/>
2391                                     <field name="note"/>
2392                                 </form>
2393                             </field>
2394                         </page>
2395                         <page string="Cash Control" attrs="{'invisible' : [('cash_control', '=', False)]}">
2396                             <group col="2" expand="1">
2397                                 <group string="Opening Cash Control" attrs="{'invisible' : [('state', '!=', 'draft')]}">
2398                                     <field name="opening_details_ids" colspan="2" nolabel="1">
2399                                         <tree string="Opening Cashbox Lines" editable="bottom">
2400                                             <field name="pieces"/>
2401                                             <field name="number_opening" on_change="on_change_sub_opening(pieces, number_opening)" />
2402                                             <field name="subtotal_opening" string="Opening Subtotal" sum="Total"/>
2403                                         </tree>
2404                                     </field>
2405                                 </group>
2406                                 <group>
2407                                     <group string="Opening Cash Control" attrs="{'invisible' : [('state', '=', 'draft')]}">
2408                                         <field name="details_ids" colspan="2" nolabel="1" attrs="{'readonly' : [('state', '!=', 'draft')]}">
2409                                             <tree string="Opening Cashbox Lines" editable="bottom">
2410                                                 <field name="pieces"/>
2411                                                 <field name="number_opening" on_change="on_change_sub_opening(pieces, number_opening)"/>
2412                                                 <field name="subtotal_opening" string="Opening Subtotal" sum="Total"/>
2413                                             </tree>
2414                                         </field>
2415                                     </group>
2416                                     <group string="Closing Cash Control" attrs="{'invisible' : [('state', '=', 'draft')]}">
2417                                         <field name="closing_details_ids" colspan="2" nolabel="1" attrs="{'readonly' : [('state', '=', 'confirm')]}">
2418                                             <tree string="Closing Cashbox Lines" editable="bottom">
2419                                                 <field name="pieces" readonly="1" />
2420                                                 <field name="number_closing" on_change="on_change_sub_closing(pieces, number_closing)"/>
2421                                                 <field name="subtotal_closing" string="Closing Subtotal" sum="Total"/>
2422                                             </tree>
2423                                         </field>
2424                                     </group>
2425                                 </group>
2426                             </group>
2427                         </page>
2428                         <page string="Journal Entries" attrs="{'invisible': [('state','!=','confirm')]}">
2429                             <field name="move_line_ids" string="Journal Entries"/>
2430                         </page>
2431                     </notebook>
2432                     <group>
2433                         <group class="oe_subtotal_footer oe_right">
2434                             <label for="balance_start" class="oe_subtotal_footer_separator oe_open_balance" string="Opening Balance" style="padding-right: 23px !important; padding-top: 6px !important;"/>
2435                             <field name="balance_start" attrs="{'readonly' : ['|', ('cash_control', '=', True), ('state', '=', 'confirm')]}" nolabel="1" widget="monetary" class="oe_subtotal_footer_separator oe_open_balance" options="{'currency_field': 'currency'}" help="Total of opening cash control lines"/>
2436                             <label for="total_entry_encoding" string="+ Transactions" class="oe_force_bold oe_mini_subtotal_footer_separator" style="padding-right: 20px !important;"/>
2437                             <field name="total_entry_encoding" nolabel="1" class="oe_bold oe_account_total" widget="monetary" options="{'currency_field': 'currency'}"/>
2438                             <label for="balance_end" string="= Theoretical Closing Balance" class="oe_force_bold oe_mini_subtotal_footer_separator" style="padding-right: 20px !important;" help="Sum of opening balance and transactions."/>
2439                             <field name="balance_end" nolabel="1" class="oe_bold oe_account_total" widget="monetary" options="{'currency_field': 'currency'}"/>
2440                         </group>
2441                         <div>
2442                             <group class="oe_subtotal_footer oe_right" attrs="{'invisible': [('state', '=', 'draft')]}">
2443                                 <label for="balance_end_real" class="oe_subtotal_footer_separator oe_real_closing_balance" string="Real Closing Balance" style="padding-right: 23px !important; padding-top: 6px !important;"/>
2444                                 <field name="balance_end_real" attrs="{'readonly' : ['|', ('cash_control', '=', True), ('state', '=', 'confirm')]}" nolabel="1" class="oe_subtotal_footer_separator oe_real_closing_balance" widget="monetary" options="{'currency_field': 'currency'}" help="Total of closing cash control lines."/>
2445                             </group>
2446                             <group/>
2447                             <group/>
2448                             <group class="oe_subtotal_footer oe_right" attrs="{'invisible': [('state', '=', 'draft')]}">
2449                                 <label for="difference" string="Difference" class="oe_subtotal_footer_separator oe_difference" style="padding-right: 20px !important;"/>
2450                                 <field name="difference" nolabel="1" class="oe_subtotal_footer_separator oe_difference" widget="monetary" options="{'currency_field': 'currency'}"/>
2451                             </group>
2452                         </div>
2453                     </group>
2454                 </sheet>
2455                 </form>
2456             </field>
2457         </record>
2458         <record id="account_cash_statement_graph" model="ir.ui.view">
2459             <field name="name">account.bank.statement.graph</field>
2460             <field name="model">account.bank.statement</field>
2461             <field name="arch" type="xml">
2462                 <graph string="Account Statistics" type="bar">
2463                     <field name="date"/>
2464                     <field name="balance_start" operator="+"/>
2465                     <field name="balance_end" operator="+"/>
2466                 </graph>
2467             </field>
2468          </record>
2469         <record id="action_view_bank_statement_tree" model="ir.actions.act_window">
2470             <field name="name">Cash Registers</field>
2471             <field name="type">ir.actions.act_window</field>
2472             <field name="res_model">account.bank.statement</field>
2473             <field name="view_type">form</field>
2474             <field name="view_mode">tree,form,graph</field>
2475             <field name="view_id" ref="view_cash_statement_tree"/>
2476             <field name="search_view_id" ref="view_account_bank_statement_filter"/>
2477             <field name="domain">[('journal_id.type', '=', 'cash')]</field>
2478             <field name="context">{'journal_type':'cash'}</field>
2479             <field name="help" type="html">
2480               <p class="oe_view_nocontent_create">
2481                 Click to create a new cash log.
2482               </p><p>
2483                 A Cash Register allows you to manage cash entries in your cash
2484                 journals. This feature provides an easy way to follow up cash
2485                 payments on a daily basis. You can enter the coins that are in
2486                 your cash box, and then post entries when money comes in or
2487                 goes out of the cash box.
2488               </p>
2489             </field>
2490         </record>
2491
2492         <record model="ir.actions.act_window.view" id="act_cash_statement1_all">
2493             <field name="sequence" eval="1"/>
2494             <field name="view_mode">tree</field>
2495             <field name="view_id" ref="view_cash_statement_tree"/>
2496             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2497         </record>
2498         <record model="ir.actions.act_window.view" id="act_cash_statement2_all">
2499             <field name="sequence" eval="1"/>
2500             <field name="view_mode">form</field>
2501             <field name="view_id" ref="view_bank_statement_form2"/>
2502             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2503         </record>
2504         <record model="ir.actions.act_window.view" id="act_cash_statement3_all">
2505             <field name="sequence" eval="1"/>
2506             <field name="view_mode">graph</field>
2507             <field name="view_id" ref="account_cash_statement_graph"/>
2508             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2509         </record>
2510         <menuitem action="action_view_bank_statement_tree" id="journal_cash_move_lines"
2511             parent="menu_finance_bank_and_cash"/>
2512
2513         <menuitem id="menu_account_customer" name="Customers"
2514             parent="menu_finance_receivables"
2515             action="base.action_partner_customer_form" sequence="100"/>
2516
2517         <menuitem id="menu_account_supplier" name="Suppliers"
2518             parent="menu_finance_payables"
2519             action="base.action_partner_supplier_form" sequence="7"/>
2520
2521         <!-- Account Reports -->
2522         <record id="view_account_financial_report_form" model="ir.ui.view">
2523             <field name="name">account.financial.report.form</field>
2524             <field name="model">account.financial.report</field>
2525             <field name="arch" type="xml">
2526                 <form string="Account Report">
2527                     <group col="4">
2528                         <field name="name"/>
2529                         <field name="parent_id"/>
2530                         <field name="sequence"/>
2531                         <field name="type"/>
2532                         <field name="sign"/>
2533                         <field name="style_overwrite"/>
2534                     </group>
2535                     <notebook attrs="{'invisible': [('type','not in',['accounts','account_type'])]}">
2536                         <page string="Report">
2537                             <group>
2538                                 <field name="display_detail" attrs="{'invisible': [('type','not in',['accounts','account_type'])]}"/>
2539                                 <field name="account_report_id" attrs="{'invisible': [('type', '!=', 'account_report')]}"/>
2540                             </group>
2541                             <field name="account_ids" attrs="{'invisible': [('type', '!=', 'accounts')]}"/>
2542                             <field name="account_type_ids" attrs="{'invisible': [('type', '!=', 'account_type')]}"/>
2543                         </page>
2544                     </notebook>
2545                 </form>
2546             </field>
2547         </record>
2548         <record id="view_account_financial_report_tree" model="ir.ui.view">
2549             <field name="name">account.financial.report.tree</field>
2550             <field name="model">account.financial.report</field>
2551             <field name="arch" type="xml">
2552                 <tree string="Account Report">
2553                     <field name="name"/>
2554                     <field name="parent_id" invisible="1"/>
2555                     <field name="type"/>
2556                     <field name="account_report_id"/>
2557                 </tree>
2558             </field>
2559         </record>
2560         <record id="view_account_financial_report_search" model="ir.ui.view">
2561             <field name="name">account.financial.report.search</field>
2562             <field name="model">account.financial.report</field>
2563             <field name="arch" type="xml">
2564                 <search string="Account Report">
2565                     <field name="name" string="Account Report"/>
2566                     <field name="type"/>
2567                     <field name="account_report_id"/>
2568                     <group expand="0" string="Group By">
2569                         <filter string="Parent Report" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
2570                         <filter string="Report Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
2571                     </group>
2572                 </search>
2573             </field>
2574         </record>
2575         <record id="action_account_financial_report_tree" model="ir.actions.act_window">
2576             <field name="name">Financial Reports</field>
2577             <field name="type">ir.actions.act_window</field>
2578             <field name="res_model">account.financial.report</field>
2579             <field name="view_type">form</field>
2580             <field name="view_mode">tree,form</field>
2581             <field name="search_view_id" ref="view_account_financial_report_search"/>
2582             <field name="view_id" ref="view_account_financial_report_tree"/>
2583         </record>
2584         <menuitem id="menu_account_financial_reports_tree" name="Account Reports Types" parent="menu_account_reports" action="action_account_financial_report_tree"/>
2585
2586         <record id="view_account_report_tree_hierarchy" model="ir.ui.view">
2587             <field name="name">account.report.hierarchy</field>
2588             <field name="model">account.financial.report</field>
2589             <field name="field_parent">children_ids</field>
2590             <field name="arch" type="xml">
2591                 <tree string="Account Reports Hierarchy">
2592                     <field name="name"/>
2593                     <field name="type"/>
2594                     <field name="parent_id" invisible="1"/>
2595                     <field name="account_report_id"/>
2596                 </tree>
2597             </field>
2598         </record>
2599         <record id="action_account_report_tree_hierarchy" model="ir.actions.act_window">
2600             <field name="name">Financial Reports Hierarchy</field>
2601             <field name="res_model">account.financial.report</field>
2602             <field name="view_type">tree</field>
2603             <field name="view_id" ref="view_account_report_tree_hierarchy"/>
2604             <field name="domain">[('parent_id','=',False)]</field>
2605         </record>
2606         <menuitem id="menu_account_report_tree_hierarchy" name="Account Reports Hierarchy"
2607                   parent="menu_account_reports" action="action_account_report_tree_hierarchy"/>
2608
2609     </data>
2610 </openerp>