context-overridden (W8121)#
with_context() replaces the whole context.
What it does#
Reports with_context(some_dict): a positional argument replaces the context
instead of extending it. with_context(clean_context(...)) is allowed.
Why is this bad?#
Keys other code relies on, such as the language, company or tz, are
dropped.
Example#
records.with_context({"skip_check": True})
Use instead:
records.with_context(skip_check=True)