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