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