[10.0][FIX] account_asset_management: fix stack while trying to log an error

This commit is contained in:
Cédric Pigeon
2018-11-26 09:18:11 +01:00
parent 172f0c57e0
commit b791c55ef5

View File

@@ -1088,7 +1088,8 @@ class AccountAsset(models.Model):
except:
e = exc_info()[0]
tb = ''.join(format_exception(*exc_info()))
asset_ref = depreciation.asset_id.code and '%s (ref: %s)' \
asset = depreciation.asset_id
asset_ref = asset.code and '%s (ref: %s)' \
% (asset.name, asset.code) or asset.name
error_log += _(
"\nError while processing asset '%s': %s"