HR_TIMESHEET : cleaning unused code

bzr revid: bch-f7ad02c4d634a9f75fd1da0ad91f11f2d30923c8
This commit is contained in:
bch 2007-06-21 07:56:06 +00:00
parent 03ce87ba8e
commit 97853854da
2 changed files with 2 additions and 9 deletions

View File

@ -116,13 +116,6 @@ class hr_analytic_timesheet(osv.osv):
'user_id' : lambda obj, cr, uid, ctx : ctx.get('user_id', uid),
}
def on_change_account_id(self, cr, uid, ids, account_id):
return {}
if not account_id:
return {}
account = self.pool.get('account.analytic.account').read(cr, uid, [account_id], ['name'])[0]['name']
user = self.pool.get('res.users').read(cr, uid, [uid], ['name'])[0]['name']
return {'value' : {'name' : '%s (%s)' % (account, user)}}
def on_change_user_id(self, cr, uid, ids, user_id):
if not user_id:

View File

@ -9,7 +9,7 @@
<tree string="Timesheet Line" editable="bottom">
<field name="user_id" required="1" on_change="on_change_user_id(user_id)"/>
<field name="date" />
<field name="account_id" on_change="on_change_account_id(account_id)" domain="[('type','=','normal'),('state', '&lt;&gt;', 'close')]"/>
<field name="account_id" domain="[('type','=','normal'),('state', '&lt;&gt;', 'close')]"/>
<field name="name" />
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" sum="Total time"/>
<field name="product_id" required="1"/>
@ -33,7 +33,7 @@
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" required="1"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" />
<field name="account_id" on_change="on_change_account_id(account_id)" domain="[('type','=','normal'),('state', '&lt;&gt;', 'close')]" select="1"/>
<field name="account_id" domain="[('type','=','normal'),('state', '&lt;&gt;', 'close')]" select="1"/>
<field name="amount" select="2"/>
<field name="general_account_id" select="2"/>
<field name="journal_id"/>