2
0
account-financial-tools/account_asset_management/models
Pedro M. Baeza a16a456511 [FIX] account_asset_management: Avoid error
Steps to reproduce the problem:

* Go to assets view
* Group by profile
* Unfold a group and click on an asset
* Click on "Journal Entries" smart-button
* Go back to the asset list
* Click again on the same asset (or another).
* Click on "Journal Entries" smart-button

Current behavior:

Error saying "KeyError: 'profile_id'"

Expected behavior:

No error

The cause for this is that Odoo stores in the context the key `group_by` with the
value `profile_id` in the specified chain of steps. That context entry is used for
grouping records in the list, and system tries to group the journal entries also
by that field, which doesn't exists in the other model, and thus the error.

We avoided it copying the context to be passes and leaving out that entry.
2022-12-24 00:42:21 +01:00
..
__init__.py [MIG] account_asset_management: Migration to 13.0 2022-12-24 00:42:21 +01:00
account_account.py [MIG] account_asset_management: Migration to 13.0 2022-12-24 00:42:21 +01:00
account_asset_group.py [MIG] account_asset_management: Migration to 13.0 2022-12-24 00:42:21 +01:00
account_asset_line.py [MIG] account_asset_management: Migration to 13.0 2022-12-24 00:42:21 +01:00
account_asset_profile.py [MIG] account_asset_management: Migration to 13.0 2022-12-24 00:42:21 +01:00
account_asset_recompute_trigger.py [MIG] account_asset_management: Migration to 13.0 2022-12-24 00:42:21 +01:00
account_asset.py [FIX] account_asset_management: Avoid error 2022-12-24 00:42:21 +01:00
account_fiscal_year.py [MIG] account_asset_management: Migration to 13.0 2022-12-24 00:42:21 +01:00
account_move.py [MIG] account_asset_management: Migration to 13.0 2022-12-24 00:42:21 +01:00