mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[MIG] account_asset_management: Migration to 13.0
This commit is contained in:
committed by
João Marques
parent
22b491e1c0
commit
49e6643094
@@ -149,7 +149,7 @@ class AccountAssetProfile(models.Model):
|
||||
|
||||
@api.model
|
||||
def _default_company_id(self):
|
||||
return self.env["res.company"]._company_default_get("account.asset")
|
||||
return self.env.company
|
||||
|
||||
@api.model
|
||||
def _selection_method(self):
|
||||
@@ -173,7 +173,6 @@ class AccountAssetProfile(models.Model):
|
||||
"""
|
||||
return [("year", _("Number of Years or end date"))]
|
||||
|
||||
@api.multi
|
||||
@api.constrains("method")
|
||||
def _check_method(self):
|
||||
for profile in self:
|
||||
@@ -199,7 +198,6 @@ class AccountAssetProfile(models.Model):
|
||||
account.write({"asset_profile_id": profile.id})
|
||||
return profile
|
||||
|
||||
@api.multi
|
||||
def write(self, vals):
|
||||
if vals.get("method_time"):
|
||||
if vals["method_time"] != "year" and not vals.get("prorata"):
|
||||
|
||||
Reference in New Issue
Block a user