[MERGE]: Merged lp:~openerp-dev/openobject-addons/trunk-accounting-view-imp-atp-accou...
authorAtul Patel (OpenERP) <atp@tinyerp.com>
Thu, 28 Jun 2012 06:51:18 +0000 (12:21 +0530)
committerAtul Patel (OpenERP) <atp@tinyerp.com>
Thu, 28 Jun 2012 06:51:18 +0000 (12:21 +0530)
bzr revid: atp@tinyerp.com-20120628065118-fthpld3kkwphdb0t

1  2 
addons/account_asset/account_asset.py
addons/account_asset/account_asset_view.xml

@@@ -335,8 -345,8 +345,8 @@@ class account_asset_depreciation_line(o
          'asset_id': fields.many2one('account.asset.asset', 'Asset', required=True),
          'parent_state': fields.related('asset_id', 'state', type='char', string='State of Asset'),
          'amount': fields.float('Depreciation Amount', required=True),
-         'remaining_value': fields.float('Amount to Depreciate', required=True),
 -        'remaining_value': fields.float('Amount to depreciate', required=True),
 -        'depreciated_value': fields.float('Amount already depreciated', required=True),
++        'remaining_value': fields.float('Amount To Depreciate', required=True),
 +        'depreciated_value': fields.float('Amount Already Depreciated', required=True),
          'depreciation_date': fields.char('Depreciation Date', size=64, select=1),
          'move_id': fields.many2one('account.move', 'Depreciation Entry'),
          'move_check': fields.function(_get_move_check, method=True, type='boolean', string='Posted', store=True)
                      <field name="state" widget="statusbar" statusbar_visible="draft,open"/>
                  </header>
                  <sheet>
-                     <label for="name"/>
-                     <h1><field name="name"/></h1>
-                     <label for="category_id"/>
-                     <h2><field name="category_id" on_change="onchange_category_id(category_id)"/></h2>
 -                    <div>
 -                        <label for="name"/>
++                    <div class="oe_title">
++                        <label for="name" class="oe_edit_only"/>
+                         <h1>
+                             <field name="name" class="oe_inline"/> -
 -                            <field name="code" class="oe_inline" placeholder="Reference"/>
 -                            <button name="open_entries" string="Entries" type="object"/>
++                            <field name="code"  class="oe_inline"  placeholder="Reference"/>
++                            <button name="open_entries" string="Entries" type="object" class="oe_inline"/>
+                         </h1>
++                       <label for="category_id" class="oe_edit_only"/>
++                       <h2>
++                        <field name="category_id" on_change="onchange_category_id(category_id)"/>
++                      </h2>
+                     </div>
 -                    <label for="category_id"/>
 -                    <h2><field name="category_id" on_change="onchange_category_id(category_id)"/></h2>
+                     <group>
 -                        <group col="2">
++                        <group>
+                             <field name="parent_id"/>
+                             <field name="partner_id"/>
+                         </group>
 -                        <group col="2">
++                        <group>
+                             <field name="company_id" widget="selection" groups="base.group_multi_company" on_change="onchange_company_id(company_id)"/>
+                             <field name="purchase_date"/>
+                             <field name="currency_id"/>
 -                            
+                         </group>
+                     </group>
                      <notebook colspan="4">
                          <page string="General">
                          <group>
                                  <field name="purchase_value"/>
                                  <field name="salvage_value"/>
                                  <field name="value_residual"/>
-                                 <field name="currency_id"/>
                              </group>
                              <group>
-                                 <field name="partner_id"/>
-                                 <field name="purchase_date"/>
-                                 <field name="parent_id"/>
+                                 <field name="method"/>
+                                 <field name="method_progress_factor" attrs="{'invisible':[('method','=','linear')], 'required':[('method','=','degressive')]}"/>
+                                 <field name="prorata" attrs="{'invisible': [('method_time','=','end')]}"/>
                              </group>
++                        </group>
++                        <group>
                              <group>
                                  <field name="method_time" on_change="onchange_method_time(method_time)"/>
                                  <field name="method_number" attrs="{'invisible':[('method_time','=','end')], 'required':[('method_time','=','number')]}"/>
                                    <field name="parent_state" invisible="1"/>
                                    <button name="create_move" attrs="{'invisible':['|',('move_check','!=',False),('parent_state','!=','open')]}" icon="gtk-execute" string="Create Move" type="object"/>
                                 </tree>
+                                <form string="Depriciation Lines"> 
+                                    <group>
 -                                       <group col="2">
++                                       <group>
+                                            <field name="asset_id" invisible="1"/>
+                                            <field name="parent_state" invisible="1"/>
+                                            <field name="name"/>
+                                            <field name="amount"/>
+                                            <field name="move_id"/>
+                                            <field name="move_check"/>
+                                            <field name="parent_state" invisible="1"/>
+                                        </group>
 -                                       <group col="2">
++                                       <group>
+                                            <field name="sequence"/>
+                                            <field name="depreciation_date"/>
+                                            <field name="depreciated_value" readonly="1"/>
+                                            <field name="remaining_value" readonly="1"/>
+                                        </group>
+                                    </group>
+                                </form>
                                 <graph type="bar">
                                    <field name="name"/>
                                    <field name="amount"/>