[FIX] account_asset_management - Allow editing salvage value
This commit is contained in:
parent
71006a184e
commit
869cc39d5e
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "Assets Management",
|
"name": "Assets Management",
|
||||||
"version": "13.0.1.2.0",
|
"version": "13.0.1.2.1",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"depends": ["account"],
|
"depends": ["account"],
|
||||||
"excludes": ["account_asset"],
|
"excludes": ["account_asset"],
|
||||||
|
@ -123,7 +123,11 @@ class AccountAssetLine(models.Model):
|
|||||||
)
|
)
|
||||||
elif list(vals.keys()) == ["asset_id"]:
|
elif list(vals.keys()) == ["asset_id"]:
|
||||||
continue
|
continue
|
||||||
elif dl.move_id and not self.env.context.get("allow_asset_line_update"):
|
elif (
|
||||||
|
dl.move_id
|
||||||
|
and not self.env.context.get("allow_asset_line_update")
|
||||||
|
and dl.type != "create"
|
||||||
|
):
|
||||||
raise UserError(
|
raise UserError(
|
||||||
_(
|
_(
|
||||||
"You cannot change a depreciation line "
|
"You cannot change a depreciation line "
|
||||||
|
@ -100,7 +100,7 @@
|
|||||||
name="salvage_value"
|
name="salvage_value"
|
||||||
widget="monetary"
|
widget="monetary"
|
||||||
options="{'currency_field': 'company_currency_id'}"
|
options="{'currency_field': 'company_currency_id'}"
|
||||||
attrs="{'readonly': ['|', ('move_line_check', '=', True), ('state', '!=', 'draft')]}"
|
attrs="{'readonly': [('state', '!=', 'draft')]}"
|
||||||
/>
|
/>
|
||||||
<field name="date_remove" />
|
<field name="date_remove" />
|
||||||
</group>
|
</group>
|
||||||
|
Loading…
Reference in New Issue
Block a user