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.
tools/account_asset_management/models/account_asset.py", line 970, in _compute_entries
% (asset.name, asset.code) or asset.name
UnboundLocalError: local variable 'asset' referenced before assignment
* There's no need of forcing to create such records if your fiscal years are regular ones.
* FY date range computation duplicates code that is already on core.
* DummyFY is a good idea, but was not used at all. Now it is.
This way, other method_time mechanism like localization ones is able to overwrite it.
You also got an error of variable `number` not set due to previous code. Although no
alternate implementation for a new method_time, now you don't have any error,
fallbacking to standard proportional repartition.