[MERGE] from master
[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="[('company_id', '=', company_id)]"/>
705                                 <field name="amount_type"/>
706                                 <field name="tax_id" domain="[('company_id', '=', company_id)]"/>
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" domain="[('company_id', '=', company_id)]"/>
716                                 <field name="company_id" groups="base.group_multi_company"/>
717                             </group>
718                         </group>
719                     </sheet>
720                 </form>
721             </field>
722         </record>
723         <record id="view_account_statement_operation_template_tree" model="ir.ui.view">
724             <field name="name">account.statement.operation.template.tree</field>
725             <field name="model">account.statement.operation.template</field>
726             <field name="arch" type="xml">
727                 <tree string="Bank Reconciliation Move Presets">
728                     <field name="name"/>
729                     <field name="account_id"/>
730                     <field name="amount_type"/>
731                 </tree>
732             </field>
733         </record>
734         <record id="view_account_statement_operation_template_search" model="ir.ui.view">
735             <field name="name">account.statement.operation.template.search</field>
736             <field name="model">account.statement.operation.template</field>
737             <field name="arch" type="xml">
738                 <search string="Bank Reconciliation Move preset">
739                         <filter string="With tax" domain="[('tax_id','!=',False)]"/>
740                         <field name="amount_type"/>
741                 </search>
742             </field>
743         </record>
744         <record id="action_account_statement_operation_template" model="ir.actions.act_window">
745             <field name="name">Statement Operations</field>
746             <field name="res_model">account.statement.operation.template</field>
747             <field name="view_type">form</field>
748             <field name="view_mode">tree,form</field>
749             <field name="search_view_id" ref="view_account_statement_operation_template_search"/>
750             <field name="help" type="html">
751               <p class="oe_view_nocontent_create">
752                 Click to create a statement operation template.
753               </p><p>
754                 Those can be used to quickly create a move line when reconciling
755                 your bank statements.
756               </p>
757             </field>
758         </record>
759
760         <menuitem
761             id="account_template_folder"
762             name="Templates"
763             parent="account_account_menu"
764             groups="account.group_account_manager"
765             sequence="3"/>
766         <menuitem
767             id="account_report_folder"
768             name="Reports"
769             parent="account_account_menu"
770             groups="account.group_account_manager"
771             sequence="4"/>
772         <menuitem action="action_account_statement_operation_template" id="menu_action_account_statement_operation_template" parent="account_template_folder" name="Statement Operation Templates" sequence="22"/>
773
774         <!-- Account Types -->
775         <record id="view_account_type_search" model="ir.ui.view">
776             <field name="name">account.account.type.search</field>
777             <field name="model">account.account.type</field>
778             <field name="arch" type="xml">
779                 <search string="Account Type">
780                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Account Type"/>
781                 </search>
782             </field>
783         </record>
784         <record id="view_account_type_tree" model="ir.ui.view">
785             <field name="name">account.account.type.tree</field>
786             <field name="model">account.account.type</field>
787             <field name="arch" type="xml">
788                 <tree string="Account Type">
789                     <field name="name"/>
790                     <field name="code"/>
791                 </tree>
792             </field>
793         </record>
794         <record id="view_account_type_form" model="ir.ui.view">
795             <field name="name">account.account.type.form</field>
796             <field name="model">account.account.type</field>
797             <field name="arch" type="xml">
798                 <form string="Account Type">
799                     <group>
800                         <group>
801                             <field name="name"/>
802                             <field name="code"/>
803                         </group>
804                         <group>
805                             <field name="report_type"/>
806                             <field name="close_method"/>
807                         </group>
808                     </group>
809                     <separator string="Description"/>
810                     <field name="note"/>
811                 </form>
812             </field>
813         </record>
814         <record id="action_account_type_form" model="ir.actions.act_window">
815             <field name="name">Account Types</field>
816             <field name="res_model">account.account.type</field>
817             <field name="view_type">form</field>
818             <field name="view_mode">tree,form</field>
819             <field name="search_view_id" ref="view_account_type_search"/>
820             <field name="help" type="html">
821               <p class="oe_view_nocontent_create">
822                 Click to define a new account type.
823               </p><p>
824                 An account type is used to determine how an account is used in
825                 each journal. The deferral method of an account type determines
826                 the process for the annual closing. Reports such as the Balance
827                 Sheet and the Profit and Loss report use the category
828                 (profit/loss or balance sheet).
829               </p>
830             </field>
831         </record>
832         <menuitem action="action_account_type_form" sequence="2" id="menu_action_account_type_form" parent="account_account_menu" groups="base.group_no_one"/>
833
834         <!-- Entries -->
835         <record id="view_account_move_tree" model="ir.ui.view">
836             <field name="name">account.move.tree</field>
837             <field name="model">account.move</field>
838             <field name="arch" type="xml">
839                 <tree colors="blue:state == 'draft';black:state == 'posted'" string="Journal Entries">
840                     <field name="name"/>
841                     <field name="ref"/>
842                     <field name="date"/>
843                     <field name="period_id"/>
844                     <field name="journal_id"/>
845                     <field name="partner_id"/>
846                     <field name="amount" sum="Total Amount"/>
847                     <field name="state"/>
848                 </tree>
849             </field>
850         </record>
851
852         <!-- Reconcile -->
853         <record id="view_move_reconcile_form" model="ir.ui.view">
854             <field name="name">account.move.reconcile.form</field>
855             <field name="model">account.move.reconcile</field>
856             <field name="arch" type="xml">
857                 <form string="Journal Entry Reconcile">
858                     <group col="4">
859                         <field name="name"/>
860                         <field name="create_date"/>
861                         <field name="type"/>
862                     </group>
863                     <separator string="Reconcile Entries"/>
864                     <field name="line_id"/>
865                     <separator string="Partial Reconcile Entries"/>
866                     <field name="line_partial_ids"/>
867                 </form>
868             </field>
869         </record>
870
871         <!-- Tax Codes -->
872         <record id="view_tax_code_search" model="ir.ui.view">
873             <field name="name">account.tax.code.search</field>
874             <field name="model">account.tax.code</field>
875             <field name="arch" type="xml">
876                 <search string="Account Tax Code">
877                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Tax Code"/>
878                     <field name="parent_id"/>
879                     <field name="company_id" groups="base.group_multi_company"/>
880                 </search>
881             </field>
882         </record>
883         <record id="view_tax_code_tree" model="ir.ui.view">
884             <field name="name">account.tax.code.tree</field>
885             <field name="model">account.tax.code</field>
886             <field name="field_parent">child_ids</field>
887             <field name="priority">100</field>
888             <field name="arch" type="xml">
889                 <tree string="Account Tax Code" toolbar="1">
890                     <field name="name"/>
891                     <field name="code"/>
892                     <field name="sum_period"/>
893                     <field name="sum"/>
894                     <field name="company_id" groups="base.group_multi_company"/>
895                 </tree>
896             </field>
897         </record>
898         <record id="view_tax_code_form" model="ir.ui.view">
899             <field name="name">account.tax.code.form</field>
900             <field name="model">account.tax.code</field>
901             <field name="arch" type="xml">
902                 <form string="Account Tax Code">
903                     <group>
904                         <group col="4" colspan="2">
905                             <field name="name"/>
906                             <field name="code"/>
907                             <field name="parent_id"/>
908                             <field name="company_id" groups="base.group_multi_company"/>
909                         </group>
910                         <group string="Reporting Configuration">
911                             <field name="notprintable"/>
912                             <field name="sign"/>
913                         </group>
914                         <group string="Statistics">
915                             <field name="sum_period"/>
916                             <field name="sum"/>
917                         </group>
918                     </group>
919                     <separator string="Description"/>
920                     <field name="info"/>
921                 </form>
922             </field>
923         </record>
924         <record id="action_tax_code_list" model="ir.actions.act_window">
925             <field name="name">Tax codes</field>
926             <field name="res_model">account.tax.code</field>
927             <field name="view_type">form</field>
928             <field name="view_mode">tree,form</field>
929             <field name="view_id" ref="view_tax_code_tree"/>
930             <field name="search_view_id" ref="view_tax_code_search"/>
931             <field name="help" type="html">
932               <p class="oe_view_nocontent_create">
933                 Click to define a new tax code.
934               </p><p>
935                 Depending on the country, a tax code is usually a cell to fill
936                 in your legal tax statement. Odoo allows you to define the
937                 tax structure and each tax computation will be registered in
938                 one or several tax code.
939               </p>
940             </field>
941         </record>
942         <menuitem id="next_id_27" name="Taxes" parent="account.menu_finance_configuration" sequence="4"/>
943         <menuitem action="action_tax_code_list" id="menu_action_tax_code_list" parent="next_id_27" sequence="2" groups="base.group_no_one"/>
944
945         <act_window
946             id="action_tax_code_line_open"
947             name="Journal Items"
948             domain="[('tax_code_id','child_of',active_id),('state','&lt;&gt;','draft')]"
949             res_model="account.move.line"
950             src_model="account.tax.code"/>
951
952         <!-- Enable drill-down from Chart Of Taxes tree view -->
953         <act_window
954             id="action_tax_code_items"
955             name="Journal Items"
956             domain="[('tax_code_id','child_of',active_id),('state','!=','draft')]"
957             res_model="account.move.line"
958             src_model="account.tax.code"
959             key2="tree_but_open"/>
960
961
962         <!-- Tax -->
963         <record id="view_tax_tree" model="ir.ui.view">
964             <field name="name">account.tax.tree</field>
965             <field name="model">account.tax</field>
966             <field name="field_parent">child_ids</field>
967             <field name="arch" type="xml">
968                 <tree string="Account Tax">
969                     <field name="name"/>
970                     <field name="price_include"/>
971                     <field name="description"/>
972                     <field name="company_id" widget="selection" groups="base.group_multi_company"/>
973                     <field name="type_tax_use" invisible="1"/>
974                 </tree>
975             </field>
976         </record>
977         <record id="view_account_tax_search" model="ir.ui.view">
978             <field name="name">account.tax.search</field>
979             <field name="model">account.tax</field>
980             <field name="arch" type="xml">
981                 <search string="Search Taxes">
982                     <field name="name" filter_domain="['|', ('name','ilike',self), ('description','ilike',self)]" string="Tax"/>
983                     <field name="company_id" groups="base.group_multi_company"/>
984                     <filter string="Sale" domain="[('type_tax_use','=','sale')]" />
985                     <filter string="Purchase" domain="[('type_tax_use','=','purchase')]" />
986                     <group string="Group By">
987                         <filter string="Company" domain="[]" context="{'group_by':'company_id'}"/>
988                         <filter string="Tax Application" domain="[]" context="{'group_by':'type_tax_use'}"/>
989                     </group>
990                 </search>
991             </field>
992         </record>
993         <record id="view_tax_form" model="ir.ui.view">
994             <field name="name">account.tax.form</field>
995             <field name="model">account.tax</field>
996             <field name="arch" type="xml">
997                 <form string="Account Tax">
998                     <group>
999                         <group>
1000                             <field name="name"/>
1001                             <field name="description"/>
1002                         </group>
1003                         <group>
1004                             <field name="type_tax_use"/>
1005                             <field name="company_id" widget="selection" groups="base.group_multi_company"/>
1006                             <field name="active"/>
1007                         </group>
1008                     </group>
1009                     <notebook>
1010                         <page string="Tax Definition">
1011                         <group>
1012                             <group string="Tax Computation">
1013                                 <label for="type"/>
1014                                 <div>
1015                                     <field name="type"/>
1016                                     <field name="amount" attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
1017                                 </div>
1018                                 <field name="python_compute" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
1019                                 <field name="python_compute_inv" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
1020                                 <field name="price_include"/>
1021                             </group>
1022                             <group string="Misc">
1023                                 <field name="sequence"/>
1024                                 <field name="include_base_amount"/>
1025                                 <field name="child_depend"/>
1026                             </group>
1027                             <group string="Invoices">
1028                                   <field name="account_collected_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
1029                                   <field name="account_analytic_collected_id" domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id)]" groups="analytic.group_analytic_accounting"/>
1030
1031                                   <field name="base_code_id"/>
1032                                   <field name="base_sign"/>
1033                                   <field name="tax_code_id"/>
1034                                   <field name="tax_sign"/>
1035
1036                             </group>
1037                             <group string="Refunds">
1038                                   <field name="account_paid_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
1039                                   <field name="account_analytic_paid_id" domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id)]" groups="analytic.group_analytic_accounting"/>
1040
1041                                   <field name="ref_base_code_id"/>
1042                                   <field name="ref_base_sign"/>
1043                                   <field name="ref_tax_code_id"/>
1044                                   <field name="ref_tax_sign"/>
1045                             </group>
1046                             <group string="Children/Sub Taxes" colspan="2">
1047                                 <field name="child_ids" nolabel="1" colspan="2">
1048                                       <tree string="Account Tax">
1049                                           <field name="sequence"/>
1050                                           <field name="name"/>
1051                                           <field name="price_include"/>
1052                                           <field name="description"/>
1053                                      </tree>
1054                                 </field>
1055                             </group>
1056                         </group>
1057                         </page>
1058                         <page string="Special Computation">
1059                             <group col="4">
1060                                 <separator colspan="4" string="Applicability Options"/>
1061                                 <field name="applicable_type"/>
1062                                 <field name="domain"/>
1063                                 <separator colspan="4" string="Applicable Code (if type=code)"/>
1064                                 <field colspan="4" name="python_applicable" nolabel="1" attrs="{'readonly':[('applicable_type','=','true')], 'required':[('applicable_type','=','code')]}"/>
1065                             </group>
1066                         </page>
1067                     </notebook>
1068                 </form>
1069               </field>
1070         </record>
1071         <record id="action_tax_form" model="ir.actions.act_window">
1072             <field name="name">Taxes</field>
1073             <field name="res_model">account.tax</field>
1074             <field name="view_type">form</field>
1075             <field name="view_id" ref="view_tax_tree"/>
1076             <field name="domain">[('parent_id','=',False)]</field>
1077         </record>
1078         <menuitem action="action_tax_form" id="menu_action_tax_form" parent="next_id_27" sequence="1"/>
1079
1080         <record id="action_tax_code_tree" model="ir.actions.act_window">
1081             <field name="name">Chart of Taxes</field>
1082             <field name="res_model">account.tax.code</field>
1083             <field name="domain">[('parent_id','=',False)]</field>
1084             <field name="view_type">tree</field>
1085             <field name="view_id" ref="view_tax_code_tree"/>
1086         </record>
1087
1088         <!-- Journal Items -->
1089         <record id="view_move_line_form" model="ir.ui.view">
1090             <field name="name">account.move.line.form</field>
1091             <field name="model">account.move.line</field>
1092             <field eval="2" name="priority"/>
1093             <field name="arch" type="xml">
1094                 <form string="Journal Item">
1095                     <sheet>
1096                         <group>
1097                             <group>
1098                                 <field name="name"/>
1099                                 <field name="ref"/>
1100                                 <field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
1101                             </group>
1102                             <group>
1103                                 <field name="journal_id"/>
1104                                 <field name="period_id"/>
1105                                 <field name="company_id" required="1" groups="base.group_multi_company"/>
1106                             </group>
1107                         </group>
1108                         <notebook colspan="4">
1109                             <page string="Information">
1110                                 <group>
1111                                     <group string="Amount">
1112                                         <field name="account_id" domain="[('company_id', '=', company_id), ('type','&lt;&gt;','view'), ('type','&lt;&gt;','consolidation')]"/>
1113                                         <field name="debit"/>
1114                                         <field name="credit"/>
1115                                         <field name="quantity"/>
1116                                     </group>
1117                                     <group string="Accounting Documents">
1118                                         <field name="invoice" readonly="True"/>
1119                                         <field name="move_id" required="False"/>
1120                                         <field name="statement_id" readonly="True"/>
1121                                     </group>
1122                                     <group string="Dates">
1123                                         <field name="date"/>
1124                                         <field name="date_maturity"/>
1125                                         <field name="date_created" readonly="True"/>
1126                                     </group>
1127                                     <group string="Taxes">
1128                                         <field name="tax_code_id"/>
1129                                         <field name="tax_amount"/>
1130                                         <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
1131                                     </group>
1132                                     <group attrs="{'readonly':[('state','=','valid')]}" string="Currency" groups="base.group_multi_currency">
1133                                         <field name="currency_id" invisible="1"/>
1134                                         <field name="amount_currency" widget="monetary" options="{'currency_field': 'currency_id'}"/>
1135                                     </group>
1136                                     <group string="Reconciliation">
1137                                         <field name="reconcile_id"/>
1138                                         <field name="reconcile_partial_id"/>
1139                                     </group>
1140                                     <group string="States">
1141                                         <field name="state"/>
1142                                         <field name="blocked"/>
1143                                     </group>
1144                                     <group groups="analytic.group_analytic_accounting" string="Analytic">
1145                                         <field name="analytic_account_id" domain="[('type','in',('normal','contract'))]"/>
1146                                     </group>
1147                                 </group>
1148                                 <field name="narration" colspan="4" nolabel="1" placeholder="Add an internal note..."/>
1149                             </page>
1150                             <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
1151                                 <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)}"/>
1152                             </page>
1153                         </notebook>
1154                     </sheet>
1155                 </form>
1156             </field>
1157         </record>
1158         <record id="view_move_line_form2" model="ir.ui.view">
1159             <field name="name">account.move.line.form2</field>
1160             <field name="model">account.move.line</field>
1161             <field eval="9" name="priority"/>
1162             <field name="arch" type="xml">
1163                 <form string="Journal Item">
1164                     <notebook colspan="4">
1165                         <page string="Information">
1166                             <group col="4">
1167                                 <separator colspan="4" string="General Information"/>
1168                                 <field name="name"/>
1169                                 <field name="date"/>
1170                                 <field name="journal_id" readonly="False"/>
1171                                 <field name="period_id" readonly="False"/>
1172                                 <field name="account_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation'),('company_id', '=', company_id)]"/>
1173                                 <field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,date)"/>
1174                                 <newline/>
1175                                 <field name="debit"/>
1176                                 <field name="credit"/>
1177
1178                                 <separator colspan="4" string="Optional Information"/>
1179                                 <field name="currency_id" invisible="1"/>
1180                                 <field name="amount_currency" groups="base.group_multi_currency" widget="monetary" options="{'currency_field': 'currency_id'}"/>
1181                                 <field name="quantity"/>
1182                                 <field name="move_id" required="False"/>
1183                                 <newline/>
1184                                 <field name="date_maturity"/>
1185                                 <field name="date_created"/>
1186                                 <field name="date_created"/>
1187                                 <field name="blocked"/>
1188                                 <newline/>
1189                                 <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
1190                                 <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1191                                 <separator colspan="4" string="Status"/>
1192                                 <newline/>
1193                                 <field name="reconcile_id"/>
1194                                 <field name="reconcile_partial_id"/>
1195                                 <field name="state"/>
1196                             </group>
1197                         </page>
1198                         <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
1199                             <field name="analytic_lines"/>
1200                         </page>
1201                     </notebook>
1202                 </form>
1203             </field>
1204         </record>
1205         <record id="view_move_line_tree" model="ir.ui.view">
1206             <field name="name">account.move.line.tree</field>
1207             <field name="model">account.move.line</field>
1208             <field eval="1" name="priority"/>
1209             <field name="arch" type="xml">
1210                 <tree colors="red:state == 'draft';black:state == 'valid'" string="Journal Items" create="true" on_write="on_create_write" editable="top">
1211                     <field name="journal_id" options='{"no_open":True}' invisible="context.get('journal_id',False)"/>
1212                     <field name="period_id" options='{"no_open":True}' invisible="context.get('period_id',False)"/>
1213                     <field name="date"/>
1214                     <field name="name"/>
1215                     <field name="ref"/>
1216                     <field name="statement_id" invisible="1"/>
1217                     <field name="partner_id" on_change="onchange_partner_id(move_id, partner_id, account_id, debit, credit, date, journal_id)"/>
1218                     <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)"/>
1219                     <field name="account_tax_id" options='{"no_open":True}' invisible="context.get('journal_type', False) not in ['sale','sale_refund','purchase','purchase_refund','general']"/>
1220                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('type','not in',['view','template'])]" invisible="not context.get('analytic_journal_id',False)"/>
1221                     <field name="move_id" required="0"/>
1222                     <field name="debit" sum="Total Debit"/>
1223                     <field name="credit" sum="Total Credit"/>
1224                     <field name="date_maturity" invisible="context.get('journal_type', False) not in ['sale','sale_refund','purchase','purchase_refund']"/>
1225                     <field name="reconcile_ref"/>
1226                     <field name="invoice" invisible="1"/>
1227                     <field name="amount_currency" readonly="True" invisible="not context.get('currency',False)"/>
1228                     <field name="currency_id" readonly="True" invisible="not context.get('currency',False)" />
1229                     <field name="state" invisible="1"/>
1230                     <field name="company_id" invisible="1"/>
1231                 </tree>
1232             </field>
1233         </record>
1234         <record id="account_move_line_graph" model="ir.ui.view">
1235             <field name="name">account.move.line.graph</field>
1236             <field name="model">account.move.line</field>
1237             <field name="arch" type="xml">
1238                 <graph string="Account Statistics" type="bar">
1239                     <field name="account_id"/>
1240                     <field name="debit" operator="+"/>
1241                     <field name="credit" operator="+"/>
1242                 </graph>
1243             </field>
1244         </record>
1245         <record id="view_account_move_line_filter" model="ir.ui.view">
1246             <field name="name">Journal Items</field>
1247             <field name="model">account.move.line</field>
1248             <field name="arch" type="xml">
1249                 <search string="Search Journal Items">
1250                     <field name="name" filter_domain="['|', ('name','ilike',self), ('ref','ilike',self)]" string="Move"/>
1251                     <field name="date"/>
1252                     <filter icon="terp-document-new" string="Unbalanced" domain="[('state','=','draft')]" help="Unbalanced Journal Items"/>
1253                     <separator/>
1254                     <filter icon="terp-document-new" string="Unposted" domain="[('move_id.state','=','draft')]" help="Unposted Journal Items"/>
1255                     <filter name="posted" icon="terp-camera_test" string="Posted" domain="[('move_id.state','=','posted')]" help="Posted Journal Items"/>
1256                     <separator/>
1257                     <filter icon="terp-dolar_ok!" string="Unreconciled" domain="[('reconcile_id','=',False), ('account_id.reconcile','=',True)]" help="Unreconciled Journal Items" name="unreconciled"/>
1258                     <separator/>
1259                     <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)]"/>
1260                     <field name="move_id" string="Number (Move)"/>
1261                     <field name="account_id"/>
1262                     <field name="partner_id"/>
1263                     <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 -->
1264                     <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 -->
1265                     <group expand="0" string="Group By">
1266                         <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
1267                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
1268                         <filter string="Account"  icon="terp-folder-green" context="{'group_by':'account_id'}"/>
1269                         <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
1270                     </group>
1271                 </search>
1272             </field>
1273         </record>
1274         <record id="action_account_moves_all_a" model="ir.actions.act_window">
1275             <field name="context">{'journal_type':'general'}</field>
1276             <field name="name">Journal Items</field>
1277             <field name="res_model">account.move.line</field>
1278             <field name="view_id" ref="view_move_line_tree"/>
1279             <field name="view_mode">tree_account_move_line_quickadd,form</field>
1280             <field name="help" type="html">
1281               <p class="oe_view_nocontent_create">
1282                 Select the period and the journal you want to fill.
1283               </p><p>
1284                 This view can be used by accountants in order to quickly record
1285                 entries in Odoo. If you want to record a supplier invoice,
1286                 start by recording the line of the expense account. Odoo
1287                 will propose to you automatically the Tax related to this
1288                 account and the counterpart "Account Payable".
1289               </p>
1290             </field>
1291         </record>
1292         <menuitem
1293             action="action_account_moves_all_a"
1294             icon="STOCK_JUSTIFY_FILL"
1295             id="menu_action_account_moves_all"
1296             parent="account.menu_finance_entries"
1297             sequence="1"
1298             groups="group_account_user"
1299         />
1300         <record id="action_account_moves_all_tree" model="ir.actions.act_window">
1301             <field name="name">Journal Items</field>
1302             <field name="res_model">account.move.line</field>
1303             <field name="context">{'search_default_partner_id': [active_id], 'default_partner_id': active_id}</field>
1304             <field name="view_id" ref="view_move_line_tree"/>
1305         </record>
1306         <record id="view_move_line_tree_reconcile" model="ir.ui.view">
1307             <field name="model">account.move.line</field>
1308             <field eval="24" name="priority"/>
1309             <field name="type">tree</field>
1310             <field name="arch" type="xml">
1311                 <tree_account_reconciliation colors="red:state == 'draft';black:state == 'valid'" string="Journal Items to Reconcile" create="false">
1312                     <field name="date"/>
1313                     <field name="move_id"/>
1314                     <field name="ref"/>
1315                     <field name="name"/>
1316                     <field name="partner_id"/>
1317                     <field name="account_id"/>
1318                     <field name="period_id" invisible="1"/>
1319                     <field name="journal_id" invisible="1"/>
1320                     <field name="reconcile_partial_id"/>
1321                     <field name="state" invisible="1"/>
1322                     <field name="debit" sum="Total debit"/>
1323                     <field name="credit" sum="Total credit"/>
1324                 </tree_account_reconciliation>
1325             </field>
1326         </record>
1327         <record id="action_account_manual_reconcile" model="ir.actions.act_window">
1328             <field name="context">{'search_default_unreconciled': 1,'view_mode':True}</field>
1329             <field name="name">Journal Items to Reconcile</field>
1330             <field name="res_model">account.move.line</field>
1331             <field name="view_id" ref="view_move_line_tree_reconcile"/>
1332             <field name="view_mode">tree_account_reconciliation</field>
1333             <field name="help" type="html">
1334                 <p>
1335                     No journal items found.
1336                 </p>
1337             </field>
1338         </record>
1339         <menuitem
1340              name="Manual Reconciliation"
1341              action="action_account_manual_reconcile"
1342              id="menu_manual_reconcile"
1343              parent="account.periodical_processing_reconciliation"/>
1344
1345         <!-- Account.Entry Edition -->
1346         <record id="view_move_tree" model="ir.ui.view">
1347             <field name="name">account.move.tree</field>
1348             <field name="model">account.move</field>
1349             <field name="arch" type="xml">
1350                 <tree colors="blue:state == 'draft';black:state == 'posted'" string="Journal Entries">
1351                     <field name="name"/>
1352                     <field name="ref"/>
1353                     <field name="date"/>
1354                     <field name="period_id"/>
1355                     <field name="journal_id"/>
1356                     <field name="partner_id"/>
1357                     <field name="amount" sum="Total Amount"/>
1358                     <field name="to_check"/>
1359                     <field name="state"/>
1360                 </tree>
1361             </field>
1362         </record>
1363         <record id="view_move_form" model="ir.ui.view">
1364             <field name="name">account.move.form</field>
1365             <field name="model">account.move</field>
1366             <field name="arch" type="xml">
1367                 <form string="Account Entry">
1368                     <header>
1369                         <button name="button_validate" states="draft" string="Post" type="object" class="oe_highlight" groups="account.group_account_invoice"/>
1370                         <button name="button_cancel" states="posted" string="Cancel Entry" type="object" groups="account.group_account_invoice"/>
1371                         <field name="state" widget="statusbar"/>
1372                     </header>
1373                     <label for="name" class="oe_edit_only" attrs="{'invisible':[('name','=','/')]}"/>
1374                     <h1>
1375                         <field name="name" readonly="True" attrs="{'invisible':[('name','=','/')]}"/>
1376                     </h1>
1377                     <group>
1378                         <group>
1379                             <field name="journal_id"/>
1380                             <field name="period_id"/>
1381                             <field name="company_id" required="1" groups="base.group_multi_company"/>
1382                             <field name="partner_id" invisible="1"/>
1383                         </group>
1384                         <group>
1385                             <field name="ref"/>
1386                             <field name="date"/>
1387                             <field name="to_check"/>
1388                             <field name="amount" invisible="1"/>
1389                         </group>
1390                     </group>
1391                     <notebook>
1392                         <page string="Journal Items">
1393                             <field name="line_id" widget="one2many_list"
1394                               context="{'line_id': line_id , 'journal_id': journal_id }">
1395                                 <form string="Journal Item">
1396                                     <group col="6" colspan="4">
1397                                         <field name="name"/>
1398                                         <field name="ref"/>
1399                                         <field name="partner_id" on_change="onchange_partner_id(False, partner_id, account_id, debit, credit, date, journal_id, context)"/>
1400
1401                                         <field name="journal_id"/>
1402                                         <field name="period_id"/>
1403                                         <field name="company_id" required="1" groups="base.group_multi_company"/>
1404                                     </group>
1405                                     <notebook colspan="4">
1406                                         <page string="Information">
1407                                             <group>
1408                                                 <group string="Amount">
1409                                                     <field name="account_id" domain="[('company_id', '=', parent.company_id), ('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
1410                                                     <field name="debit"/>
1411                                                     <field name="credit"/>
1412                                                     <field name="quantity"/>
1413                                                 </group>
1414
1415                                                 <group string="Accounting Documents">
1416                                                     <field name="invoice"/>
1417                                                     <field name="move_id" required="False"/>
1418                                                     <field name="statement_id"/>
1419                                                 </group>
1420
1421                                                 <group string="Dates">
1422                                                     <field name="date"/>
1423                                                     <field name="date_maturity"/>
1424                                                     <field name="date_created"/>
1425                                                 </group>
1426
1427                                                 <group string="Taxes">
1428                                                     <field name="tax_code_id"/>
1429                                                     <field name="tax_amount"/>
1430                                                     <field name="account_tax_id" domain="[('parent_id','=',False)]"/>
1431                                                 </group>
1432
1433                                                 <group string="Currency" groups="base.group_multi_currency">
1434                                                     <field name="currency_id"/>
1435                                                     <field name="amount_currency"/>
1436                                                 </group>
1437
1438                                                 <group string="Reconciliation">
1439                                                     <field name="reconcile_id"/>
1440                                                     <field name="reconcile_partial_id"/>
1441                                                 </group>
1442
1443                                                 <group string="States">
1444                                                     <field name="state"/>
1445                                                     <field name="blocked"/>
1446                                                 </group>
1447
1448                                                 <group groups="analytic.group_analytic_accounting" string="Analytic">
1449                                                     <field name="analytic_account_id"/>
1450                                                 </group>
1451                                             </group>
1452                                             <separator string="Internal Note"/>
1453                                             <field name="narration"/>
1454                                         </page>
1455                                         <page string="Analytic Lines" groups="analytic.group_analytic_accounting">
1456                                             <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)}"/>
1457                                         </page>
1458                                     </notebook>
1459                                 </form>
1460                                 <tree colors="blue:state == 'draft';black:state == 'posted'" editable="top" string="Journal Items">
1461                                     <field name="invoice"/>
1462                                     <field name="name"/>
1463                                     <field name="partner_id" on_change="onchange_partner_id(False, partner_id, account_id, debit, credit, parent.date, parent.journal_id, context)"/>
1464                                     <field name="account_id" domain="[('journal_id','=',parent.journal_id),('company_id', '=', parent.company_id)]"/>
1465                                     <field name="date_maturity"/>
1466                                     <field name="debit" sum="Total Debit"/>
1467                                     <field name="credit" sum="Total Credit"/>
1468                                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1469                                     <field name="amount_currency"/>
1470                                     <field name="currency_id" groups="base.group_multi_currency"/>
1471                                     <field name="tax_code_id"/>
1472                                     <field name="tax_amount"/>
1473                                     <field name="state"/>
1474                                     <field name="reconcile_id"/>
1475                                     <field name="reconcile_partial_id"/>
1476                                 </tree>
1477                             </field>
1478                             <field name="narration" colspan="4" placeholder="Add an internal note..." nolabel="1" height="50"/>
1479                         </page>
1480                     </notebook>
1481                 </form>
1482             </field>
1483         </record>
1484         <record id="view_account_move_filter" model="ir.ui.view">
1485             <field name="name">account.move.select</field>
1486             <field name="model">account.move</field>
1487             <field name="arch" type="xml">
1488                 <search string="Search Move">
1489                     <field name="name" filter_domain="['|', ('name','ilike',self), ('ref','ilike',self)]" string="Move"/>
1490                     <field name="date"/>
1491                     <filter icon="terp-document-new" string="Unposted" domain="[('state','=','draft')]" help="Unposted Journal Entries"/>
1492                     <filter icon="terp-camera_test" string="Posted" domain="[('state','=','posted')]" help="Posted Journal Entries"/>
1493                     <separator/>
1494                     <filter icon="terp-gtk-jump-to-ltr" string="To Review" domain="[('to_check','=',True)]" help="Journal Entries to Review"/>
1495                     <field name="partner_id"/>
1496                     <field name="journal_id"/>
1497                     <field name="period_id"/>
1498                     <group expand="0" string="Group By">
1499                         <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
1500                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
1501                         <filter string="States" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
1502                         <filter string="Period" icon="terp-go-month" domain="[]" context="{'group_by':'period_id'}"/>
1503                         <filter string="Entries Month" icon="terp-go-month" domain="[]" context="{'group_by':'date'}" help="Journal Entries by Month"/>
1504                     </group>
1505                 </search>
1506             </field>
1507         </record>
1508         <record id="action_move_journal_line" model="ir.actions.act_window">
1509             <field name="name">Journal Entries</field>
1510             <field name="res_model">account.move</field>
1511             <field name="view_type">form</field>
1512             <field name="view_mode">tree,form</field>
1513             <field name="view_id" ref="view_move_tree"/>
1514             <field name="search_view_id" ref="view_account_move_filter"/>
1515             <field name="help" type="html">
1516               <p class="oe_view_nocontent_create">
1517                 Click to create a journal entry.
1518               </p><p>
1519                 A journal entry consists of several journal items, each of
1520                 which is either a debit or a credit transaction.
1521               </p><p>
1522                 Odoo automatically creates one journal entry per accounting
1523                 document: invoice, refund, supplier payment, bank statements,
1524                 etc. So, you should record journal entries manually only/mainly
1525                 for miscellaneous operations.
1526               </p>
1527             </field>
1528         </record>
1529         <menuitem
1530             icon="STOCK_JUSTIFY_FILL"
1531             action="action_move_journal_line"
1532             id="menu_action_move_journal_line_form"
1533             parent="account.menu_finance_entries"
1534             groups="group_account_user"
1535             sequence="5"/>
1536
1537         <record id="action_move_line_form" model="ir.actions.act_window">
1538             <field name="name">Entries</field>
1539             <field name="type">ir.actions.act_window</field>
1540             <field name="res_model">account.move</field>
1541             <field name="view_type">form</field>
1542             <field name="view_id" ref="view_move_tree"/>
1543             <field name="search_view_id" ref="view_account_move_filter"/>
1544         </record>
1545
1546         <act_window
1547             id="act_account_move_to_account_move_line_open"
1548             name="Journal Items"
1549             context="{'search_default_move_id': active_id, 'default_move_id': active_id}"
1550             res_model="account.move.line"
1551             src_model="account.move"/>
1552
1553         <act_window
1554             domain="[('reconcile_id', '=', active_id)]"
1555             id="act_account_acount_move_line_reconcile_open"
1556             name="Reconciled entries"
1557             res_model="account.move.line"
1558             src_model="account.move.reconcile"/>
1559
1560         <!-- TODO: Print Journal (and change state), Close Journal (and verify that there is no draft Entry Lines) -->
1561         <record id="view_journal_period_tree" model="ir.ui.view">
1562             <field name="name">account.journal.period.tree</field>
1563             <field name="model">account.journal.period</field>
1564             <field name="arch" type="xml">
1565                 <tree colors="blue:state == 'draft';gray:state == 'done';black:state == 'printed'" string="Journals">
1566                     <field icon="icon" name="fiscalyear_id"/>
1567                     <field name="period_id"/>
1568                     <field name="journal_id"/>
1569                     <field name="state"/>
1570                     <field name="company_id" groups="base.group_multi_company"/>
1571                 </tree>
1572             </field>
1573         </record>
1574         <record id="action_account_journal_period_tree" model="ir.actions.act_window">
1575             <field name="name">Journals</field>
1576             <field name="res_model">account.journal.period</field>
1577             <field name="view_type">tree</field>
1578         </record>
1579
1580         <!-- Account Models -->
1581         <record id="view_model_line_tree" model="ir.ui.view">
1582             <field name="name">account.model.line.tree</field>
1583             <field name="model">account.model.line</field>
1584             <field name="arch" type="xml">
1585                 <tree string="Journal Entry Model Line" editable="bottom">
1586                     <field name="sequence"/>
1587                     <field name="name"/>
1588                     <field name="account_id" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation'), ('company_id', '=', parent.company_id)]"/>
1589                     <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1590                     <field name="partner_id"/>
1591                     <field name="debit"/>
1592                     <field name="credit"/>
1593                     <field name="date_maturity"/>
1594                 </tree>
1595             </field>
1596         </record>
1597         <record id="view_model_line_form" model="ir.ui.view">
1598             <field name="name">account.model.line.form</field>
1599             <field name="model">account.model.line</field>
1600             <field name="arch" type="xml">
1601                 <form string="Journal Entry Model Line">
1602                     <group col="4">
1603                         <field colspan="4" name="name"/>
1604                         <field name="sequence"/>
1605                         <field name="account_id" domain="[('type','&lt;&gt;','view'), ('type','&lt;&gt;','consolidation'), ('company_id', '=', parent.company_id)]"/>
1606                         <field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
1607                         <field name="partner_id"/>
1608                         <field name="debit"/>
1609                         <field name="credit"/>
1610                         <field name="quantity"/>
1611                         <field name="date_maturity"/>
1612                     </group>
1613                 </form>
1614             </field>
1615         </record>
1616         <record id="view_model_form" model="ir.ui.view">
1617             <field name="name">account.model.form</field>
1618             <field name="model">account.model</field>
1619             <field name="arch" type="xml">
1620                 <form string="Journal Entry Model">
1621                     <group col="4">
1622                         <field name="name"/>
1623                         <field name="journal_id" on_change="onchange_journal_id(journal_id)"/>
1624                         <field name="company_id" widget="selection" groups="base.group_multi_company"/>
1625                     </group>
1626
1627                     <field name="lines_id" widget="one2many_list"/>
1628                     <separator string="Legend"/>
1629                     <field name="legend"/>
1630                     <button name="%(action_account_use_model_create_entry)d" string="Create entries" type="action" icon="gtk-execute"/>
1631                 </form>
1632             </field>
1633         </record>
1634         <record id="view_model_tree" model="ir.ui.view">
1635             <field name="name">account.model.tree</field>
1636             <field name="model">account.model</field>
1637             <field name="arch" type="xml">
1638                 <tree string="Journal Entry Model">
1639                     <field name="name"/>
1640                     <field name="journal_id"/>
1641                     <field name="company_id" groups="base.group_multi_company"/>
1642                 </tree>
1643             </field>
1644         </record>
1645         <record id="view_model_search" model="ir.ui.view">
1646             <field name="name">account.model.search</field>
1647             <field name="model">account.model</field>
1648             <field name="arch" type="xml">
1649                 <search string="Journal Entry Model">
1650                     <field name="name" string="Journal Entry Model"/>
1651                     <filter string="Sale" icon="terp-camera_test" domain="[('journal_id.type', '=', 'sale')]"/>
1652                     <filter string="Purchase" icon="terp-purchase" domain="[('journal_id.type', '=', 'purchase')]"/>
1653                     <field name="journal_id"/>
1654                     <field name="company_id" groups="base.group_multi_company"/>
1655                     <group expand="0" string="Group By">
1656                         <filter string="Journal" icon="terp-folder-orange" domain="[]" context="{'group_by':'journal_id'}"/>
1657                     </group>
1658                 </search>
1659             </field>
1660         </record>
1661
1662         <record id="action_model_form" model="ir.actions.act_window">
1663             <field name="name">Recurring Models</field>
1664             <field name="res_model">account.model</field>
1665             <field name="view_type">form</field>
1666             <field name="view_mode">tree,form</field>
1667             <field name="search_view_id" ref="view_model_search"/>
1668         </record>
1669         <menuitem
1670             action="action_model_form" name="Models" id="menu_action_model_form" sequence="5"
1671             parent="account.menu_configuration_recurrent_entries"/>
1672
1673         <!-- Payment Terms -->
1674         <record id="view_payment_term_line_tree" model="ir.ui.view">
1675             <field name="name">account.payment.term.line.tree</field>
1676             <field name="model">account.payment.term.line</field>
1677             <field name="arch" type="xml">
1678                 <tree string="Payment Term">
1679                     <field name="value"/>
1680                     <field name="value_amount" attrs="{'readonly':[('value','=','balance')]}"/>
1681                     <field name="days"/>
1682                     <field name="days2"/>
1683                 </tree>
1684             </field>
1685         </record>
1686         <record id="view_payment_term_line_form" model="ir.ui.view">
1687             <field name="name">account.payment.term.line.form</field>
1688             <field name="model">account.payment.term.line</field>
1689             <field name="arch" type="xml">
1690                 <form string="Payment Term">
1691                     <group>
1692                         <group string="Amount Computation">
1693                             <field name="value" widget="radio" nolabel="1" colspan="4"/>
1694                             <label for="value_amount" string="Amount To Pay"  attrs="{'invisible':[('value','=','balance')]}"/>
1695                             <div attrs="{'invisible':[('value','=','balance')]}">
1696                                 <field name="value_amount" class="oe_inline"/>
1697                             </div>
1698                         </group>
1699                         <group string="Due Date Computation">
1700                             <field name="days"/>
1701                             <field name="days2"/>
1702                         </group>
1703                     </group>
1704                 </form>
1705             </field>
1706         </record>
1707         <record id="view_payment_term_search" model="ir.ui.view">
1708             <field name="name">account.payment.term.search</field>
1709             <field name="model">account.payment.term</field>
1710             <field name="arch" type="xml">
1711                 <search string="Payment Term">
1712                     <field name="name" string="Payment Term"/>
1713                     <field name="active"/>
1714                 </search>
1715             </field>
1716         </record>
1717         <record id="view_payment_term_form" model="ir.ui.view">
1718             <field name="name">account.payment.term.form</field>
1719             <field name="model">account.payment.term</field>
1720             <field name="arch" type="xml">
1721                 <form string="Payment Term">
1722                     <group col="4">
1723                         <field name="name"/>
1724                         <field name="active"/>
1725                     </group>
1726                     <label for="note"/>
1727                     <field name="note" placeholder="Payment term explanation for the customer..."/>
1728                     <separator string="Computation"/>
1729                     <field name="line_ids"/>
1730                 </form>
1731             </field>
1732         </record>
1733         <record id="action_payment_term_form" model="ir.actions.act_window">
1734             <field name="name">Payment Terms</field>
1735             <field name="res_model">account.payment.term</field>
1736             <field name="view_type">form</field>
1737             <field name="view_mode">tree,form</field>
1738             <field name="search_view_id" ref="view_payment_term_search"/>
1739         </record>
1740         <menuitem id="account_followup_main_menu" parent="menu_finance_configuration" name="Follow-ups" sequence="6"/>
1741
1742         <menuitem action="action_payment_term_form"
1743             id="menu_action_payment_term_form" parent="account_followup_main_menu" sequence="0"/>
1744
1745         <!-- Account Subscriptions -->
1746         <record id="view_subscription_line_form" model="ir.ui.view">
1747             <field name="name">account.subscription.line.form</field>
1748             <field name="model">account.subscription.line</field>
1749             <field name="arch" type="xml">
1750                 <form string="Subscription lines">
1751                     <group>
1752                         <field name="date"/>
1753                         <field name="move_id"/>
1754                     </group>
1755                 </form>
1756             </field>
1757         </record>
1758         <record id="view_subscription_line_tree" model="ir.ui.view">
1759             <field name="name">account.subscription.line.tree</field>
1760             <field name="model">account.subscription.line</field>
1761             <field name="arch" type="xml">
1762                 <tree string="Subscription lines">
1763                     <field name="date"/>
1764                     <field name="move_id"/>
1765                 </tree>
1766             </field>
1767         </record>
1768         <record id="view_subscription_tree" model="ir.ui.view">
1769             <field name="name">account.subscription.tree</field>
1770             <field name="model">account.subscription</field>
1771             <field name="arch" type="xml">
1772                 <tree colors="blue:state == 'draft';gray:state == 'done';black:state == 'running'" string="Entry Subscription">
1773                     <field name="name"/>
1774                     <field name="model_id"/>
1775                     <field name="ref"/>
1776                     <field name="date_start"/>
1777                     <field name="state"/>
1778                 </tree>
1779             </field>
1780         </record>
1781         <record id="view_subscription_search" model="ir.ui.view">
1782             <field name="name">account.subscription.search</field>
1783             <field name="model">account.subscription</field>
1784             <field name="arch" type="xml">
1785                 <search string="Entry Subscription">
1786                     <field name="name" string="Account Subscription"/>
1787                     <field name="date_start"/>
1788                     <filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Subscription"/>
1789                     <filter icon="terp-camera_test" string="Running" domain="[('state','=','running')]" help="Running Subscription"/>
1790                     <field name="model_id"/>
1791                     <group expand="0" string="Group By">
1792                         <filter string="Model" icon="terp-folder-orange" domain="[]" context="{'group_by':'model_id'}"/>
1793                         <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
1794                     </group>
1795                 </search>
1796             </field>
1797         </record>
1798         <record id="view_subscription_form" model="ir.ui.view">
1799             <field name="name">account.subscription.form</field>
1800             <field name="model">account.subscription</field>
1801             <field name="arch" type="xml">
1802                 <form string="Recurring">
1803                     <header>
1804                         <button name="state_draft" states="done" string="Set to Draft" type="object"  icon="gtk-convert" />
1805                         <button name="compute" states="draft" string="Compute" type="object" icon="terp-stock_format-scientific" class="oe_highlight"/>
1806                         <button name="remove_line" states="running" string="Remove Lines" type="object" icon="gtk-remove" class="oe_highlight"/>
1807                         <field name="state" widget="statusbar" statusbar_visible="draft,running,done"/>
1808                     </header>
1809                     <sheet>
1810                         <group>
1811                             <group>
1812                                 <field name="name"/>
1813                                 <field name="model_id"/>
1814                                 <field name="ref"/>
1815                             </group>
1816                             <group>
1817                                 <field name="date_start"/>
1818                                 <field name="period_type"/>
1819                                 <field name="period_nbr"/>
1820                                 <field name="period_total"/>
1821                             </group>
1822                         </group>
1823                         <separator string="Subscription Lines"/>
1824                         <field name="lines_id" widget="one2many_list"/>
1825                     </sheet>
1826                 </form>
1827             </field>
1828         </record>
1829         <record id="action_subscription_form" model="ir.actions.act_window">
1830             <field name="name">Recurring Lines</field>
1831             <field name="res_model">account.subscription</field>
1832             <field name="view_type">form</field>
1833             <field name="view_mode">tree,form</field>
1834             <field name="search_view_id" ref="view_subscription_search"/>
1835             <field name="help" type="html">
1836               <p class="oe_view_nocontent_create">
1837                 Click to define a new recurring entry.
1838               </p><p>
1839                 A recurring entry occurs on a recurrent basis from a specific
1840                 date, i.e. corresponding to the signature of a contract or an
1841                 agreement with a customer or a supplier. You can create such
1842                 entries to automate the postings in the system.
1843               </p>
1844             </field>
1845         </record>
1846         <menuitem
1847             name="Define Recurring Entries" action="action_subscription_form"
1848             id="menu_action_subscription_form" sequence="1"
1849             parent="account.menu_configuration_recurrent_entries"/>
1850
1851         <record id="action_subscription_form_running" model="ir.actions.act_window">
1852             <field name="name">Running Subscriptions</field>
1853             <field name="res_model">account.subscription</field>
1854             <field name="view_type">form</field>
1855             <field name="view_mode">tree,form</field>
1856             <field name="domain">[('state','=','running')]</field>
1857             <field name="filter" eval="True"/>
1858         </record>
1859
1860         <record id="action_subscription_form_new" model="ir.actions.act_window">
1861             <field name="name">New Subscription</field>
1862             <field name="res_model">account.subscription</field>
1863             <field name="view_type">form</field>
1864             <field name="view_mode">form,tree</field>
1865             <field name="view_id" ref="view_subscription_form"/>
1866         </record>
1867
1868         <record id="view_subscription_line_form_complete" model="ir.ui.view">
1869             <field name="name">account.subscription.line.form</field>
1870             <field name="model">account.subscription.line</field>
1871             <field eval="20" name="priority"/>
1872             <field name="arch" type="xml">
1873                 <form string="Subscription lines">
1874                     <group col="4">
1875                         <field name="subscription_id"/>
1876                         <field name="date"/>
1877                         <field name="move_id"/>
1878                     </group>
1879                 </form>
1880             </field>
1881         </record>
1882
1883         <!-- Account Templates -->
1884
1885         <menuitem
1886             id="account_template_taxes"
1887             name="Templates"
1888             parent="next_id_27"
1889             sequence="4"/>
1890
1891         <record id="view_account_template_form" model="ir.ui.view">
1892             <field name="name">account.account.template.form</field>
1893             <field name="model">account.account.template</field>
1894             <field name="arch" type="xml">
1895                 <form string="Account Template">
1896                     <group col="4">
1897                         <field name="name"/>
1898                         <field name="code"/>
1899                         <newline/>
1900                         <field name="parent_id"/>
1901                         <field name="shortcut"/>
1902                         <field name="type"/>
1903                         <field name="user_type"/>
1904
1905                         <field name="currency_id" groups="base.group_multi_currency"/>
1906                         <field name="reconcile"/>
1907                         <field name="chart_template_id"/>
1908                     </group>
1909                     <separator string="Default Taxes"/>
1910                     <field name="tax_ids"/>
1911                     <separator string="Notes"/>
1912                     <field name="note" placeholder="Internal notes..."/>
1913                 </form>
1914             </field>
1915         </record>
1916         <record id="view_account_template_tree" model="ir.ui.view">
1917             <field name="name">account.account.template.tree</field>
1918             <field name="model">account.account.template</field>
1919             <field name="arch" type="xml">
1920                 <tree string="Account Template">
1921                     <field name="code"/>
1922                     <field name="name"/>
1923                     <field name="type" invisible="1"/>
1924                     <field name="user_type" invisible="1"/>
1925                 </tree>
1926             </field>
1927         </record>
1928         <record id="view_account_template_search" model="ir.ui.view">
1929             <field name="name">account.account.template.search</field>
1930             <field name="model">account.account.template</field>
1931             <field name="arch" type="xml">
1932                 <search string="Search Account Templates">
1933                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Account Template"/>
1934                     <filter icon="terp-sale" string="Receivable Accounts" domain="[('type','=','receivable')]"/>
1935                     <filter icon="terp-purchase" string="Payable Accounts" domain="[('type','=','payable')]"/>
1936                     <field name="parent_id"/>
1937                     <field name="user_type"/>
1938                     <field name="type"/>
1939                     <group expand="0" string="Group By">
1940                         <filter string="Internal Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
1941                         <filter string="Account Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'user_type'}"/>
1942                    </group>
1943                 </search>
1944             </field>
1945         </record>
1946         <record id="action_account_template_form" model="ir.actions.act_window">
1947             <field name="name">Account Templates</field>
1948             <field name="res_model">account.account.template</field>
1949             <field name="view_type">form</field>
1950             <field name="view_mode">tree,form</field>
1951             <field name="search_view_id" ref="view_account_template_search"/>
1952         </record>
1953         <menuitem action="action_account_template_form" id="menu_action_account_template_form" parent="account_template_folder" 
1954         sequence="2"/>
1955
1956         <record id="view_account_addtmpl_wizard_form" model="ir.ui.view">
1957             <field name="name">Create Account</field>
1958             <field name="model">account.addtmpl.wizard</field>
1959             <field name="arch" type="xml">
1960                 <form string="Create Account">
1961                     <header>
1962                         <button icon="gtk-ok" name="action_create" string="Add" type="object" class="oe_highlight"  />
1963                     </header>
1964                     <separator col="4" colspan="4" string="Create an Account Based on this Template"/>
1965                     <field name="cparent_id"/>
1966                 </form>
1967             </field>
1968         </record>
1969
1970         <act_window domain="[]" id="action_account_addtmpl_wizard_form"
1971             name="Create Account"
1972             target="new"
1973             res_model="account.addtmpl.wizard"
1974             context="{'tmpl_ids': active_id}"
1975             src_model="account.account.template"
1976             view_type="form" view_mode="form"/>
1977
1978
1979         <!-- Chart of Accounts Templates -->
1980         <record id="view_account_chart_template_form" model="ir.ui.view">
1981             <field name="name">account.chart.template.form</field>
1982             <field name="model">account.chart.template</field>
1983             <field name="arch" type="xml">
1984                 <form string="Chart of Accounts Template">
1985                     <group col="4">
1986                         <field name="name"/>
1987                         <field name="account_root_id" attrs="{'required': [('parent_id', '=', False)]}"/>
1988                         <field name="bank_account_view_id" attrs="{'required': [('parent_id', '=', False)]}"/>
1989                         <field name="tax_code_root_id" attrs="{'required': [('parent_id', '=', False)]}"/>
1990                         <field name="parent_id" />
1991                         <!--<field name="code_digits" />-->
1992                         <field name="visible" />
1993                         <field name="complete_tax_set" />
1994                     </group>
1995                     <separator string="Default Taxes" colspan="4"/>
1996                     <field name="tax_template_ids" colspan="4"  nolabel="1"/>
1997                     <separator string="Properties" colspan="4"/>
1998                     <group col="4">
1999                         <field name="property_account_receivable" domain="[('id', 'child_of', [account_root_id])]"/>
2000                         <field name="property_account_payable" domain="[('id', 'child_of', [account_root_id])]"/>
2001                         <field name="property_account_expense_categ" domain="[('id', 'child_of', [account_root_id])]"/>
2002                         <field name="property_account_income_categ" domain="[('id', 'child_of', [account_root_id])]" />
2003                         <field name="property_account_expense" domain="[('id', 'child_of', [account_root_id])]"/>
2004                         <field name="property_account_income" domain="[('id', 'child_of', [account_root_id])]"/>
2005                         <field name="property_account_income_opening" domain="[('id', 'child_of', [account_root_id])]"/>
2006                         <field name="property_account_expense_opening" domain="[('id', 'child_of', [account_root_id])]"/>
2007                     </group>
2008                 </form>
2009             </field>
2010         </record>
2011         <record id="view_account_chart_template_seacrh" model="ir.ui.view">
2012             <field name="name">account.chart.template.search</field>
2013             <field name="model">account.chart.template</field>
2014             <field name="arch" type="xml">
2015                 <search string="Search Chart of Account Templates">
2016                     <field name="name" string="Account Template"/>
2017                     <field name="account_root_id"/>
2018                     <field name="bank_account_view_id"/>
2019                     <group expand="0" string="Group By">
2020                         <filter string="Root Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'account_root_id'}"/>
2021                         <filter string="Bank Account" icon="terp-folder-orange" domain="[]" context="{'group_by':'bank_account_view_id'}"/>
2022                         <filter string="Receivable Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_receivable'}"/>
2023                         <filter string="Payable Account" icon="terp-purchase" domain="[]" context="{'group_by':'property_account_payable'}"/>
2024                         <filter string="Income Account" icon="terp-sale" domain="[]" context="{'group_by':'property_account_income_categ'}"/>
2025                         <filter string="Expense Account" icon="terp-purchase" domain="[]" context="{'group_by':'property_account_expense_categ'}"/>
2026                     </group>
2027                 </search>
2028             </field>
2029         </record>
2030         <record id="view_account_chart_template_tree" model="ir.ui.view">
2031             <field name="name">account.chart.template.tree</field>
2032             <field name="model">account.chart.template</field>
2033             <field name="arch" type="xml">
2034                 <tree string="Chart of Accounts Template">
2035                     <field name="name"/>
2036                     <field name="account_root_id"/>
2037                     <field name="tax_code_root_id"/>
2038                     <field name="bank_account_view_id"/>
2039                     <field name="property_account_receivable" invisible="1"/>
2040                     <field name="property_account_payable" invisible="1"/>
2041                     <field name="property_account_expense_categ" invisible="1"/>
2042                     <field name="property_account_income_categ" invisible="1"/>
2043                 </tree>
2044             </field>
2045         </record>
2046         <record id="action_account_chart_template_form" model="ir.actions.act_window">
2047             <field name="name">Chart of Accounts Templates</field>
2048             <field name="res_model">account.chart.template</field>
2049             <field name="view_type">form</field>
2050             <field name="view_mode">tree,form</field>
2051         </record>
2052         <menuitem action="action_account_chart_template_form" id="menu_action_account_chart_template_form" parent="account_template_folder" sequence="1"/>
2053
2054         <!-- Account Tax Templates -->
2055         <record id="view_account_tax_template_form" model="ir.ui.view">
2056             <field name="name">account.tax.template.form</field>
2057             <field name="model">account.tax.template</field>
2058             <field name="arch" type="xml">
2059                 <form string="Account Tax Template">
2060                     <group col="4">
2061                         <field name="name"/>
2062                         <field name="description"/>
2063                         <field name="chart_template_id"/>
2064                         <field name="type"/>
2065                         <field name="type_tax_use"/>
2066                         <field name="price_include"/>
2067                     </group>
2068                     <notebook>
2069                         <page string="Tax Definition">
2070                             <group col="4">
2071                                 <field name="applicable_type"/>
2072                                 <field name="amount" attrs="{'readonly':[('type','=','none'),('type','=','code')]}"/>
2073                                 <field name="include_base_amount"/>
2074                                 <field name="domain"/>
2075                                 <newline/>
2076                                 <field name="account_collected_id"/>
2077                                 <label colspan="2" string="Keep empty to use the income account"/>
2078                                 <field name="account_paid_id"/>
2079                                 <label colspan="2" string="Keep empty to use the expense account"/>
2080                                 <field name="child_depend"/>
2081                                 <field name="sequence"/>
2082                             </group>
2083                         </page>
2084                         <page string="Tax Declaration">
2085                             <group col="4">
2086                                 <separator colspan="4" string="Invoices"/>
2087                                 <field name="base_code_id"/>
2088                                 <field name="base_sign"/>
2089                                 <field name="tax_code_id"/>
2090                                 <field name="tax_sign"/>
2091
2092                                 <separator colspan="4" string="Credit Notes"/>
2093                                 <field name="ref_base_code_id"/>
2094                                 <field name="ref_base_sign"/>
2095                                 <field name="ref_tax_code_id"/>
2096                                 <field name="ref_tax_sign"/>
2097                             </group>
2098                         </page>
2099                         <page string="Special Computation">
2100                             <separator string="Compute Code (if type=code)"/>
2101                             <field name="python_compute" attrs="{'readonly':[('type','!=','code')]}"/>
2102                             <separator string="Compute Code for Taxes Included Prices"/>
2103                             <field name="python_compute_inv"/>
2104                             <separator string="Applicable Code (if type=code)"/>
2105                             <field name="python_applicable" attrs="{'readonly':[('applicable_type','=','true')]}"/>
2106                         </page>
2107                     </notebook>
2108                 </form>
2109             </field>
2110         </record>
2111         <record id="view_account_tax_template_tree" model="ir.ui.view">
2112             <field name="name">account.tax.template.tree</field>
2113             <field name="model">account.tax.template</field>
2114             <field name="arch" type="xml">
2115                 <tree string="Account Tax Template">
2116                     <field name="name" />
2117                     <field name="description"/>
2118                 </tree>
2119             </field>
2120         </record>
2121         <record id="view_account_tax_template_search" model="ir.ui.view">
2122             <field name="name">account.tax.template.search</field>
2123             <field name="model">account.tax.template</field>
2124             <field name="arch" type="xml">
2125                 <search string="Search Tax Templates">
2126                     <field name="name" filter_domain="['|', ('name','ilike',self), ('description','ilike',self)]" string="Tax Template"/>
2127                     <filter icon="terp-sale" string="Sale" domain="[('type_tax_use','=','sale')]" help="Taxes used in Sales"/>
2128                     <filter icon="terp-purchase" string="Purchase" domain="[('type_tax_use','=','purchase')]" help="Taxes used in Purchases"/>
2129                     <field name="chart_template_id"/>
2130                 </search>
2131             </field>
2132         </record>
2133         <record id="action_account_tax_template_form" model="ir.actions.act_window">
2134             <field name="name">Tax Templates</field>
2135             <field name="res_model">account.tax.template</field>
2136             <field name="view_type">form</field>
2137             <field name="view_mode">tree,form</field>
2138             <field name="search_view_id" ref="view_account_tax_template_search"/>
2139         </record>
2140         <menuitem action="action_account_tax_template_form" id="menu_action_account_tax_template_form" parent="account_template_taxes" sequence="13"/>
2141
2142         <!-- Account Tax Code Templates -->
2143         <record id="view_tax_code_template_tree" model="ir.ui.view">
2144             <field name="name">account.tax.code.template.tree</field>
2145             <field name="model">account.tax.code.template</field>
2146             <field name="field_parent">child_ids</field>
2147             <field name="arch" type="xml">
2148                 <tree string="Account Tax Code Template" toolbar="1">
2149                     <field name="name"/>
2150                     <field name="code"/>
2151                     <field name="parent_id" invisible="1"/>
2152                 </tree>
2153             </field>
2154         </record>
2155         <record id="view_tax_code_template_search" model="ir.ui.view">
2156             <field name="name">account.tax.code.template.search</field>
2157             <field name="model">account.tax.code.template</field>
2158             <field name="arch" type="xml">
2159                 <search string="Search tax template">
2160                     <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Tax Template"/>
2161                     <field name="parent_id"/>
2162                     <group expand="0" string="Group By">
2163                         <filter string="Parent Code" icon="terp-folder-orange" domain="[]" context="{'group_by':'parent_id'}"/>
2164                     </group>
2165                 </search>
2166             </field>
2167         </record>
2168         <record id="view_tax_code_template_form" model="ir.ui.view">
2169             <field name="name">account.tax.code.template.form</field>
2170             <field name="model">account.tax.code.template</field>
2171             <field name="arch" type="xml">
2172                 <form string="Account Tax Code Template">
2173                     <group col="4">
2174                         <field name="name"/>
2175                         <field name="code"/>
2176                         <field name="parent_id"/>
2177                         <field name="sign"/>
2178                     </group>
2179                     <separator string="Description"/>
2180                     <field name="info"/>
2181                 </form>
2182             </field>
2183         </record>
2184         <record id="action_account_tax_code_template_form" model="ir.actions.act_window">
2185             <field name="name">Tax Code</field>
2186             <field name="res_model">account.tax.code.template</field>
2187             <field name="view_type">form</field>
2188             <field name="view_mode">tree,form</field>
2189             <field name="search_view_id" ref="view_tax_code_template_search"/>
2190         </record>
2191         <menuitem action="action_account_tax_code_template_form" id="menu_action_account_tax_code_template_form" parent="account_template_taxes" sequence="14"/>
2192
2193
2194         <!--  Wizard for Multi Charts of Accounts -->
2195         <record id="view_wizard_multi_chart" model="ir.ui.view">
2196             <field name="name">Set Your Accounting Options</field>
2197             <field name="model">wizard.multi.charts.accounts</field>
2198             <field name="inherit_id" ref="base.res_config_view_base"/>
2199             <field name="arch" type="xml">
2200                 <form position="attributes">
2201                     <attribute name="string">Accounting Application Configuration</attribute>
2202                 </form>
2203                 <group string="res_config_contents" position="replace">
2204                     <field name="only_one_chart_template" invisible="1"/>
2205                     <field name="complete_tax_set" invisible="1"/>
2206                     <group col="1">
2207                         <group attrs="{'invisible': [('only_one_chart_template','=',True)]}">
2208                             <field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
2209                         </group>
2210                         <group>
2211                             <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 -->
2212                             <field name="currency_id" class="oe_inline"/>
2213                             <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'))]"/>
2214                             <label for="sale_tax_rate" string="Sale Tax" attrs="{'invisible': [('complete_tax_set', '=', True)]}"/>
2215                             <div attrs="{'invisible': [('complete_tax_set', '=', True)]}">
2216                                 <field name="sale_tax_rate" class="oe_inline" on_change="onchange_tax_rate(sale_tax_rate)"/> %%
2217                             </div>
2218                             <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'))]"/>
2219                             <label for="purchase_tax_rate" string="Purchase Tax" attrs="{'invisible': [('complete_tax_set', '=', True)]}"/>
2220                             <div attrs="{'invisible': [('complete_tax_set', '=', True)]}">
2221                                 <field name="purchase_tax_rate" class="oe_inline"/> %%
2222                             </div>
2223                         </group>
2224                         <group groups="account.group_account_user">
2225                             <field name="code_digits"/>
2226                         </group>
2227                     </group>
2228                 </group>
2229             </field>
2230         </record>
2231         <record id="action_wizard_multi_chart" model="ir.actions.act_window">
2232             <field name="name">Set Your Accounting Options</field>
2233             <field name="type">ir.actions.act_window</field>
2234             <field name="res_model">wizard.multi.charts.accounts</field>
2235             <field name="view_id" ref="view_wizard_multi_chart"/>
2236             <field name="view_type">form</field>
2237             <field name="view_mode">form</field>
2238             <field name="target">new</field>
2239         </record>
2240
2241         <record id="account_account_graph" model="ir.ui.view">
2242             <field name="name">account.account.graph</field>
2243             <field name="model">account.account</field>
2244             <field name="arch" type="xml">
2245                 <graph string="Account Statistics" type="bar">
2246                     <field name="name"/>
2247                     <field name="balance" operator="+"/>
2248                 </graph>
2249             </field>
2250          </record>
2251
2252          <!-- Fiscal Position Templates -->
2253
2254         <record id="view_account_position_template_search" model="ir.ui.view">
2255             <field name="name">account.fiscal.position.template.search</field>
2256             <field name="model">account.fiscal.position.template</field>
2257             <field name="arch" type="xml">
2258                 <search string="Fiscal Position">
2259                     <field name="name" string="Fiscal Position Template"/>
2260                 </search>
2261             </field>
2262         </record>
2263
2264         <record id="view_account_position_template_form" model="ir.ui.view">
2265             <field name="name">account.fiscal.position.template.form</field>
2266             <field name="model">account.fiscal.position.template</field>
2267             <field name="arch" type="xml">
2268                 <form string="Fiscal Position Template">
2269                     <group col="4">
2270                         <field name="name"/>
2271                         <field name="chart_template_id"/>
2272                     </group>
2273                     <field name="tax_ids">
2274                         <tree string="Taxes Mapping" editable="bottom">
2275                             <field name="tax_src_id" domain="[('parent_id','=',False)]"/>
2276                             <field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
2277                         </tree>
2278                         <form string="Taxes Mapping">
2279                             <field name="tax_src_id" domain="[('parent_id','=',False)]"/>
2280                             <field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
2281                         </form>
2282                     </field>
2283                     <field name="account_ids">
2284                         <tree string="Accounts Mapping" editable="bottom">
2285                             <field name="account_src_id"/>
2286                             <field name="account_dest_id"/>
2287                         </tree>
2288                         <form string="Accounts Mapping">
2289                             <field name="account_src_id"/>
2290                             <field name="account_dest_id"/>
2291                         </form>
2292                     </field>
2293                 </form>
2294             </field>
2295         </record>
2296         <record id="view_account_position_template_tree" model="ir.ui.view">
2297             <field name="name">account.fiscal.position.template.tree</field>
2298             <field name="model">account.fiscal.position.template</field>
2299             <field name="arch" type="xml">
2300                 <tree string="Fiscal Position">
2301                     <field name="name"/>
2302                 </tree>
2303             </field>
2304         </record>
2305
2306         <record id="action_account_fiscal_position_template_form" model="ir.actions.act_window">
2307             <field name="name">Fiscal Position</field>
2308             <field name="res_model">account.fiscal.position.template</field>
2309             <field name="view_type">form</field>
2310             <field name="view_mode">tree,form</field>
2311             <field name="search_view_id" ref="view_account_position_template_search"/>
2312         </record>
2313
2314         <menuitem
2315             action="action_account_fiscal_position_template_form"
2316             id="menu_action_account_fiscal_position_form_template"
2317             parent="account_template_taxes" sequence="20"/>
2318
2319         <!-- Cash Statement -->
2320         <record id="view_cash_statement_tree" model="ir.ui.view">
2321             <field name="name">account.bank.statement.tree</field>
2322             <field name="model">account.bank.statement</field>
2323             <field name="arch" type="xml">
2324                 <tree colors="red:balance_end_real!=balance_end;blue:state=='draft' and (balance_end_real==balance_end);black:state == 'open'" string="Statement">
2325                     <field name="name"/>
2326                     <field name="date"/>
2327                     <field name="period_id"/>
2328                     <field name="journal_id"/>
2329                     <field name="balance_start"/>
2330                     <field name="balance_end_real"/>
2331                     <field name="balance_end" invisible="1" />
2332                     <field name="state"/>
2333                 </tree>
2334             </field>
2335         </record>
2336         <record id="view_bank_statement_form2" model="ir.ui.view">
2337             <field name="name">account.bank.statement.form</field>
2338             <field name="model">account.bank.statement</field>
2339             <field name="priority">2</field>
2340             <field name="arch" type="xml">
2341                 <form string="Statement">
2342                 <header>
2343                     <field name="all_lines_reconciled" invisible="1" />
2344                     <span attrs="{'invisible':['|',('all_lines_reconciled','=',True),('line_ids','=',[])]}">
2345                         <button name="%(action_bank_reconcile_bank_statements)d" states="open" string="Reconcile" type="action" class="oe_highlight"/>
2346                     </span>
2347                     <span attrs="{'invisible':[('all_lines_reconciled','=',False)]}">
2348                         <button name="button_confirm_cash" states="open" string="Close CashBox" type="object" class="oe_highlight"/>
2349                     </span>
2350                     <button name="button_open" states="draft" string="Open CashBox" type="object" class="oe_highlight"/>
2351                     <button name="button_cancel" states="confirm,open" string="Cancel CashBox" type="object"/>
2352                     <field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,confirm"/>
2353                 </header>
2354                 <sheet string="Statement">
2355                     <label for="name" class="oe_edit_only" attrs="{'invisible':[('name','=','/')]}"/>
2356                     <h1><field name="name" class="oe_inline" attrs="{'invisible':[('name','=','/')]}"/></h1>
2357                     <group>
2358                         <group>
2359                             <field name="journal_id" on_change="onchange_journal_id(journal_id)" widget="selection" domain="[('type', '=', 'cash')]" />
2360                             <field name="user_id" attrs="{'readonly':[('state','!=','draft')]}" string="Responsible"/>
2361                             <field name='company_id' widget="selection" groups="base.group_multi_company" />
2362                         </group>
2363                         <group>
2364                             <field name="date" attrs="{'readonly':[('state','!=','draft')]}"  on_change="onchange_date(date, company_id)"/>
2365                             <field name="closing_date" readonly="1"/>
2366                             <field name="period_id" class="oe_inline"/>
2367                             <field name="currency" invisible="1"/>
2368                             <field name="cash_control" invisible="1"/>
2369                         </group>
2370                     </group>
2371                     <notebook>
2372                         <page string="Cash Transactions" attrs="{'invisible': [('state','=','draft')]}">
2373                             <field name="line_ids" context="{'date':date}">
2374                                 <tree editable="bottom" string="Statement lines">
2375                                     <field name="sequence" invisible="1"/>
2376                                     <field name="date"/>
2377                                     <field name="name"/>
2378                                     <field name="ref"/>
2379                                     <field name="partner_id"/>
2380                                     <field name="amount"/>
2381                                 </tree>
2382                                 <form string="Statement lines">
2383                                     <group col="4">
2384                                         <field name="date"/>
2385                                         <field name="name"/>
2386                                         <field name="ref"/>
2387                                         <field name="partner_id"/>
2388                                         <field name="amount"/>
2389                                         <field name="sequence"/>
2390                                     </group>
2391                                     <separator string="Notes"/>
2392                                     <field name="note"/>
2393                                 </form>
2394                             </field>
2395                         </page>
2396                         <page string="Cash Control" attrs="{'invisible' : [('cash_control', '=', False)]}">
2397                             <group col="2" expand="1">
2398                                 <group string="Opening Cash Control" attrs="{'invisible' : [('state', '!=', 'draft')]}">
2399                                     <field name="opening_details_ids" colspan="2" nolabel="1">
2400                                         <tree string="Opening Cashbox Lines" editable="bottom">
2401                                             <field name="pieces"/>
2402                                             <field name="number_opening" on_change="on_change_sub_opening(pieces, number_opening)" />
2403                                             <field name="subtotal_opening" string="Opening Subtotal" sum="Total"/>
2404                                         </tree>
2405                                     </field>
2406                                 </group>
2407                                 <group>
2408                                     <group string="Opening Cash Control" attrs="{'invisible' : [('state', '=', 'draft')]}">
2409                                         <field name="details_ids" colspan="2" nolabel="1" attrs="{'readonly' : [('state', '!=', 'draft')]}">
2410                                             <tree string="Opening Cashbox Lines" editable="bottom">
2411                                                 <field name="pieces"/>
2412                                                 <field name="number_opening" on_change="on_change_sub_opening(pieces, number_opening)"/>
2413                                                 <field name="subtotal_opening" string="Opening Subtotal" sum="Total"/>
2414                                             </tree>
2415                                         </field>
2416                                     </group>
2417                                     <group string="Closing Cash Control" attrs="{'invisible' : [('state', '=', 'draft')]}">
2418                                         <field name="closing_details_ids" colspan="2" nolabel="1" attrs="{'readonly' : [('state', '=', 'confirm')]}">
2419                                             <tree string="Closing Cashbox Lines" editable="bottom">
2420                                                 <field name="pieces" readonly="1" />
2421                                                 <field name="number_closing" on_change="on_change_sub_closing(pieces, number_closing)"/>
2422                                                 <field name="subtotal_closing" string="Closing Subtotal" sum="Total"/>
2423                                             </tree>
2424                                         </field>
2425                                     </group>
2426                                 </group>
2427                             </group>
2428                         </page>
2429                         <page string="Journal Entries" attrs="{'invisible': [('state','!=','confirm')]}">
2430                             <field name="move_line_ids" string="Journal Entries"/>
2431                         </page>
2432                     </notebook>
2433                     <group>
2434                         <group class="oe_subtotal_footer oe_right">
2435                             <label for="balance_start" class="oe_subtotal_footer_separator oe_open_balance" string="Opening Balance" style="padding-right: 23px !important; padding-top: 6px !important;"/>
2436                             <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"/>
2437                             <label for="total_entry_encoding" string="+ Transactions" class="oe_force_bold oe_mini_subtotal_footer_separator" style="padding-right: 20px !important;"/>
2438                             <field name="total_entry_encoding" nolabel="1" class="oe_bold oe_account_total" widget="monetary" options="{'currency_field': 'currency'}"/>
2439                             <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."/>
2440                             <field name="balance_end" nolabel="1" class="oe_bold oe_account_total" widget="monetary" options="{'currency_field': 'currency'}"/>
2441                         </group>
2442                         <div>
2443                             <group class="oe_subtotal_footer oe_right" attrs="{'invisible': [('state', '=', 'draft')]}">
2444                                 <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;"/>
2445                                 <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."/>
2446                             </group>
2447                             <group/>
2448                             <group/>
2449                             <group class="oe_subtotal_footer oe_right" attrs="{'invisible': [('state', '=', 'draft')]}">
2450                                 <label for="difference" string="Difference" class="oe_subtotal_footer_separator oe_difference" style="padding-right: 20px !important;"/>
2451                                 <field name="difference" nolabel="1" class="oe_subtotal_footer_separator oe_difference" widget="monetary" options="{'currency_field': 'currency'}"/>
2452                             </group>
2453                         </div>
2454                     </group>
2455                 </sheet>
2456                 </form>
2457             </field>
2458         </record>
2459         <record id="account_cash_statement_graph" model="ir.ui.view">
2460             <field name="name">account.bank.statement.graph</field>
2461             <field name="model">account.bank.statement</field>
2462             <field name="arch" type="xml">
2463                 <graph string="Account Statistics" type="bar">
2464                     <field name="date"/>
2465                     <field name="balance_start" operator="+"/>
2466                     <field name="balance_end" operator="+"/>
2467                 </graph>
2468             </field>
2469          </record>
2470         <record id="action_view_bank_statement_tree" model="ir.actions.act_window">
2471             <field name="name">Cash Registers</field>
2472             <field name="type">ir.actions.act_window</field>
2473             <field name="res_model">account.bank.statement</field>
2474             <field name="view_type">form</field>
2475             <field name="view_mode">tree,form,graph</field>
2476             <field name="view_id" ref="view_cash_statement_tree"/>
2477             <field name="search_view_id" ref="view_account_bank_statement_filter"/>
2478             <field name="domain">[('journal_id.type', '=', 'cash')]</field>
2479             <field name="context">{'journal_type':'cash'}</field>
2480             <field name="help" type="html">
2481               <p class="oe_view_nocontent_create">
2482                 Click to create a new cash log.
2483               </p><p>
2484                 A Cash Register allows you to manage cash entries in your cash
2485                 journals. This feature provides an easy way to follow up cash
2486                 payments on a daily basis. You can enter the coins that are in
2487                 your cash box, and then post entries when money comes in or
2488                 goes out of the cash box.
2489               </p>
2490             </field>
2491         </record>
2492
2493         <record model="ir.actions.act_window.view" id="act_cash_statement1_all">
2494             <field name="sequence" eval="1"/>
2495             <field name="view_mode">tree</field>
2496             <field name="view_id" ref="view_cash_statement_tree"/>
2497             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2498         </record>
2499         <record model="ir.actions.act_window.view" id="act_cash_statement2_all">
2500             <field name="sequence" eval="1"/>
2501             <field name="view_mode">form</field>
2502             <field name="view_id" ref="view_bank_statement_form2"/>
2503             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2504         </record>
2505         <record model="ir.actions.act_window.view" id="act_cash_statement3_all">
2506             <field name="sequence" eval="1"/>
2507             <field name="view_mode">graph</field>
2508             <field name="view_id" ref="account_cash_statement_graph"/>
2509             <field name="act_window_id" ref="action_view_bank_statement_tree"/>
2510         </record>
2511         <menuitem action="action_view_bank_statement_tree" id="journal_cash_move_lines"
2512             parent="menu_finance_bank_and_cash"/>
2513
2514         <menuitem id="menu_account_customer" name="Customers"
2515             parent="menu_finance_receivables"
2516             action="base.action_partner_customer_form" sequence="100"/>
2517
2518         <menuitem id="menu_account_supplier" name="Suppliers"
2519             parent="menu_finance_payables"
2520             action="base.action_partner_supplier_form" sequence="7"/>
2521
2522         <!-- Account Reports -->
2523         <record id="view_account_financial_report_form" model="ir.ui.view">
2524             <field name="name">account.financial.report.form</field>
2525             <field name="model">account.financial.report</field>
2526             <field name="arch" type="xml">
2527                 <form string="Account Report">
2528                     <group col="4">
2529                         <field name="name"/>
2530                         <field name="parent_id"/>
2531                         <field name="sequence"/>
2532                         <field name="type"/>
2533                         <field name="sign"/>
2534                         <field name="style_overwrite"/>
2535                     </group>
2536                     <notebook attrs="{'invisible': [('type','not in',['accounts','account_type'])]}">
2537                         <page string="Report">
2538                             <group>
2539                                 <field name="display_detail" attrs="{'invisible': [('type','not in',['accounts','account_type'])]}"/>
2540                                 <field name="account_report_id" attrs="{'invisible': [('type', '!=', 'account_report')]}"/>
2541                             </group>
2542                             <field name="account_ids" attrs="{'invisible': [('type', '!=', 'accounts')]}"/>
2543                             <field name="account_type_ids" attrs="{'invisible': [('type', '!=', 'account_type')]}"/>
2544                         </page>
2545                     </notebook>
2546                 </form>
2547             </field>
2548         </record>
2549         <record id="view_account_financial_report_tree" model="ir.ui.view">
2550             <field name="name">account.financial.report.tree</field>
2551             <field name="model">account.financial.report</field>
2552             <field name="arch" type="xml">
2553                 <tree string="Account Report">
2554                     <field name="name"/>
2555                     <field name="parent_id" invisible="1"/>
2556                     <field name="type"/>
2557                     <field name="account_report_id"/>
2558                 </tree>
2559             </field>
2560         </record>
2561         <record id="view_account_financial_report_search" model="ir.ui.view">
2562             <field name="name">account.financial.report.search</field>
2563             <field name="model">account.financial.report</field>
2564             <field name="arch" type="xml">
2565                 <search string="Account Report">
2566                     <field name="name" string="Account Report"/>
2567                     <field name="type"/>
2568                     <field name="account_report_id"/>
2569                     <group expand="0" string="Group By">
2570                         <filter string="Parent Report" icon="terp-folder-orange" domain="" context="{'group_by':'parent_id'}"/>
2571                         <filter string="Report Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
2572                     </group>
2573                 </search>
2574             </field>
2575         </record>
2576         <record id="action_account_financial_report_tree" model="ir.actions.act_window">
2577             <field name="name">Financial Reports</field>
2578             <field name="type">ir.actions.act_window</field>
2579             <field name="res_model">account.financial.report</field>
2580             <field name="view_type">form</field>
2581             <field name="view_mode">tree,form</field>
2582             <field name="search_view_id" ref="view_account_financial_report_search"/>
2583             <field name="view_id" ref="view_account_financial_report_tree"/>
2584         </record>
2585         <menuitem id="menu_account_financial_reports_tree" name="Account Reports Types" parent="menu_account_reports" action="action_account_financial_report_tree"/>
2586
2587         <record id="view_account_report_tree_hierarchy" model="ir.ui.view">
2588             <field name="name">account.report.hierarchy</field>
2589             <field name="model">account.financial.report</field>
2590             <field name="field_parent">children_ids</field>
2591             <field name="arch" type="xml">
2592                 <tree string="Account Reports Hierarchy">
2593                     <field name="name"/>
2594                     <field name="type"/>
2595                     <field name="parent_id" invisible="1"/>
2596                     <field name="account_report_id"/>
2597                 </tree>
2598             </field>
2599         </record>
2600         <record id="action_account_report_tree_hierarchy" model="ir.actions.act_window">
2601             <field name="name">Financial Reports Hierarchy</field>
2602             <field name="res_model">account.financial.report</field>
2603             <field name="view_type">tree</field>
2604             <field name="view_id" ref="view_account_report_tree_hierarchy"/>
2605             <field name="domain">[('parent_id','=',False)]</field>
2606         </record>
2607         <menuitem id="menu_account_report_tree_hierarchy" name="Account Reports Hierarchy"
2608                   parent="menu_account_reports" action="action_account_report_tree_hierarchy"/>
2609
2610     </data>
2611 </openerp>