[15.0][MIG] account_asset_low_value

This commit is contained in:
Saran440
2022-12-09 15:18:39 +07:00
parent 22a3336ca8
commit c86314e4d4
4 changed files with 10 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
{
"name": "Assets Management - Low Value Asset",
"version": "14.0.1.0.0",
"version": "15.0.1.0.0",
"license": "AGPL-3",
"author": "Ecosoft, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-financial-tools",

View File

@@ -44,11 +44,12 @@ class AccountAsset(models.Model):
]
def _compute_depreciation(self):
super()._compute_depreciation()
res = super()._compute_depreciation()
# For low value asset, there is no depreciation
for asset in self:
if asset.low_value:
asset.value_residual = 0
return res
def validate(self):
res = super().validate()

View File

@@ -0,0 +1 @@
../../../../account_asset_low_value

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)