[IMP] improved set_to_close method and icon on button
bzr revid: bde@tiny2-desktop-20110607062013-08a63zt75167de5c
This commit is contained in:
@@ -134,18 +134,14 @@ class account_asset_asset(osv.osv):
|
||||
depreciation_date = datetime(year + (month / 12), month % 12, day)
|
||||
return True
|
||||
|
||||
def set_to_close(self, cr, uid, ids, context={}):
|
||||
return self.write(cr, uid, ids, {
|
||||
'state':'close'
|
||||
}, context)
|
||||
def set_to_close(self, cr, uid, ids, context=None):
|
||||
return self.write(cr, uid, ids, {'state': 'close'}, context=context)
|
||||
|
||||
def validate(self, cr, uid, ids, context={}):
|
||||
return self.write(cr, uid, ids, {
|
||||
'state':'open'
|
||||
}, context)
|
||||
|
||||
|
||||
|
||||
def _amount_residual(self, cr, uid, ids, name, args, context={}):
|
||||
cr.execute("""SELECT
|
||||
l.asset_id as id, SUM(abs(l.debit-l.credit)) AS amount
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
<group colspan="4">
|
||||
<field name="state" readonly="1"/>
|
||||
<button name="validate" states="draft" string="Confirm Asset" type="object" icon="gtk-apply"/>
|
||||
<button name="set_to_close" states="open" string="Set to Close" type="object" icon="gtk-no"/>
|
||||
<button name="set_to_close" states="open" string="Set to Close" type="object" icon="gtk-close"/>
|
||||
</group>
|
||||
<newline/>
|
||||
</page>
|
||||
|
||||
Reference in New Issue
Block a user