[FIX] account_asset_management: include 'number' method_time

This commit is contained in:
mreficent
2021-04-19 13:04:19 +02:00
parent 5e0215d678
commit a4bedab0df
3 changed files with 44 additions and 10 deletions

View File

@@ -110,7 +110,9 @@ class AccountAssetProfile(models.Model):
help="Choose the method to use to compute the dates and "
"number of depreciation lines.\n"
" * Number of Years: Specify the number of years "
"for the depreciation.\n",
"for the depreciation.\n"
" * Number of Depreciations: Fix the number of "
"depreciation lines and the time between 2 depreciations.\n",
)
days_calc = fields.Boolean(
string="Calculate by days",
@@ -173,11 +175,10 @@ class AccountAssetProfile(models.Model):
@api.model
def _selection_method_time(self):
"""
Install the 'account_asset_management_method_number_end' to enable the
'Number' and 'End' Time Methods.
"""
return [("year", _("Number of Years or end date"))]
return [
("year", _("Number of Years or end date")),
("number", _("Number of Depreciations")),
]
@api.constrains("method", "method_time")
def _check_method(self):