mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[15.0][MIG] account_asset_low_value
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
../../../../account_asset_low_value
|
||||
6
setup/account_asset_low_value/setup.py
Normal file
6
setup/account_asset_low_value/setup.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['setuptools-odoo'],
|
||||
odoo_addon=True,
|
||||
)
|
||||
Reference in New Issue
Block a user