mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] account_asset_management: Check method end is defined in order to raise an Exception
This commit is contained in:
@@ -406,6 +406,7 @@ class AccountAsset(models.Model):
|
||||
if self.filtered(
|
||||
lambda a: a.method_time == "year"
|
||||
and not a.method_number
|
||||
and a.method_end
|
||||
and a.method_end <= a.date_start
|
||||
):
|
||||
raise UserError(_("The Start Date must precede the Ending Date."))
|
||||
|
||||
Reference in New Issue
Block a user