mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[13.0][account_asset_management]: add user error when creating asset from bill
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user