[IMP] Jinja template for database manager
[odoo/odoo.git] / addons / account / partner_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <record id="view_account_position_form" model="ir.ui.view">
6             <field name="name">account.fiscal.position.form</field>
7             <field name="model">account.fiscal.position</field>
8             <field name="arch" type="xml">
9                 <form string="Fiscal Position" version="7.0">
10                     <group col="4">
11                         <field name="name"/>
12                         <field name="active"/>
13                         <field name="company_id" widget="selection" groups="base.group_multi_company"/>
14                     </group>
15                     <separator string="Taxes Mapping"/>
16                     <field name="tax_ids" widget="one2many_list">
17                         <tree string="Tax Mapping" editable="bottom">
18                             <field name="tax_src_id" domain="[('parent_id','=',False)]"/>
19                             <field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
20                         </tree>
21                         <form string="Tax Mapping">
22                             <field name="tax_src_id" domain="[('parent_id','=',False)]"/>
23                             <field name="tax_dest_id" domain="[('parent_id','=',False)]"/>
24                         </form>
25                     </field>
26                     <separator string="Accounts Mapping"/>
27                     <field name="account_ids" widget="one2many_list">
28                         <tree string="Account Mapping" editable="bottom">
29                             <field name="account_src_id"/>
30                             <field name="account_dest_id"/>
31                         </tree>
32                         <form string="Account Mapping">
33                             <field name="account_src_id"/>
34                             <field name="account_dest_id"/>
35                         </form>
36                     </field>
37                     <separator string="Notes"/>
38                     <field name="note"/>
39                 </form>
40             </field>
41         </record>
42         <record id="view_account_position_tree" model="ir.ui.view">
43             <field name="name">account.fiscal.position.tree</field>
44             <field name="model">account.fiscal.position</field>
45             <field name="arch" type="xml">
46                 <tree string="Fiscal Position">
47                     <field name="name"/>
48                     <field name="company_id" groups="base.group_multi_company" widget="selection"/>
49                 </tree>
50             </field>
51         </record>
52
53         <record id="action_open_partner_analytic_accounts" model="ir.actions.act_window">
54             <field name="context">{'search_default_partner_id': [active_id], 'default_partner_id': active_id}</field>
55             <field name="name">Contracts/Analytic Accounts</field>
56             <field name="res_model">account.analytic.account</field>
57             <field name="view_id" ref="view_account_analytic_account_tree"/>
58             <field name="search_view_id" ref="view_account_analytic_account_search"/>
59         </record>
60         <record model="ir.ui.view" id="partner_view_buttons">
61             <field name="name">partner.view.buttons</field>
62             <field name="model">res.partner</field>
63             <field name="inherit_id" ref="base.view_partner_form" />
64             <field name="priority" eval="20"/>
65             <field name="arch" type="xml">
66                 <xpath expr="//div[@name='buttons']" position="inside">
67                     <button type="action" 
68                         class="oe_stat_button"
69                         icon="fa-pencil-square-o"
70                         name="%(account.action_invoice_tree)d" 
71                         attrs="{'invisible': [('customer', '=', False)]}" 
72                         context="{'search_default_partner_id': active_id,'default_partner_id': active_id}" groups="account.group_account_invoice">
73                         <div><strong><field name="total_invoiced" widget="monetary"/></strong><br/>Invoiced</div>
74                     </button>
75                     <button type="action" class="oe_stat_button" name="%(account.action_account_moves_all_tree)d" groups="account.group_account_user" icon="fa-list">
76                         <field string="Journal Items" name="journal_item_count" widget="statinfo"/>                        
77                     </button>
78                     <button class="oe_inline oe_stat_button" type="action" name="%(account.action_open_partner_analytic_accounts)d" 
79                         icon="fa-book" groups="analytic.group_analytic_accounting">
80                         <field string="Contracts" name="contracts_count" widget="statinfo"/>
81                     </button>
82                 </xpath>
83             </field>
84         </record>
85
86         <record id="action_account_fiscal_position_form" model="ir.actions.act_window">
87             <field name="name">Fiscal Positions</field>
88             <field name="res_model">account.fiscal.position</field>
89             <field name="view_type">form</field>
90             <field name="view_mode">tree,form</field>
91         </record>
92
93         <menuitem
94             action="action_account_fiscal_position_form"
95             id="menu_action_account_fiscal_position_form"
96             parent="next_id_27" sequence="20"/>
97
98         <!--
99         Partners Extension
100         -->
101
102         <record id="view_partner_property_form" model="ir.ui.view">
103             <field name="name">res.partner.property.form.inherit</field>
104             <field name="model">res.partner</field>
105             <field name="priority">2</field>
106             <field name="inherit_id" ref="base.view_partner_form"/>
107             <field name="arch" type="xml">
108                 <page name="sales_purchases" position="after" version="7.0">
109                 <page string="Accounting" col="4" name="accounting" attrs="{'invisible': [('is_company','=',False),('parent_id','!=',False)]}" groups="account.group_account_invoice">
110                     <group>
111                         <group>
112                             <field name="property_account_position" widget="selection"/>
113                         </group>
114                         <group>
115                             <field name="last_reconciliation_date"/>
116                         </group>
117                         <group>
118                             <field name="property_account_receivable" groups="account.group_account_invoice" />
119                             <field name="property_payment_term" widget="selection"/>
120                             <field name="credit"/>
121                             <field name="credit_limit"/>
122                         </group>
123                         <group>
124                             <field name="property_account_payable" groups="account.group_account_invoice"/>
125                             <field name="property_supplier_payment_term" widget="selection"/>
126                             <field name="debit"/>
127                         </group>
128                     </group>
129                     <field name="bank_ids" context="{'default_partner_id': active_id, 'form_view_ref': 'base.view_partner_bank_form'}">
130                         <tree string="Bank Details">
131                             <field name="state" invisible="1"/>
132                             <field name="sequence" invisible="1"/>
133                             <field name="acc_number"/>
134                             <field name="bank_name"/>
135                             <field name="owner_name"/>
136                         </tree>
137                     </field>
138                 </page>
139                 <page string="Accounting" name="accounting_disabled" attrs="{'invisible': ['|',('is_company','=',True),('parent_id','=',False)]}" groups="account.group_account_invoice">
140                     <div>
141                         <p>Accounting-related settings are managed on <button name="open_commercial_entity" type="object" string="the parent company" class="oe_link"/></p>
142                     </div>
143                 </page>
144                 </page>
145             </field>
146         </record>
147     </data>
148 </openerp>