account-analytic icon indicating copy to clipboard operation
account-analytic copied to clipboard

[18.0][FIX] pos_analytic_by_config

Open andrel-exo opened this issue 2 months ago • 0 comments

My first PR #831 fixed the issue where analytic distributions intended only for POS were also being applied in the backend. However, it introduced a side effect: analytic lines started being created in flows where they shouldn’t (e.g. POS payments and session closing).

The root cause was that the _get_default_search_domain_vals method was missing. Without it, the POS-scoped models were still being matched globally in Odoo 18, since the analytic engine only filters on keys present in vals.

This new PR restores the original logic but also defines _get_default_search_domain_vals with {"pos_config_id": False}.

andrel-exo avatar Oct 10 '25 09:10 andrel-exo