[FIX] account_asset_management: Check method end is defined in order to raise an Exception

This commit is contained in:
Olga Marco
2021-06-30 10:27:44 +02:00
parent da4e1497ac
commit 3aa36a17f6

View File

@@ -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."))