[FIX] account_asset: using attrs to hide method_* fields
In order to hide fields method_number and method_period to hide them according to the asset, fields_view_get method was overriden. An issue was present: if a search view on model account.asset.asset was added, and did not contain these method_* fields, this overriden fields_view_get was applied, and tried to hide method_* fields, while they were not present in the search view, which leaded to a crash. I could have solved this the easy way, to not apply the invisbility if the fields were not present in the view, or if the view was something else than form, but I prefered to solve this the cleanest way.
Showing
- addons/account_asset/wizard/account_asset_change_duration.py 10 additions, 29 deletionsaddons/account_asset/wizard/account_asset_change_duration.py
- addons/account_asset/wizard/account_asset_change_duration_view.xml 3 additions, 2 deletions...count_asset/wizard/account_asset_change_duration_view.xml
Loading
Please register or sign in to comment