Merge PR #1157 into 13.0

Signed-off-by AaronHForgeFlow
This commit is contained in:
OCA-git-bot
2021-04-15 07:50:33 +00:00

View File

@@ -74,6 +74,10 @@ class AccountMove(models.Model):
for move in self:
for aml in move.line_ids.filtered("asset_profile_id"):
depreciation_base = aml.debit or -aml.credit
if not aml.name:
raise UserError(
_("Asset name must be set in the label of the line.")
)
vals = {
"name": aml.name,
"code": move.name,