[FIX] account_asset: fix computation of default value
_get_asset_method returns None as it sets a value on a recordset. What we do
here is simply copying the computation directly in the default get to have a
correct value instead of None. This has probably been introduced when
migrating the module at the new API at commit 6120babb45.
This commit is contained in:
@@ -54,7 +54,8 @@ class AssetModify(models.TransientModel):
|
||||
if 'method_end' in fields and asset.method_time == 'end':
|
||||
res.update({'method_end': asset.method_end})
|
||||
if self.env.context.get('active_id'):
|
||||
res['asset_method_time'] = self._get_asset_method_time()
|
||||
asset = self.env['account.asset.asset'].browse(self.env.context.get('active_id'))
|
||||
res['asset_method_time'] = asset.method_time
|
||||
return res
|
||||
|
||||
@api.multi
|
||||
|
||||
Reference in New Issue
Block a user