mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
pylint
This commit is contained in:
@@ -69,22 +69,22 @@ class asset_modify(orm.TransientModel):
|
||||
result['arch'] = etree.tostring(doc)
|
||||
return result
|
||||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
def default_get(self, cr, uid, field_list, context=None):
|
||||
if not context:
|
||||
context = {}
|
||||
asset_obj = self.pool.get('account.asset.asset')
|
||||
res = super(asset_modify, self).default_get(
|
||||
cr, uid, fields, context=context)
|
||||
cr, uid, field_list, context=context)
|
||||
asset_id = context.get('active_id', False)
|
||||
asset = asset_obj.browse(cr, uid, asset_id, context=context)
|
||||
if 'name' in fields:
|
||||
if 'name' in field_list:
|
||||
res.update({'name': asset.name})
|
||||
if 'method_number' in fields and \
|
||||
if 'method_number' in field_list and \
|
||||
asset.method_time in ['number', 'year']:
|
||||
res.update({'method_number': asset.method_number})
|
||||
if 'method_period' in fields:
|
||||
if 'method_period' in field_list:
|
||||
res.update({'method_period': asset.method_period})
|
||||
if 'method_end' in fields and asset.method_time == 'end':
|
||||
if 'method_end' in field_list and asset.method_time == 'end':
|
||||
res.update({'method_end': asset.method_end})
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user