commit
5386050da6
@ -1235,15 +1235,14 @@ class AccountAsset(models.Model):
|
||||
try:
|
||||
with self.env.cr.savepoint():
|
||||
result += depreciation.create_move()
|
||||
except Exception:
|
||||
e = exc_info()[0]
|
||||
except Exception as e:
|
||||
tb = "".join(format_exception(*exc_info()))
|
||||
asset_ref = depreciation.asset_id.name
|
||||
if depreciation.asset_id.code:
|
||||
asset_ref = "[{}] {}".format(depreciation.asset_id.code, asset_ref)
|
||||
error_log += _(
|
||||
"\nError while processing asset '{ref}': {exception}"
|
||||
).format(ref=asset_ref, exception=str(e))
|
||||
).format(ref=asset_ref, exception=repr(e))
|
||||
error_msg = _("Error while processing asset '{ref}': \n\n{tb}").format(
|
||||
ref=asset_ref, tb=tb
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user