Merge PR #1158 into 14.0

Signed-off-by StefanRijnhart
This commit is contained in:
OCA-git-bot
2021-04-16 17:09:10 +00:00

View File

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