[MERGE]
authorUjjvala Collins (OpenERP) <uco@tinyerp.com>
Tue, 24 May 2011 13:34:36 +0000 (19:04 +0530)
committerUjjvala Collins (OpenERP) <uco@tinyerp.com>
Tue, 24 May 2011 13:34:36 +0000 (19:04 +0530)
bzr revid: uco@tinyerp.com-20110524133436-zxzoem4c3thg3htf

addons/account_asset/account_asset.py
addons/account_asset/account_asset_view.xml

index 314304b..a801d48 100644 (file)
@@ -135,7 +135,7 @@ class account_asset_asset(osv.osv):
 
     def validate(self, cr, uid, ids, context={}):
         return self.write(cr, uid, ids, {
-            'state':'normal'
+            'state':'open'
         }, context)
 
     def _amount_total(self, cr, uid, ids, name, args, context={}):
@@ -178,7 +178,7 @@ class account_asset_asset(osv.osv):
         'parent_id': fields.many2one('account.asset.asset', 'Parent Asset'),
         'child_ids': fields.one2many('account.asset.asset', 'parent_id', 'Children Assets'),
         'purchase_date': fields.date('Purchase Date', required=True),
-        'state': fields.selection([('view','View'),('draft','Draft'),('normal','Normal'),('close','Close')], 'state', required=True),
+        'state': fields.selection([('draft','Draft'),('open','Running'),('close','Close')], 'state', required=True),
         'active': fields.boolean('Active', select=2),
         'partner_id': fields.many2one('res.partner', 'Partner'),
 
@@ -326,7 +326,7 @@ class account_asset_depreciation_line(osv.osv):
         '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='Move Included', store=True)
+        'move_check': fields.function(_get_move_check, method=True, type='boolean', string='Posted', store=True)
     }
 
     def create_move(self, cr, uid,ids, context=None):
index 08d501a..2acdd64 100644 (file)
@@ -94,8 +94,8 @@
                     <newline/>
                  </page>
                  <page string="Depreciation board">
-                    <field name="depreciation_line_ids" colspan="4" nolabel="1" mode="tree,graph">
-                       <tree>
+                    <field name="depreciation_line_ids" colspan="4" nolabel="1" mode="tree,graph" >
+                       <tree colors="blue:(move_check == False);black:(move_check == True)">
                           <field name="depreciation_date"/>
                           <field name="sequence" invisible="1"/>
                           <field name="amount"/>
                           <field name="depreciated_value"/>
                        </graph>
                     </field>
-                    <button type="object" name="compute_depreciation_board" string="Compute" icon="terp-stock_format-scientific" colspan="2"/>
+                    <button type="object" attrs="{'invisible':[('state','&lt;&gt;','open')]}" name="compute_depreciation_board" string="Compute" icon="terp-stock_format-scientific" colspan="2"/>
                  </page>
                  <page string="History">
                     <field name="account_move_line_ids" colspan="4" nolabel="1" readonly="1"/>