[FIX+IMP] account_financial_report: data can be None + no context mangling

Depending on the calling method, data can be something different from a dictionary
(like `None` if no keyword argument is provided), so this will crash. Example:
mis_builder is crashing in its tests.

We prevent that checking for a falsy value before trying to access the dictionary.

We also avoid context mangling for non AFR reports (those without the key
`account_financial_report_lang` in the dictionary), not callign to `with_context`
in that case.
This commit is contained in:
Pedro M. Baeza
2020-08-28 18:17:10 +02:00
committed by chaule97
parent 7562cfd47c
commit cbacc1455c
2 changed files with 9 additions and 11 deletions

View File

@@ -5,7 +5,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Account Financial Reports",
"version": "13.0.1.3.1",
"version": "13.0.1.3.2",
"category": "Reporting",
"summary": "OCA Financial Reports",
"author": "Camptocamp SA,"